diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2015-02-02 19:36:36 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2015-02-03 15:45:33 +0000 |
commit | 04f21b30b32523ef306057cc76b89f6ba9e79be1 (patch) | |
tree | b0d20a1465ac23d459c2ec832235c4e779bac780 /share | |
parent | 633b7b74aad54e3102f06ca5110678596e2ae9b3 (diff) |
Fix JAR file generation in Java module.
The class file paths must be specified relative to the class files
directory, or the full path starting from / gets embedded in the JAR.
Change-Id: Id33dc5690a3dfa8d4e8619f3f599e408c431de36
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/modules/java/JavaModule.qbs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/qbs/modules/java/JavaModule.qbs b/share/qbs/modules/java/JavaModule.qbs index d2e3a3202..59286c888 100644 --- a/share/qbs/modules/java/JavaModule.qbs +++ b/share/qbs/modules/java/JavaModule.qbs @@ -126,8 +126,10 @@ Module { args.unshift(flags); for (i in inputs["java.class"]) - args.push(inputs["java.class"][i].filePath); + args.push(FileInfo.relativePath(ModUtils.moduleProperty(product, "classFilesDir"), + inputs["java.class"][i].filePath)); var cmd = new Command(ModUtils.moduleProperty(product, "jarFilePath"), args); + cmd.workingDirectory = ModUtils.moduleProperty(product, "classFilesDir"); cmd.description = "building " + FileInfo.fileName(output.fileName); cmd.highlight = "linker"; return cmd; |