Skip to content

Commit

Permalink
Fix for classpath generation of bld wrapper, making source sources an…
Browse files Browse the repository at this point in the history
…d javadocs are not included.
  • Loading branch information
gbevin committed Jul 10, 2024
1 parent 8b75f74 commit 1d38c91
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/rife/bld/wrapper/Wrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ private enum LaunchMode {
static final Pattern META_DATA_SNAPSHOT_VERSION = Pattern.compile("<snapshotVersion>.*?<value>([^<]+)</value>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
static final Pattern OPTIONS_PATTERN = Pattern.compile("\"[^\"]+\"|\\S+");

private static final Pattern JAR_EXCLUDE_SOURCES_PATTERN = Pattern.compile("^.*-sources\\.jar$", Pattern.CASE_INSENSITIVE);
private static final Pattern JAR_EXCLUDE_JAVADOC_PATTERN = Pattern.compile("^.*-javadoc\\.jar$", Pattern.CASE_INSENSITIVE);
private static final Pattern[] CLASSPATH_INCLUDED_JARS = new Pattern[]{JAR_FILE_PATTERN};
private static final Pattern[] CLASSPATH_EXCLUDED_JARS = new Pattern[]{JAR_EXCLUDE_SOURCES_PATTERN, JAR_EXCLUDE_JAVADOC_PATTERN, Pattern.compile(WRAPPER_JAR)};

private File currentDir_ = new File(System.getProperty("user.dir"));
private LaunchMode launchMode_ = LaunchMode.Cli;

Expand Down Expand Up @@ -649,7 +654,7 @@ private static void includeJvmParameters(List<String> arguments, List<String> ja
private List<File> bldClasspathJars() {
// detect the jar files in the compile lib directory
var dir_abs = libBldDirectory().getAbsoluteFile();
var jar_files = FileUtils.getFileList(dir_abs, JAR_FILE_PATTERN, Pattern.compile(WRAPPER_JAR));
var jar_files = FileUtils.getFileList(dir_abs, CLASSPATH_INCLUDED_JARS, CLASSPATH_EXCLUDED_JARS);

// build the compilation classpath
return new ArrayList<>(jar_files.stream().map(file -> new File(dir_abs, file)).toList());
Expand Down

0 comments on commit 1d38c91

Please sign in to comment.