Thanks Ben and Steve!

-----Original Message-----
From: Stephen Connolly [mailto:[EMAIL PROTECTED] 
Sent: 29 November 2007 11:08
To: Maven Users List
Subject: Re: obfuscation

We use JavaGuard with the following in the pom.xml

You could probably adapt it to your config

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <mainClass>JavaGuard</mainClass>
                    <executable>java</executable>

<includeProjectDependencies>false</includeProjectDependencies>
 
<includePluginDependencies>true</includePluginDependencies>
                    <arguments>
                        <argument>-i</argument>

<argument>${project.build.directory}/${project.build.finalName}.jar</arg
ument>
                        <argument>-o</argument>

<argument>${project.build.directory}/${project.build.finalName}-obfuscat
ed.jar</argument>
                        <argument>-s</argument>

<argument>${basedir}/src/main/obfuscate/config.properties</argument>
                    </arguments>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>oro</groupId>
                        <artifactId>oro</artifactId>
                        <version>2.0.6</version>
                        <type>jar</type>
                    </dependency>
                    <dependency>
                        <groupId>net.sf.javaguard</groupId>
                        <artifactId>javaguard</artifactId>
                        <version>1.0beta4</version>
                        <type>jar</type>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>

<file>${project.build.directory}/${project.build.finalName}-obfuscated.j
ar</file>
                                    <classifier>obfuscated</classifier>
                                    <type>jar</type>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>


On Nov 29, 2007 10:31 AM, ben short <[EMAIL PROTECTED]> wrote:
> Have a look at the antrun plugin [1]
>
> [1] http://maven.apache.org/plugins/maven-antrun-plugin/
>
> On Nov 29, 2007 10:29 AM, Richard Chamberlain
>
> <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> >
> >
> > I've got a requirement to obfuscate the java code we produce.
> >
> >
> >
> > Currently we use yguard with ant, there doesn't seem to be a maven
> > plugin for it :-( Does anyone use yguard with maven?
> >
> >
> >
> > So I was looking for a maven-friendly obfuscator. Does anyone use
any
> > good ones?
> >
> >
> >
> > Cheers,
> >
> >
> >
> > Rich
> >
> >
> >
> > Richard Chamberlain
> > Software Engineer | Caplin Systems Ltd
> >
> > Office: +44 (0)20 7826 9639
> > Mobile: +44 (0)77 2068 6064
> > www.caplin.com <http://www.caplin.com/>
> >
> > Registered in England and Wales No. 02823818
> > Registered Office: Triton Court, Finsbury Square, London EC2A 1BR
> >
> > This message contains information which may be confidential or
> > privileged. Unless you are the addressee,
> > you may not use, copy or disclose to anyone the message or any
> > information contained in the message.
> > This message does not contain information which can be relied upon
by
> > any party unless expressly specified.
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to