Issue Details (XML | Word | Printable)

Key: MNG-4143
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: John Casey
Reporter: John Casey
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven 2 & 3

Update Java requirement to 1.5

Created: 23/Apr/09 10:43 AM   Updated: 10/Jun/09 01:18 PM   Resolved: 10/Jun/09 01:18 PM
Component/s: None
Affects Version/s: 2.1.0
Fix Version/s: 2.2.0

Time Tracking:
Not Specified

Issue Links:
Related
 

Complexity: Intermediate


 Description  « Hide

note that the required Java version for 2.1.1 has been upgraded to 1.5.

JDK 1.4 will no longer be supported to execute Maven. We'll need to document how to configure toolchains, etc. to support building 1.4 projects using a 1.4 JDK (to avoid api incompatibilities with 1.5).



John Casey added a comment - 27/Apr/09 08:42 AM

Investigating going back to 1.4 source compat, and simply catching NoClassDefFoundError for javax.xml.xpath.* classes, then printing a large warning to the user to encourage JDK 1.5+ usage.


John Casey added a comment - 27/Apr/09 09:05 AM

this should work now. I've tested it using the unit test with JDK 1.4


John Casey added a comment - 30/Apr/09 11:38 AM

Needs documentation for users trying to build JDK 1.4 projects. If animal sniffer is the best way through for now, then let's at least document how that would work.


John Casey added a comment - 01/May/09 04:37 PM

The following configuration works for me:

<build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.0.2</version>
          <configuration>
            <source>1.4</source>
            <target>1.4</target>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    
    <plugins>
      <plugin>
        <groupId>org.jvnet</groupId>
        <artifactId>animal-sniffer</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <id>check-java-version</id>
            <phase>compile</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <signature>
                <groupId>org.jvnet.animal-sniffer</groupId>
                <artifactId>java1.4</artifactId>
                <version>1.0</version>
              </signature>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

This is for a 1.4 project, obviously. Also, I've added the http://download.java.net/maven/2 repository to the nexus configuration I use for a local repoMgr/mirror. I'll write this up in a mini-guide.


John Casey added a comment - 10/Jun/09 01:18 PM

http://maven.apache.org/guides/mini/guide-building-jdk14-on-jdk15.html

This mini-guide will be deployed shortly, once I've added a little more documentation for MNG-3203 and MNG-3401.