diff --git a/.gitignore b/.gitignore
index 118ca45..3afdcc9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,9 +15,11 @@ capybara-*.html
/coverage/
.idea/
.env
-versioneye-maven-plugin.iml
-versioneye-maven-plugin.ipr
-versioneye-maven-plugin.iws
+*.iml
+*.ipr
+*.iws
+*.log
.classpath
.project
.settings
+atlassian-ide-plugin.xml
diff --git a/pom.xml b/pom.xml
index e2ed719..05a4185 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,11 +2,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
-
- 3.1
-
-
com.versioneye
versioneye-maven-plugin
3.11.4
@@ -50,14 +45,194 @@
+
+ ${maven.version}
+
+
+ 2.0.18
+ 4.5.3
+ 1.9.13
+ 1.8
+ ${java.version}
+ ${java.version}
3.5.0
- 1.9.13
- 4.5.3
+ 2.8.1
+ 3.0.24
+ UTF-8
+ UTF-8
+ 1.7.25
+ 2.20
+
+
+ enforcer
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 1.4.1
+
+
+ enforce-dependency-convergence
+ validate
+
+ enforce
+
+
+
+
+
+
+
+ true
+
+
+ commons-logging
+ log4j
+ log4j:log4j
+ slf4j-to-log4j
+
+ jdom:jdom
+
+ org.apache.commons:commons-io
+
+
+
+
+
+
+
+
+
+ errorprone-compiler
+
+
+
+
+ maven-compiler-plugin
+ 3.6.1
+
+ javac-with-errorprone
+ true
+
+
+
+ com.google.errorprone
+ error_prone_annotations
+ ${errorprone.compiler.version}
+
+
+ com.google.errorprone
+ error_prone_core
+ ${errorprone.compiler.version}
+
+
+
+ org.codehaus.plexus
+ plexus-compiler-javac-errorprone
+ ${plexus.compiler.version}
+
+
+ org.codehaus.plexus
+ plexus-compiler-api
+ ${plexus.compiler.version}
+
+
+ org.codehaus.plexus
+ plexus-compiler-manager
+ ${plexus.compiler.version}
+
+
+ org.codehaus.plexus
+ plexus-utils
+ ${plexus.utils.version}
+
+
+
+
+
+
+
+
+
+
+ gpg
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.6
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.commons
+ commons-lang3
+ 3.5
+
+
+ org.apache.maven
+ maven-artifact
+ ${maven.version}
+
+
+ com.google.guava
+ guava
+ 21.0
+
+
+ org.codehaus.plexus
+ plexus-utils
+ 3.0.24
+
+
+ org.codehaus.plexus
+ plexus-component-annotations
+ 1.7.1
+
+
+
+
+
+ org.slf4j
+ jcl-over-slf4j
+ ${slf4j.version}
+
+
+ org.slf4j
+ slf4j-simple
+ ${slf4j.version}
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j.version}
+
org.apache.maven
maven-plugin-api
@@ -84,10 +259,21 @@
jackson-mapper-lgpl
${jackson.version}
+
+ org.apache.commons
+ commons-lang3
+ 3.5
+
org.apache.httpcomponents
httpclient
${httpcomponents.version}
+
+
+ commons-logging
+ commons-logging
+
+
org.apache.httpcomponents
@@ -100,16 +286,46 @@
6.11
test
+
+ com.google.guava
+ guava
+ 21.0
+ test
+
+
+ junit
+ junit
+ 4.12
+ test
+
+
+ org.assertj
+ assertj-core
+ 3.6.2
+ test
+
+
+
+
+
+ maven-compiler-plugin
+ 3.6.1
+
+
+ maven-surefire-plugin
+ ${surefire.version}
+
+
+
-
com.versioneye
versioneye-maven-plugin
@@ -134,9 +350,6 @@
-
-
-
org.sonatype.plugins
nexus-staging-maven-plugin
@@ -149,25 +362,6 @@
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
org.apache.maven.plugins
maven-plugin-plugin
@@ -199,6 +393,7 @@
attach-sources
+ verify
jar-no-fork
@@ -209,9 +404,11 @@
org.apache.maven.plugins
maven-javadoc-plugin
+ 2.10.4
attach-javadocs
+ verify
jar
@@ -219,13 +416,25 @@
+
+ maven-dependency-plugin
+ 3.0.0
+
+
+ maven-help-plugin
+ 2.2
+
+
+ org.codehaus.mojo
+ versions-maven-plugin
+ 2.3
+
- org.apache.maven.plugins
maven-changelog-plugin
2.3
diff --git a/src/main/java/com/versioneye/CreateMojo.java b/src/main/java/com/versioneye/CreateMojo.java
index 1594d39..6222d19 100644
--- a/src/main/java/com/versioneye/CreateMojo.java
+++ b/src/main/java/com/versioneye/CreateMojo.java
@@ -21,56 +21,56 @@
@Mojo( name = "create", defaultPhase = LifecyclePhase.PROCESS_SOURCES )
public class CreateMojo extends ProjectMojo {
- @Parameter( property = "resource", defaultValue = "/projects?api_key=")
- private String resource;
-
-
- public void execute() throws MojoExecutionException, MojoFailureException {
- try{
- setProxy();
- prettyPrintStart();
-
- ByteArrayOutputStream jsonDependenciesStream = null;
- if (transitiveDependencies == true){
- jsonDependenciesStream = getTransitiveDependenciesJsonStream(nameStrategy);
- } else {
- jsonDependenciesStream = getDirectDependenciesJsonStream(nameStrategy);
- }
-
- if (jsonDependenciesStream == null){
- prettyPrint0End();
- return ;
- }
-
- ProjectJsonResponse response = uploadDependencies(jsonDependenciesStream);
-
- if (mavenSession.getTopLevelProject().getId().equals(mavenSession.getCurrentProject().getId())){
- mavenSession.getTopLevelProject().setContextValue("veye_project_id", response.getId());
- }
-
- merge( response.getId() );
- if (updatePropertiesAfterCreate) {
- writeProperties( response );
- }
- prettyPrint(response);
- } catch( Exception exception ){
- throw new MojoExecutionException("Oh no! Something went wrong :-( " +
- "Get in touch with the VersionEye guys and give them feedback." +
- "You find them on Twitter at https//twitter.com/VersionEye. ", exception);
- }
+ @Parameter( property = "resource", defaultValue = "/projects?api_key=")
+ private String resource;
+
+
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ try{
+ setProxy();
+ prettyPrintStart();
+
+ ByteArrayOutputStream jsonDependenciesStream = null;
+ if (transitiveDependencies == true){
+ jsonDependenciesStream = getTransitiveDependenciesJsonStream(nameStrategy);
+ } else {
+ jsonDependenciesStream = getDirectDependenciesJsonStream(nameStrategy);
+ }
+
+ if (jsonDependenciesStream == null){
+ prettyPrint0End();
+ return ;
+ }
+
+ ProjectJsonResponse response = uploadDependencies(jsonDependenciesStream);
+
+ if (mavenSession.getTopLevelProject().getId().equals(mavenSession.getCurrentProject().getId())){
+ mavenSession.getTopLevelProject().setContextValue("veye_project_id", response.getId());
+ }
+
+ merge( response.getId() );
+ if (updatePropertiesAfterCreate) {
+ writeProperties( response );
+ }
+ prettyPrint(response);
+ } catch( Exception exception ){
+ throw new MojoExecutionException("Oh no! Something went wrong :-( " +
+ "Get in touch with the VersionEye guys and give them feedback." +
+ "You find them on Twitter at https//twitter.com/VersionEye. ", exception);
}
+ }
- private ProjectJsonResponse uploadDependencies(ByteArrayOutputStream outStream) throws Exception {
- return createNewProject(resource, outStream);
- }
+ private ProjectJsonResponse uploadDependencies(ByteArrayOutputStream outStream) throws Exception {
+ return createNewProject(resource, outStream);
+ }
- private void prettyPrintStart(){
- getLog().info(".");
- getLog().info("Starting to upload dependencies. This can take a couple seconds ... ");
- getLog().info(".");
- }
+ private void prettyPrintStart(){
+ getLog().info(".");
+ getLog().info("Starting to upload dependencies. This can take a couple seconds ... ");
+ getLog().info(".");
+ }
}
diff --git a/src/main/java/com/versioneye/DeleteMojo.java b/src/main/java/com/versioneye/DeleteMojo.java
index 5ee28cc..ddf9edc 100644
--- a/src/main/java/com/versioneye/DeleteMojo.java
+++ b/src/main/java/com/versioneye/DeleteMojo.java
@@ -1,21 +1,23 @@
package com.versioneye;
-
-import com.versioneye.utils.HttpUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
+import com.versioneye.utils.HttpUtils;
+
import java.io.File;
+@SuppressWarnings({"WeakerAccess", "unused"})
@Mojo( name = "delete", defaultPhase = LifecyclePhase.PROCESS_SOURCES )
public class DeleteMojo extends ProjectMojo {
@Parameter( property = "resource", defaultValue = "/projects")
private String resource;
+ @Override
public void execute() throws MojoExecutionException, MojoFailureException {
try{
setProxy();
@@ -25,8 +27,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
} catch( Exception exception ){
exception.printStackTrace();
throw new MojoExecutionException("Oh no! Something went wrong. " +
- "Get in touch with the VersionEye guys and give them feedback. " +
- "You find them on Twitter at https//twitter.com/VersionEye. ", exception);
+ "Get in touch with the VersionEye guys and give them feedback. " +
+ "You find them on Twitter at https//twitter.com/VersionEye. ", exception);
}
}
@@ -38,13 +40,13 @@ protected void deleteProject() throws Exception {
HttpUtils.delete(url);
}
- protected void deletePropertiesFile() throws Exception{
+ protected void deletePropertiesFile() throws Exception {
String propertiesPath = getPropertiesPath();
File file = new File(propertiesPath);
file.delete();
}
- protected void prettyPrintStart(){
+ protected void prettyPrintStart() {
getLog().info(".");
getLog().info("Starting to delete this project from the VersionEye server. This can take a couple seconds ... ");
getLog().info(".");
diff --git a/src/main/java/com/versioneye/JsonMojo.java b/src/main/java/com/versioneye/JsonMojo.java
index 49e9484..df7df81 100644
--- a/src/main/java/com/versioneye/JsonMojo.java
+++ b/src/main/java/com/versioneye/JsonMojo.java
@@ -1,19 +1,22 @@
package com.versioneye;
-import com.versioneye.utils.JsonUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
+import com.versioneye.utils.JsonUtils;
+
import java.util.Map;
/**
* Writes all direct dependencies into a JSON file.
*/
+@SuppressWarnings("unused")
@Mojo( name = "json", defaultPhase = LifecyclePhase.PROCESS_SOURCES )
public class JsonMojo extends ProjectMojo {
+ @Override
public void execute() throws MojoExecutionException, MojoFailureException {
try{
Map jsonMap = getDirectDependenciesJsonMap(nameStrategy);
@@ -23,8 +26,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
prettyPrintEnd(filePath);
} catch( Exception exception ){
throw new MojoExecutionException( "Oh no! Something went wrong. " +
- "Get in touch with the VersionEye guys and give them feedback. " +
- "You find them on Twitter at https//twitter.com/VersionEye. ", exception );
+ "Get in touch with the VersionEye guys and give them feedback. " +
+ "You find them on Twitter at https//twitter.com/VersionEye. ", exception );
}
}
@@ -33,5 +36,4 @@ private void prettyPrintEnd(String pathToJson){
getLog().info("You find your json file here: " + pathToJson);
getLog().info("");
}
-
}
diff --git a/src/main/java/com/versioneye/LicenseCheckMojo.java b/src/main/java/com/versioneye/LicenseCheckMojo.java
index bc8edc0..443cd6a 100644
--- a/src/main/java/com/versioneye/LicenseCheckMojo.java
+++ b/src/main/java/com/versioneye/LicenseCheckMojo.java
@@ -1,27 +1,32 @@
package com.versioneye;
-import com.versioneye.dto.ProjectJsonResponse;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
+import com.versioneye.dto.ProjectJsonResponse;
+
import java.io.ByteArrayOutputStream;
/**
* Updates an existing project at VersionEye with the dependencies from the current project AND
* ensures that all used licenses are on a whitelist. If that is not the case it breaks the build.
*/
+@SuppressWarnings("unused")
@Mojo( name = "licenseCheck", defaultPhase = LifecyclePhase.VERIFY )
public class LicenseCheckMojo extends UpdateMojo {
+ @Override
public void execute() throws MojoExecutionException, MojoFailureException {
+
try{
setProxy();
prettyPrintStart();
- ByteArrayOutputStream jsonDependenciesStream = null;
- if (transitiveDependencies == true){
+ ByteArrayOutputStream jsonDependenciesStream;
+
+ if (transitiveDependencies){
jsonDependenciesStream = getTransitiveDependenciesJsonStream(nameStrategy);
} else {
jsonDependenciesStream = getDirectDependenciesJsonStream(nameStrategy);
@@ -36,21 +41,20 @@ public void execute() throws MojoExecutionException, MojoFailureException {
System.out.println(response.getLicenses_red());
if (response.getLicenses_red() > 0){
throw new MojoExecutionException("Some components violate the license whitelist! " +
- "More details here: " + fetchBaseUrl() + "/user/projects/" + response.getId() );
+ "More details here: " + fetchBaseUrl() + "/user/projects/" + response.getId() );
}
- if (response.getLicenses_unknown() > 0 && licenseCheckBreakByUnknown == true ){
+ if (response.getLicenses_unknown() > 0 && licenseCheckBreakByUnknown) {
throw new MojoExecutionException("Some components are without any license! " +
- "More details here: " + fetchBaseUrl() + "/user/projects/" + response.getId() );
+ "More details here: " + fetchBaseUrl() + "/user/projects/" + response.getId() );
}
prettyPrint( response );
} catch( Exception exception ){
exception.printStackTrace();
throw new MojoExecutionException("Oh no! Something went wrong. " +
- "Get in touch with the VersionEye guys and give them feedback. " +
- "You find them on Twitter at https//twitter.com/VersionEye. ", exception);
+ "Get in touch with the VersionEye guys and give them feedback. " +
+ "You find them on Twitter at https//twitter.com/VersionEye. ", exception);
}
}
-
}
diff --git a/src/main/java/com/versioneye/ListMojo.java b/src/main/java/com/versioneye/ListMojo.java
index 0d571ce..516bc66 100644
--- a/src/main/java/com/versioneye/ListMojo.java
+++ b/src/main/java/com/versioneye/ListMojo.java
@@ -1,31 +1,36 @@
package com.versioneye;
-import com.versioneye.utils.DependencyUtils;
import org.apache.maven.model.Dependency;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.graph.DependencyNode;
import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator;
+import com.versioneye.utils.DependencyUtils;
+
import java.util.ArrayList;
import java.util.List;
/**
* Lists all direct and recursive dependencies.
*/
+@SuppressWarnings("unused")
@Mojo( name = "list", defaultPhase = LifecyclePhase.PROCESS_SOURCES )
public class ListMojo extends ProjectMojo {
- public void execute() throws MojoExecutionException {
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException {
versionEyeOutput();
+
try{
PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();
DependencyNode root = getDependencyNode(nlg);
List dependencies = DependencyUtils.collectAllDependencies(nlg.getDependencies(true));
List directDependencies = DependencyUtils.collectDirectDependencies(root.getChildren());
- List recursiveDependencies = new ArrayList(dependencies);
+ List recursiveDependencies = new ArrayList<>(dependencies);
recursiveDependencies.removeAll(directDependencies);
List deps = project.getDependencies();
produceNiceOutput(deps, recursiveDependencies);
@@ -36,29 +41,31 @@ public void execute() throws MojoExecutionException {
}
}
- private void produceNiceOutput(List directDependencies, List recursiveDependencies){
+ private void produceNiceOutput(List directDependencies, List recursiveDependencies) {
productNiceOutputForDirectDependencies(directDependencies);
productNiceOutputForRecursiveDependencies(recursiveDependencies);
produceNiceOutputSummary(directDependencies.size(), recursiveDependencies.size());
}
- private void versionEyeOutput(){
+ private void versionEyeOutput() {
getLog().info("");
getLog().info("************* \\_/ VersionEye \\_/ *************");
getLog().info("");
}
- private void productNiceOutputForDirectDependencies(List directDependencies){
+ private void productNiceOutputForDirectDependencies(List directDependencies) {
getLog().info("");
getLog().info(directDependencies.size() + " Direct Dependencies: ");
getLog().info("--------------------");
+
for (Dependency dependency : directDependencies){
getLog().info( dependency.getGroupId() + ":" + dependency.getArtifactId() + ":" + dependency.getVersion());
}
+
getLog().info("");
}
- private void productNiceOutputForRecursiveDependencies(List recursiveDependencies){
+ private void productNiceOutputForRecursiveDependencies(List recursiveDependencies) {
getLog().info("");
getLog().info(recursiveDependencies.size() + " Transitive Dependencies: ");
getLog().info("--------------------");
@@ -72,10 +79,9 @@ private void produceNiceOutputSummary(int directCount, int recursiveCount) {
int allCount = directCount + recursiveCount;
getLog().info("");
getLog().info(directCount + " Direct dependencies and " +
- recursiveCount + " transitive dependencies. This project has " +
- allCount + " dependencies.");
+ recursiveCount + " transitive dependencies. This project has " +
+ allCount + " dependencies.");
getLog().info("");
getLog().info("");
}
-
}
diff --git a/src/main/java/com/versioneye/PingMojo.java b/src/main/java/com/versioneye/PingMojo.java
index ee67495..4c9e238 100644
--- a/src/main/java/com/versioneye/PingMojo.java
+++ b/src/main/java/com/versioneye/PingMojo.java
@@ -5,26 +5,30 @@
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
-import javax.net.ssl.HttpsURLConnection;
import java.io.BufferedReader;
+import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
+import javax.net.ssl.HttpsURLConnection;
+
/**
* Ping the VersionEye API. Expects a pong in response.
*/
+@SuppressWarnings("unused")
@Mojo( name = "ping", defaultPhase = LifecyclePhase.PROCESS_SOURCES )
public class PingMojo extends SuperMojo {
- public void execute() throws MojoExecutionException, MojoFailureException {
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException {
try{
setProxy();
initTls();
InputStream inputStream = getInputStream(fetchBaseUrl() + apiPath + "/services/ping");
BufferedReader input = new BufferedReader( new InputStreamReader( inputStream ) );
- String line = "";
+ String line;
getLog().info("");
while((line = input.readLine())!=null){
getLog().info(line);
@@ -33,12 +37,12 @@ public void execute() throws MojoExecutionException, MojoFailureException {
input.close();
} catch (Exception ex){
throw new MojoExecutionException( "Oh no! The API or your internet connection seems to be down. " +
- "Get in touch with the VersionEye guys and give them feedback. " +
- "You find them on Twitter at https//twitter.com/VersionEye. ", ex );
+ "Get in touch with the VersionEye guys and give them feedback. " +
+ "You find them on Twitter at https//twitter.com/VersionEye. ", ex );
}
}
- private InputStream getInputStream( String urlPath ) throws Exception {
+ private InputStream getInputStream( String urlPath ) throws IOException {
URL url = new URL( urlPath );
if (urlPath.startsWith("https")){
System.out.println("https");
@@ -50,5 +54,4 @@ private InputStream getInputStream( String urlPath ) throws Exception {
return urlConnection.getInputStream();
}
}
-
}
diff --git a/src/main/java/com/versioneye/ProjectMojo.java b/src/main/java/com/versioneye/ProjectMojo.java
index 8e82397..9a26ac9 100644
--- a/src/main/java/com/versioneye/ProjectMojo.java
+++ b/src/main/java/com/versioneye/ProjectMojo.java
@@ -38,229 +38,229 @@
*/
public class ProjectMojo extends SuperMojo {
- protected ByteArrayOutputStream getTransitiveDependenciesJsonStream(String nameStrategy) throws Exception {
- PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();
- DependencyNode root = getDependencyNode(nlg);
- List transDependencies = nlg.getDependencies(true);
- List directDependencies = DependencyUtils.collectDirectDependencies(root.getChildren());
- List dependencies = new ArrayList();
- for (org.eclipse.aether.graph.Dependency dependency : transDependencies) {
- getLog().info(" scope: " + dependency.getScope());
- Dependency dep = new Dependency();
- Artifact artifact = dependency.getArtifact();
- dep.setGroupId(artifact.getGroupId());
- dep.setArtifactId(artifact.getArtifactId());
- dep.setVersion(artifact.getVersion());
- dep.setScope(dependency.getScope());
- if (directDependencies.contains(artifact)) {
- dep.setScope(dependency.getScope() + "_direct");
- } else {
- dep.setScope(dependency.getScope() + "_transitive");
- }
- dependencies.add(dep);
- }
- JsonUtils jsonUtils = new JsonUtils();
- return jsonUtils.dependenciesToJson(project, dependencies, null, nameStrategy);
+ protected ByteArrayOutputStream getTransitiveDependenciesJsonStream(String nameStrategy) throws Exception {
+ PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();
+ DependencyNode root = getDependencyNode(nlg);
+ List transDependencies = nlg.getDependencies(true);
+ List directDependencies = DependencyUtils.collectDirectDependencies(root.getChildren());
+ List dependencies = new ArrayList();
+ for (org.eclipse.aether.graph.Dependency dependency : transDependencies) {
+ getLog().info(" scope: " + dependency.getScope());
+ Dependency dep = new Dependency();
+ Artifact artifact = dependency.getArtifact();
+ dep.setGroupId(artifact.getGroupId());
+ dep.setArtifactId(artifact.getArtifactId());
+ dep.setVersion(artifact.getVersion());
+ dep.setScope(dependency.getScope());
+ if (directDependencies.contains(artifact)) {
+ dep.setScope(dependency.getScope() + "_direct");
+ } else {
+ dep.setScope(dependency.getScope() + "_transitive");
+ }
+ dependencies.add(dep);
}
+ JsonUtils jsonUtils = new JsonUtils();
+ return jsonUtils.dependenciesToJson(project, dependencies, null, nameStrategy);
+ }
- protected ByteArrayOutputStream getDirectDependenciesJsonStream(String nameStrategy) throws Exception {
- List plugins = new ArrayList();
- if (trackPlugins){
- plugins = getPluginsFromXml();
- }
-
- List dependencies = project.getDependencies();
- if (ignoreDependencyManagement == false &&
- project.getDependencyManagement() != null &&
- project.getDependencyManagement().getDependencies() != null &&
- project.getDependencyManagement().getDependencies().size() > 0){
- dependencies.addAll(project.getDependencyManagement().getDependencies());
- }
- List filteredDependencies = filterForScopes(dependencies);
- JsonUtils jsonUtils = new JsonUtils();
- return jsonUtils.dependenciesToJson(project, filteredDependencies, plugins, nameStrategy);
+ protected ByteArrayOutputStream getDirectDependenciesJsonStream(String nameStrategy) throws Exception {
+ List plugins = new ArrayList();
+ if (trackPlugins){
+ plugins = getPluginsFromXml();
}
- protected Map getDirectDependenciesJsonMap(String nameStrategy) throws Exception {
- List dependencies = project.getDependencies();
- if (dependencies == null || dependencies.isEmpty()){
- return null;
- } else {
- iterateThrough(dependencies);
- }
- JsonUtils jsonUtils = new JsonUtils();
- List