Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip
titleHandy Hint

If you have to set more than one jar in your bootClasspath you need to separate them according to your platform (';' on Windows and ':' on Unix). The simplest way to support multi-plateform environment is to use ${path.separator} so you would have for example :

No Format
<bootclasspath>${settings.localRepository}/com/sun/rt/1.4.2_13/rt-1.4.2_13.jar${path.separator}${java.home}/lib/jsse.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath>

In this thread:

http://mail-archives.apache.org/mod_mbox/maven-users/200702.mbox/%3C8770432.post@talk.nabble.com%3E

James Wiltshire found a way to obtain the desired result without needing to specify the bootclasspath.

An example that has source and target at 1.4 and 1.5 for production and test source, respectively:

No Format

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>java-1.4-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <source>1.4</source>
                            <target>1.4</target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>java-1.5-compile</id>
                        <phase>process-test-sources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <source>1.5</source>
                            <target>1.5</target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>