Problem when trying to copy localizable strings
Closed this issue · 3 comments
Vampire commented
I tried to use your ant task and started with the minimum required settings as a start, but when I try to execute, I get the following error. The Contents\Resources
directory is there, but it misses the de.lproj
directory into which it wants to copy the Localizable.strings
file.
build.xml:1251: java.io.FileNotFoundException: ....app\Contents\Resources\de.lproj\Localizable.strings (Das System kann den angegebenen Pfad nicht finden)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:187)
at com.oracle.appbundler.AppBundlerTask.copyResources(AppBundlerTask.java:492)
at com.oracle.appbundler.AppBundlerTask.execute(AppBundlerTask.java:452)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:854)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Vampire commented
I'm using the version released to Maven by @adamretter (evolvedbinary).
There the res.zip does not have the directory entries first but last in the ZIP:
$ zipinfo com/oracle/appbundler/res.zip
Archive: com/oracle/appbundler/res.zip
Zip file size: 1814 bytes, number of entries: 6
-rw---- 6.3 fat 822 bl defN 19-Jun-06 11:29 de.lproj/Localizable.strings
-rw---- 6.3 fat 733 bl defN 19-Jun-06 11:29 en.lproj/Localizable.strings
-rw---- 6.3 fat 847 bl defN 19-Jun-06 11:29 fr.lproj/Localizable.strings
drwx--- 6.3 fat 0 b- stor 19-Jun-06 11:29 de.lproj/
drwx--- 6.3 fat 0 b- stor 19-Jun-06 11:29 en.lproj/
drwx--- 6.3 fat 0 b- stor 19-Jun-06 11:29 fr.lproj/
6 files, 2402 bytes uncompressed, 1066 bytes compressed: 55.6%
And with that your code in AppBundlerTask#copyResources
does not cope well.
It requires that the directories come first.
adamretter commented
Here is a fix for that - #48