multiple -injars

386 views
Skip to first unread message

Del

unread,
May 15, 2009, 7:45:02 AM5/15/09
to pyx4me-users
Hi all! Sorry for my english :(

I used ant taks proguard in the ant build.xml file. Now we are
migrating to maven...

in the ant task all is fine:

configuration:

-injars a.jar
-injars b.jar
-outjars c.jar
....

output:

[proguard] Reading program jar [a.jar]
[proguard] Reading program jar [b.jar]
....
[proguard] Preparing output jar [c.jar]
[proguard] Copying resources from program jar [a.jar]
[proguard] Copying resources from program jar [b.jar]


proguard-maven-plugin have required parameter: injar. it is possible
to specify only one .jar file using this parameter and I can't find
correct way to specify multiple .jar-s

I found a workaround: I can specify in options all jar files:

[project.build.finalName = a]

<options>
<option>-injars ${project.build.directory}/$
{project.build.finalName}_proguard_base.jar</option>
<option>-injars ${project.build.directory}/b.jar</option>

<option>-outjars ${project.build.directory}/c.jar</option>
</options>

and don't specify injar parameter in plugin configuration. output will
be:

[proguard] Reading program jar [a.jar]
[proguard] Reading program jar [b.jar]
[proguard] Note: duplicate definition of program class [(class from
a.jar)]
[proguard] Note: duplicate definition of program class [(another
class from a.jar)] (such lines count = .class files count from a.jar)
...
[proguard] Preparing output jar [c.jar]
[proguard] Copying resources from program jar [a_proguard_base.jar]
(filtered)
[proguard] Preparing output jar [c.jar]
[proguard] Copying resources from program jar [a_proguard_base.jar]
[proguard] Copying resources from program jar [b.jar]

So when all is done I have normal obfuscated c.jar file, the same as
after running build.xml

does any one nows how to solve it?

Vlad Skarzhevskyy

unread,
May 15, 2009, 10:28:42 AM5/15/09
to pyx4me...@googlegroups.com
Maven is designed for one artifact per pom.

For pyx4me-maven-plugins see assembly configuration option.
Also see MicroEmulator  applet build file for complete example.
Reply all
Reply to author
Forward
0 new messages