ops4j/peaberry

Build doesnt work in OSX

mcculls opened this issue · 5 comments

Originally reported on Google Code with ID 57

Get the latest from trunk on to OSX and try to build it with mvn clean install. It will
barf when processing proguard:

[INFO] proguard jar: /Users/ydewit/.m2/repository/net/sf/proguard/proguard/4.3/proguard-4.3.jar
 [proguard] ProGuard, version 4.3
 [proguard] Reading program directory [/Users/ydewit/PERSONAL/Workspaces/peaberry-read-only/peaberry/target/classes_proguard_base]
(filtered)
 [proguard] Reading library jar [/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/rt.jar]
 [proguard] Error: Can't read [/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/rt.jar]
(No such file or directory)

Reported by ydewit on 2011-04-04 05:23:39

This is an issue we have dealt before. The solution is to:
1) Remove the --libraryjars <java.home>/lib/rt.jar from peaberry/proguard.conf
2) Edit peaberry/pom.xml
    2.1) Add default properties:
        <properties>
                        <proguard.rt.jar>${java.home}/lib/rt.jar</proguard.rt.jar>
                       <proguard.jsse.jar>${java.home}/lib/jsse.jar</proguard.jsse.jar>
        </properties>
   2.2) Add a profile for OSX:
        <profile>
            <id>mac</id>
            <activation>
                <os>
                    <family>mac</family>
                </os>
            </activation>
            <properties>                    <proguard.rt.jar>${java.home}/../Classes/classes.jar:${java.home}/../Classes/ui.jar</proguard.rt.jar>
                <proguard.jsse.jar>${java.home}/../Classes/jsse.jar</proguard.jsse.jar>
            </properties>
        </profile>
   2.3) Add the following options to the proguard plugin:
            <options>
                <option>-libraryjars ${proguard.rt.jar}</option>
                <option>-libraryjars ${proguard.jsse.jar}</option>
            </options>

Reported by ydewit on 2011-04-04 05:27:20

After making the changes above I was able to build on OSX

Reported by ydewit on 2011-04-04 05:27:42

If you incorporate the changes above I can verify.

Reported by ydewit on 2011-04-04 05:30:52

Fixed in r835

Reported by mcculls on 2011-04-05 21:50:10

  • Status changed: Fixed
I have verified that the mvn clean install works out of the box now on OSX.

Reported by ydewit on 2011-04-05 22:26:56