You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nasrin_a <na...@gmail.com> on 2009/02/07 07:45:27 UTC
maven-war-plugin
hi all
i have a web application & i build my project by maven,
now i have a new request :obfuscatation of this project ,
for this request i used war plugin
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>true</archiveClasses>
</configuration>
</plugin>
then obfuscatated archive classes ,
now i want to copy this obfuscatated jar file to /WEB-INF/lib in my war
file,
but i dont know how to do this.(i dont want to use other plugin if possible)
would you please help me?
thanks.
--
View this message in context: http://www.nabble.com/maven-war-plugin-tp21885603p21885603.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-war-plugin
Posted by "David C. Hicks" <dh...@i-hicks.org>.
You probably want to have a look at the multi-module example from The
Definitive Guide:
http://www.sonatype.com/books/maven-book/reference/multimodule.html
You'll see a simple example there how multiple modules in your Maven
project can allow one module to use another as a dependency.
Nasrin_a wrote:
> How ?
> please give me a sample .
> i obfuscated my project into package phase with proguard-maven-plugin:
> <plugin>
> <groupId>com.pyx4me</groupId>
> <artifactId>proguard-maven-plugin</artifactId>
> <executions>
> <execution>
> <phase>package</phase>
> <goals>
> <goal>proguard</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <obfuscate>true</obfuscate>
> <includeDependency>false</includeDependency>
> <injar>${project.build.finalName}.jar</injar>
> <outjar>${project.build.finalName}-obf.jar</outjar>
>
> <outputDirectory>${project.build.directory}</outputDirectory>
> <maxMemory>512m</maxMemory>
> <libs>
> <lib>${java.home}/lib/rt.jar</lib>
> </libs>
> <options>
> <option>-dontshrink -keep public class * extends
> javax.servlet.Servlet</option>
> <option>-dontoptimize</option>
> <option>-dontpreverify</option>
> <option>-target 1.6</option>
> <option>-ignorewarnings</option>
> </options>
> </configuration>
> </plugin>
>
> and after package i can't copy obfuscated jar to war file .
>
> is this right?
>
> thanks.
>
>
>
>
> dchicks wrote:
>
>> It sounds to me like you want another module in your project that
>> creates the obfuscated jar as its artifact, then have the war module
>> depend on that obfuscated jar. The war plugin would pick up the
>> obfuscated one and build the war with it.
>>
>>
>> Nasrin_a wrote:
>>
>>> hi all
>>> i have a web application & i build my project by maven,
>>> now i have a new request :obfuscatation of this project ,
>>> for this request i used war plugin
>>> <plugin>
>>> <artifactId>maven-war-plugin</artifactId>
>>> <configuration>
>>> <archiveClasses>true</archiveClasses>
>>> </configuration>
>>> </plugin>
>>> then obfuscatated archive classes ,
>>>
>>> now i want to copy this obfuscatated jar file to /WEB-INF/lib in my war
>>> file,
>>> but i dont know how to do this.(i dont want to use other plugin if
>>> possible)
>>>
>>> would you please help me?
>>>
>>> thanks.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-war-plugin
Posted by Nasrin_a <na...@gmail.com>.
How ?
please give me a sample .
i obfuscated my project into package phase with proguard-maven-plugin:
<plugin>
<groupId>com.pyx4me</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<obfuscate>true</obfuscate>
<includeDependency>false</includeDependency>
<injar>${project.build.finalName}.jar</injar>
<outjar>${project.build.finalName}-obf.jar</outjar>
<outputDirectory>${project.build.directory}</outputDirectory>
<maxMemory>512m</maxMemory>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
</libs>
<options>
<option>-dontshrink -keep public class * extends
javax.servlet.Servlet</option>
<option>-dontoptimize</option>
<option>-dontpreverify</option>
<option>-target 1.6</option>
<option>-ignorewarnings</option>
</options>
</configuration>
</plugin>
and after package i can't copy obfuscated jar to war file .
is this right?
thanks.
dchicks wrote:
>
> It sounds to me like you want another module in your project that
> creates the obfuscated jar as its artifact, then have the war module
> depend on that obfuscated jar. The war plugin would pick up the
> obfuscated one and build the war with it.
>
>
> Nasrin_a wrote:
>> hi all
>> i have a web application & i build my project by maven,
>> now i have a new request :obfuscatation of this project ,
>> for this request i used war plugin
>> <plugin>
>> <artifactId>maven-war-plugin</artifactId>
>> <configuration>
>> <archiveClasses>true</archiveClasses>
>> </configuration>
>> </plugin>
>> then obfuscatated archive classes ,
>>
>> now i want to copy this obfuscatated jar file to /WEB-INF/lib in my war
>> file,
>> but i dont know how to do this.(i dont want to use other plugin if
>> possible)
>>
>> would you please help me?
>>
>> thanks.
>>
>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/maven-war-plugin-tp21885603p21886543.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-war-plugin
Posted by "David C. Hicks" <dh...@i-hicks.org>.
It sounds to me like you want another module in your project that
creates the obfuscated jar as its artifact, then have the war module
depend on that obfuscated jar. The war plugin would pick up the
obfuscated one and build the war with it.
Nasrin_a wrote:
> hi all
> i have a web application & i build my project by maven,
> now i have a new request :obfuscatation of this project ,
> for this request i used war plugin
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <archiveClasses>true</archiveClasses>
> </configuration>
> </plugin>
> then obfuscatated archive classes ,
>
> now i want to copy this obfuscatated jar file to /WEB-INF/lib in my war
> file,
> but i dont know how to do this.(i dont want to use other plugin if possible)
>
> would you please help me?
>
> thanks.
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org