Maven 2 & 3

Update Java requirement to 1.5

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.1.0
  • Fix Version/s: 2.2.0
  • Component/s: None
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

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).

Issue Links

Activity

Hide
John Casey added a comment -

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.

Show
John Casey added a comment - 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.
Hide
John Casey added a comment -

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

Show
John Casey added a comment - this should work now. I've tested it using the unit test with JDK 1.4
Hide
John Casey added a comment -

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.

Show
John Casey added a comment - 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.
Hide
John Casey added a comment -

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.

Show
John Casey added a comment - 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.
Hide
John Casey added a comment -

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.

Show
John Casey added a comment - 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.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: