profiling the bootstrap classes for proguard in maven


Obsoluted by a new blog entry: proguard-with-maven

<project>
  <properties>
    <!-- default path for Windows -->
    <java.bootstrap.classes>${java.home}/lib/rt.jar</java.bootstrap.classes>
    <java.cryptographic.extension.classes>${java.home}/lib/jce.jar</java.cryptographic.extension.classes>
    <java.secure.socket.extension.classes>${java.home}/lib/jsse.jar</java.secure.socket.extension.classes>
  </properties>
  <build>
    <plugins>
      <plugin>
        <!--groupId>com.pyx4me</groupId-->
        <groupId>com.github.wvengen</groupId>
        <artifactId>proguard-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>proguard</id>
            <phase>package</phase>
            <goals>
              <goal>proguard</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <injar>${project.build.finalName}-jar-with-dependencies.jar</injar>
          <outjar>${project.buil.finalName}-proguarded</outjar>
          <options>
            <option>-keep public class * { *; }</option>
          </options>
          <libs>
            <lib>${java.bootstrap.classes}</lib>
            <lib>${java.cryptographic.extension.classes}</lib>
            <lib>${java.secure.socket.extension.classes}</lib>
          </libs>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>net.sf.proguard</groupId>
            <artifactId>proguard-base</artifactId>
            <version>x.x</version>
            <scope>runtime</scope>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>mac</id>
      <activation>
        <os>
          <family>mac</family>
        </os>        
      </activation>
      <properties>
        <!-- path for OS X -->
        <java.bootstrap.classes>${java.home}/../Classes/classes.jar</java.bootstrap.classes>
        <java.cryptographic.extension.classes>${java.home}/../Classes/jce.jar</java.cryptographic.extension.classes>
        <java.secure.socket.extension.classes>${java.home}/../Classes/jsse.jar</java.secure.socket.extension.classes>
      </properties>
    </profile>
  </profiles>
</project>
Advertisements

One comment

  1. Pingback: proguard-with-maven | jinahya

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s