You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »

This document is intended for end users of Apache Maven that look into upgrading from version 2.x to 3.x and provides an overview of potential effects on existing builds.

General Changes

profiles.xml

The support for profiles outside of the POM or the settings.xml has been removed in version 3.x and users that previously used this feature are advised to move the affected profiles into their settings.xml.

Non-unique Snapshot Deployments

The setting <uniqueVersion>false</uniqueVersion> for a distribution repository has no effect in version 3.x, snapshot artifacts will always be deployed using a timestamped version.

Site and Reporting

A major aim of the refactoring in Maven 3.x was to decouple the Maven core from Doxia and to allow arbitrary reporting systems to be developed. For this reason, all reporting related code has been removed from the core of Maven 3. As a result, the 2.x versions of the Maven Site Plugin will no longer work with Maven 3. Development of an updated version of the Maven Site Plugin has already been started.
See Maven+3.x+and+site+plugin

In the same context, the default execution of site:attach-descriptor has been removed from the lifecycle bindings for projects with packaging "pom".

Legacy-style Repositories

Maven 3.x no longer supports repositories using <layout>legacy</layout>. Users that need to access repositories created with Maven 1.x are advised to use a repository manager that is capable of providing a Maven 2.x compatible view of the legacy repository.

Automatic Plugin Version Resolution

When a plugin was invoked without an explicit version given in the POM or on the command line, Maven 2.x used to pick the latest version available where the latest version could either be a release or a snapshot. For the sake of stability, Maven 3.x prefers the latest release version over the latest snapshot version.

Given the threat of non-reproducible builds imposed by automatic plugin version resolution, this feature is scheduled for removal as far as plugin declarations in the POM are concerned. Users of Maven 3.x will find it output a warning when missing plugin versions are detected to encourage the addition of plugin versions to the POM or one of its parent POMs.

Plugin Metaversion Resolution

Internally, Maven 2.x used the special version markers RELEASE and LATEST to support automatic plugin version resolution. These metaversions were also recognized in the <version> element for a <plugin> declaration. For the sake of reproducible builds, Maven 3.x no longer supports usage of these metaversions in the POM. As a result, users will need to replace occurrences of these metaversions with a concrete version.

Legacy-style Reactor Mode using Includes/Excludes

Maven 3 dropped support for the command-line parameter --reactor to build sub projects selected by glob patterns. Future development will focus on improvements to the make-like reactor mode that provides similar functionality but is aware of the project hierarchy.

Plugin Compatibility Matrix

The table below indicates which plugins are affected by the API changes in Maven 3.x and might not function properly. Please note that the table is not complete, e.g. not all versions of a particular plugin were tested but usually only the latest release version. Also, these results were derived from the integration tests of the plugins, features of the plugin that are not covered by tests are of unknown status.

Symbol Legend:
(tick) No known incompatibilities
(warning) Some incompatibilities
(error) Incompatible
(question) Not tested

Plugins Maintained by the Apache Maven Community

Plugin

Version

Status

Comments

Maven Ant Plugin

2.2

(tick)

 

Maven AntRun Plugin

1.3

(tick)

 

Maven Assembly Plugin

2.2-beta-4

(warning)

Goal invocations that employ the archiverConfig parameter or the <containerDescriptorHandler>/<configuration> element in an assembly descriptor will fail due to a linkage error.

Maven Clean Plugin

2.3

(tick)

 

Maven Compiler Plugin

2.0.2

(tick)

 

Maven Dependency Plugin

2.0

(tick)

 

Maven Deploy Plugin

2.4

(tick)

 

Maven DOAP Plugin

1.0

(tick)

 

Maven Documentation Checker Plugin

1.0

(tick)

 

Maven EAR Plugin

2.3.2

(tick)

 

Maven Eclipse Plugin

2.7

(error)

The plugin uses low-level APIs for dependency resolution that can't be supported by the new repository system in Maven 3.x.

Maven EJB Plugin

2.2

(tick)

 

Maven Enforcer Plugin

1.0-beta-1

(tick)

 

Maven GPG Plugin

1.0-alpha-4

(tick)

 

Maven Help Plugin

2.1

(warning)

The describe goal from version 2.1 of the plugin bypasses interface abstractions to access internal classes of the underlying IoC container which have changed in Maven 3. The plugin's head revision has already been fixed, in the meantime users can employ version 2.0 of the plugin which is not affected.

Maven Install Plugin

2.3

(tick)

 

Maven Invoker Plugin

1.3

(tick)

 

Maven JAR Plugin

2.2

(tick)

 

Maven Jarsigner Plugin

1.1

(tick)

 

Maven Patch Plugin

1.1

(tick)

 

Maven Plugin Plugin

2.5

(tick)

 

Maven RAR Plugin

2.2

(tick)

 

Maven Reactor Plugin

1.0

(error)

The plugin uses command line parameters that are no longer supported by Maven 3. The make-like reactor mode offered by the plugin is however natively supported by Maven 3.

Maven Remote Resources Plugin

1.0

(tick)

 

Maven Repository Plugin

2.2

(tick)

 

Maven Resources Plugin

2.4

(tick)

 

Maven Shade Plugin

1.2.1

(tick)

 

Maven Site Plugin

2.0.1

(error)

A major objective of the refactoring in Maven 3.x was to completely decouple the reporting from the core to open the door for alternative reporting systems. This makes the Site Plugin in its current form unusable, development of an updated version is in progress.

Maven Source Plugin

2.1

(tick)

 

Maven Surefire Plugin

2.4.3

(tick)

 

Maven Verifier Plugin

1.0-beta-1

(tick)

 

Maven WAR Plugin

2.1-beta-1

(tick)

 

Plexus Maven Plugin

1.3.4

(warning)

Plugin versions before 1.3.5 produce bad component descriptors that miss list-/map-typed component requirements in combination with Maven 3.x. Note: The latest releases of this plugin employ a new artifact id, namely plexus-component-metadata.

Plugins Maintained by the Mojo Community

Plugin

Version

Status

Comments

JavaCC Maven Plugin

2.5

(tick)

 

  • No labels