File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
src/org/labkey/sequenceanalysis/run/util Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ dependencies {
135135 BuildUtils . addExternalDependency(
136136 project,
137137 new ExternalDependency (
138- " com.github.broadinstitute:picard:3.1 .0" ,
138+ " com.github.broadinstitute:picard:3.4 .0" ,
139139 " Picard Tools Lib" ,
140140 " PicardTools" ,
141141 " https://github.com/broadinstitute/picard" ,
Original file line number Diff line number Diff line change @@ -366,7 +366,7 @@ private List<String> getBaseParams() throws FileNotFoundException
366366 throw new RuntimeException ("Not found: " + jbzip2 .getPath ());
367367 }
368368
369- File htsjdkJar = new File (libDir , "htsjdk-4.0.0.jar " );
369+ File htsjdkJar = findJar (libDir , "htsjdk-" );
370370 if (!htsjdkJar .exists ())
371371 {
372372 throw new RuntimeException ("Not found: " + htsjdkJar .getPath ());
@@ -401,6 +401,27 @@ private List<String> getBaseParams() throws FileNotFoundException
401401 return params ;
402402 }
403403
404+ private File findJar (final File libDir , final String prefix )
405+ {
406+ if (!libDir .exists ())
407+ {
408+ throw new RuntimeException ("Missing directory: " + libDir );
409+ }
410+
411+ List <String > jarNames = Arrays .stream (libDir .list ()).filter (fn -> fn .startsWith (prefix )).sorted ().toList ();
412+ if (jarNames .isEmpty ())
413+ {
414+ throw new RuntimeException ("Unable to find JAR with prefix: " + prefix );
415+ }
416+
417+ if (jarNames .size () > 1 )
418+ {
419+ _logger .info ("More than one JAR found with prefix: " + prefix );
420+ }
421+
422+ return new File (libDir , jarNames .get (jarNames .size () - 1 ));
423+ }
424+
404425 private int getThreads ()
405426 {
406427 return _threads ;
You can’t perform that action at this time.
0 commit comments