Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Tip
titlemaven repository

When building Geronimo 2.2. Add the following to your settings.xml for maven so that you can avoid the redirect (and hence avoid the bogus poms/jars) and get beyond compilation failure problem to build Geronimo using maven. See this message for more details.

Code Block
xml
xml
titleexcerpt of setting.xml for mavenxml
...
   <mirrors>
       <mirror>
           <id>java.net</id>
           <name>Mirror of https://maven-repository.dev.java.net/nonav/repository/</name>
           <url>http://download.java.net/maven/2/</url>
           <mirrorOf>java.net</mirrorOf>
       </mirror>
   </mirrors>
...

...

You can use geronimo-property-plugin in the pom.xml file of artifacts to set _bootClassPath_ property which is used by maven-compiler-plugin and maven-surefire-plugin as followed. The geronimo-property-plugin executes in the validate phase and sets _bootClassPath_ system property. The value of _bootClassPath_ property is set to _-Xbootclasspath/p:<path><pathSeparator><path>..._ string where each <path> is the jar file to place in the front of boot classpath.

Code Block
xml
xml
titlepom.xmlxml
...
            <plugin>
                <groupId>org.apache.geronimo.buildsupport</groupId>
                <artifactId>geronimo-property-plugin</artifactId>
                <configuration>
                    <propertyName>bootClassPath</propertyName>
                    <propertyValuePrefix>-Xbootclasspath/p:</propertyValuePrefix>
                    <classpath>
                        <dependency>
                            <groupId>org.apache.geronimo.specs</groupId>
                            <artifactId>geronimo-annotation_1.1_spec</artifactId>
                            <version>1.0.1</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.geronimo.specs</groupId>
                            <artifactId>geronimo-jaxws_2.2_spec</artifactId>
                            <version>${geronimojaxws.version}</version>
                        </dependency>
                    </classpath>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgument>${bootClassPath}</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>${bootClassPath}</argLine>
                </configuration>
            </plugin>
...

...