@@ -68,8 +68,8 @@ public JavaMavenProvider(Path manifest) {
6868
6969 @ Override
7070 public String readLicenseFromManifest () {
71- String manifestLicense = readLicenseFromPom (manifest );
72- return LicenseUtils .getLicense (manifestLicense , manifest );
71+ String manifestLicense = readLicenseFromPom (manifestPath );
72+ return LicenseUtils .getLicense (manifestLicense , manifestPath );
7373 }
7474
7575 /**
@@ -124,10 +124,11 @@ private String readLicenseFromPom(Path pomPath) {
124124
125125 @ Override
126126 public Content provideStack () throws IOException {
127- var mvnCleanCmd = buildMvnCommandArgs ("clean" , "-f" , manifest .toString (), "--batch-mode" , "-q" );
127+ var mvnCleanCmd =
128+ buildMvnCommandArgs ("clean" , "-f" , manifestPath .toString (), "--batch-mode" , "-q" );
128129 var mvnEnvs = getMvnExecEnvs ();
129130 // execute the clean command
130- Operations .runProcess (manifest .getParent (), mvnCleanCmd .toArray (String []::new ), mvnEnvs );
131+ Operations .runProcess (manifestPath .getParent (), mvnCleanCmd .toArray (String []::new ), mvnEnvs );
131132 // create a temp file for storing the dependency tree in
132133 var tmpFile = Files .createTempFile ("TRUSTIFY_DA_dot_graph_" , null );
133134 // the tree command will build the project and create the dependency tree in the temp file
@@ -140,12 +141,12 @@ public Content provideStack() throws IOException {
140141 "-DoutputType=text" ,
141142 String .format ("-DoutputFile=%s" , tmpFile .toString ()),
142143 "-f" ,
143- manifest .toString (),
144+ manifestPath .toString (),
144145 "--batch-mode" ,
145146 "-q" ));
146147 // if we have dependencies marked as ignored, exclude them from the tree command
147148 var ignored =
148- getDependencies (manifest ).stream ()
149+ getDependencies (manifestPath ).stream ()
149150 .filter (d -> d .ignored )
150151 .map (DependencyAggregator ::toPurlWithoutVersion )
151152 .map (PackageURL ::getCoordinates )
@@ -157,7 +158,7 @@ public Content provideStack() throws IOException {
157158
158159 // execute the tree command
159160 var mvnTreeCmd = buildMvnCommandArgs (mvnTreeCmdArgs .toArray (String []::new ));
160- Operations .runProcess (manifest .getParent (), mvnTreeCmd .toArray (String []::new ), mvnEnvs );
161+ Operations .runProcess (manifestPath .getParent (), mvnTreeCmd .toArray (String []::new ), mvnEnvs );
161162 if (debugLoggingIsNeeded ()) {
162163 String stackAnalysisDependencyTree = Files .readString (tmpFile );
163164 log .info (
@@ -201,12 +202,12 @@ private Content generateSbomFromEffectivePom() throws IOException {
201202 "help:effective-pom" ,
202203 String .format ("-Doutput=%s" , tmpEffPom .toString ()),
203204 "-f" ,
204- manifest .toString (),
205+ manifestPath .toString (),
205206 "--batch-mode" ,
206207 "-q" );
207208 // execute the effective pom command
208209 Operations .runProcess (
209- manifest .getParent (), mvnEffPomCmd .toArray (String []::new ), getMvnExecEnvs ());
210+ manifestPath .getParent (), mvnEffPomCmd .toArray (String []::new ), getMvnExecEnvs ());
210211 if (debugLoggingIsNeeded ()) {
211212 String CaEffectivePoM = Files .readString (tmpEffPom );
212213 log .info (
@@ -216,7 +217,7 @@ private Content generateSbomFromEffectivePom() throws IOException {
216217 }
217218 // if we have dependencies marked as ignored grab ignored dependencies from the original pom
218219 // the effective-pom goal doesn't carry comments
219- List <DependencyAggregator > dependencies = getDependencies (manifest );
220+ List <DependencyAggregator > dependencies = getDependencies (manifestPath );
220221 var ignored =
221222 dependencies .stream ()
222223 .filter (d -> d .ignored )
@@ -437,7 +438,7 @@ private String selectMvnRuntime(final Path manifestPath) {
437438 if (mvnw != null ) {
438439 try {
439440 // verify maven wrapper is accessible
440- Operations .runProcess (manifest .getParent (), mvnw , ARG_VERSION );
441+ Operations .runProcess (manifestPath .getParent (), mvnw , ARG_VERSION );
441442 if (debugLoggingIsNeeded ()) {
442443 log .info (String .format ("using maven wrapper from : %s" , mvnw ));
443444 }
0 commit comments