File tree Expand file tree Collapse file tree
src/main/java/org/codejive/jpm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -368,19 +368,21 @@ public Integer call() throws Exception {
368368 return 1 ;
369369 }
370370
371- // Get the classpath for variable substitution using app.yml dependencies
371+ // Get the classpath for variable substitution only if needed
372372 List <Path > classpath = Collections .emptyList ();
373- try {
374- classpath =
375- Jpm .builder ()
376- .directory (copyMixin .directory )
377- .noLinks (copyMixin .noLinks )
378- .build ()
379- .path (new String [0 ]); // Empty array means use dependencies from
380- // app.yml
381- } catch (Exception e ) {
382- // If we can't get the classpath, continue with empty list
383- System .err .println ("Warning: Could not resolve classpath: " + e .getMessage ());
373+ if (command .contains ("${deps}" )) {
374+ try {
375+ classpath =
376+ Jpm .builder ()
377+ .directory (copyMixin .directory )
378+ .noLinks (copyMixin .noLinks )
379+ .build ()
380+ .path (new String [0 ]); // Empty array means use dependencies from
381+ // app.yml
382+ } catch (Exception e ) {
383+ // If we can't get the classpath, continue with empty list
384+ System .err .println ("Warning: Could not resolve classpath: " + e .getMessage ());
385+ }
384386 }
385387
386388 return ScriptUtils .executeScript (command , classpath );
You can’t perform that action at this time.
0 commit comments