Apache Maven 1.x has reached its end of life, and is no longer supported. For more information, see the announcement. Users are encouraged to migrate to the current version of Apache Maven.

Compatibility Issues

This page details some of the backwards compatibility issues that you might encounter upgrading between Maven versions, and how to update your project. You'll find here:

Changes Between Maven 1.0.2 and Maven 1.1

JDK requirement is now 1.4 and above

The JDK required to run Maven is now 1.4 or above. This does not affect what JDKs you can build your libraries for, however - you can still generate class files that will run on 1.1 JVMs as before.

Bundled Ant version changed from 1.5.3-1 to 1.6.5

While in most cases this change should be transparent, those using optional tasks will need to add them as a dependency to their plugin/project, as not all optional tasks are bundled with Maven any more.

Deprecated Plugins Removed

The following plugins are no longer distributed with Maven by default. They are still available using the plugin:download command to obtain the last version released, and the source code is available from the plugin sandbox. If there is sufficient interest in maintaining them or moving them to another project it will be considered.

  • abbot
  • appserver
  • ashkelon
  • aspectwerkz
  • caller
  • castor
  • docbook (note that there is a superior docbook plugin at the SourceForge Maven Plugins project)
  • hibernate
  • j2ee
  • jboss (can be replaced by Cargo)
  • jbuilder
  • jcoverage
  • jdee
  • jdeveloper
  • jetty (can be replaced by Cargo)
  • jnlp
  • junit-doclet
  • latex
  • latka
  • release (replaced by scm plugin)
  • repository
  • shell
  • struts
  • tjdo
  • uberjar (can be replaced by javaapp)
  • vdoclet
  • webserver
  • wizard
The default attribute in maven.xml has been deprecated

The default goal should be specified in a <defaultGoal> tag inside the <build> section of project.xml instead of maven.xml.

Implicit dependencies on JARs in Maven's lib directory

The following libraries are no longer distributed with Maven:

  • commons-digester
  • commons-graph
  • commons-lang
  • which

If a plugin did not declare a dependency but relied on its existence, it may fail to work under Maven 1.1.

In addition, the versions of some libraries have changed, which may affect plugins.

Upgrading maven.jar

If you are directly importing and using classes from this package, you may find classes from the org.apache.maven.project package are missing as they have moved. This may also apply if you are using maven-jelly-tags.

Fix: Include maven-model-3.0.1 in your project's dependencies.

Changes to org.apache.maven.project.Repository (and use of pom.repository.* in Jelly)

The Repository class now houses only the information from the project model. You may find that static methods such as splitSCMConnection and tokenizerToArray or fields such as scmType, which depended on the split function, are missing.

Fix:The static methods have been removed from the core but they exist in the RepositoryUtils class in maven-changelog-plugin if needed. All other plugins had been manually splitting the connection string. See maven-scm-plugin for an example of this. The future should see all plugins and code using Maven SCM for this task, and all dealings with an SCM system.

Use of Project.getDependencyPath and Project.getDependency

If you have a single non-JAR artifact that you resolve using this function, it will no longer be found.

Fix: Specify the type in the argument. The full form is getDependency('groupId:artifactId:type'). Type is defaulted to jar.

XML APIs

As in maven 1.0, xercesImpl,xml-apis and xml-resolver are loaded in the endorsed libraries of the JVM. You can't override them and if you use another version of xml-apis in your tests, you have to fork the JVM.

If in a custom goal or in a plugin, you use some xslt transformations, we recommend that you not use the style task in ant which will not work with all JDKs. Instead, you are encouraged to use a custom process launched in a forked JVM (like it's done in the PDF plugin for example).

Parse errors on previously 'valid' project files

project.xml files that used to work in older versions of Maven may now present parse errors. The parser in Maven 1.1 is much less tolerant of invalid project.xml files to avoid silently masking syntax errors.

Fix: Check your project file against the XSD published for the model version you are using.

Deprecated create-upload-bundle goal.

Replaced by artifact:create-upload-bundle.

New default repository

The default repository is now http://repo1.maven.org/maven/ (instead of http://www.ibiblio.org/maven/).

Issues in bundled plugins

    Each plugin has its independent release cycle. With respect to Maven 1.0.2, practically every bundled plugin has seen a major version upgrade. The following is a (certainly incomplete!) list of the most prominent, known issues:

  • Version 1.8 of the Test plugin introduced a backward compatibility issue, see the plugin home page for details.
  • Version 1.4 of the Announcement plugin has a backward compatibility issue, that also affects the xdoc plugin, see MPANNOUNCEMENT-21.

Changes Between Maven 1.1-RC1 and Maven 1.1

Upgraded plugins

Include upgraded (bug-fix) versions of the test and artifact plugin.