Skip to content

Commit 876d707

Browse files
dschoctrueden
authored andcommitted
CombineAnnotations: make the output directory overrideable
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent bf12b42 commit 876d707

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/main/java/org/scijava/util/CombineAnnotations.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,21 @@ public class CombineAnnotations extends AbstractIndexWriter {
5959

6060
private static final String PREFIX = "META-INF/json/";
6161
private static final String LEGACY_PREFIX = "META-INF/annotations/";
62-
private static final String OUTPUT_DIR = "src/main/assembly/all";
62+
private final String OUTPUT_DIR;
6363

6464
private final Set<String> annotationFiles;
6565

6666
public CombineAnnotations() throws IOException {
67+
this(null);
68+
}
69+
70+
public CombineAnnotations(final String outputDir) throws IOException {
71+
if (outputDir != null) {
72+
OUTPUT_DIR = outputDir;
73+
} else {
74+
OUTPUT_DIR = "src/main/assembly/all";
75+
}
76+
6777
annotationFiles = getAnnotationFiles();
6878
}
6979

@@ -132,7 +142,7 @@ public Set<String> getAnnotationFiles() throws IOException {
132142
}
133143

134144
public static void main(final String[] args) throws Exception {
135-
new CombineAnnotations().combine();
145+
new CombineAnnotations(args.length > 0 ? args[0] : null).combine();
136146
}
137147

138148
// -- Helper methods --

0 commit comments

Comments
 (0)