Maven3Embedder

Contents


Contacts/Links

maven-dev@projects.netbeans.org

Was on maven-dev branch in Mercurial; merged to trunk as of b2f6144b66d2.

Release Notes of public M3 releases

dev@maven.apache.org on GMane

Useful: MavenNbmPluginAndArchetypesReleaseGuide MavenReleaseRCPHowto

Tasks

  • IN PROGRESS initial testing and identification of problems with opening projects and editing projects properties
  • IN PROGRESS QA involvement in testing and identification of issues
  • verify the issues marked with M3EMBEDDER status whiteboard and close them as fixed
  • IN PROGRESS make sure licensing is OK for new binaries

Testing

Open issues in basic Maven support (does not include Java EE, NBM, or OSGi issues)

Report issue

Major areas to be tested

  1. The embedder, which the IDE uses to parse POMs so it can show the list of dependencies, set up the classpath for the editor, etc.
    • Projects created for Maven 2.x can be opened just as well as with an older embedder.
    • Projects using 3.x-specific features (unusual) can be opened cleanly.
    • Metadata problems - missing local dependencies, nonexistent dependencies, malformed or invalid pom.xml, etc. - are displayed gracefully in the UI, and do not cause unhandled exceptions. Both for projects opened with these problems from the start, and problems introduced while the project is open.
  2. The indexer, which the IDE uses mainly to let you search for artifacts in the repository by name.
    • Indices are complete and accurate.
    • Transfer of remote indices gracefully handles network outages.
  3. Maven builds. As of 7.0, these are always external, i.e. the IDE forks .../bin/mvn. Whereas in 6.9 the IDE by default uses whatever mvn can be found in $PATH, in 7.0 it by default uses the bundled Maven 3. Since the user can always configure another Maven installation in Options (e.g. 2.2.1), and we could easily switch the default behavior back to using mvn from $PATH where available, bugs in this category are lower priority.
    • The IDE handles Maven text output well (especially from 3.x but also from 2.x): coloration, hyperlinking, progress bar synchronization, errors.

Projects that require M3

Other complex Maven projects

Worked for me

  • Project opening, building (simple Enterprise Application)
  • pom.xml editing, completion
  • loading of remote repo indexes, finding dependencies, adding dependency, automatic load of the artifact, pom correctly modified
  • editor hint for searching in maven repos
  • creating of projects from archetypes, basic debugging and profiling

Resetting development environment

Besides starting with a fresh NB user directory (or deleting at least var/cache/mavenindex/), reproducing some Maven-related bugs may require cleaning part of your local repository. For example, to remove all snapshot artifacts and also force Maven to use the network to check for new versions of artifacts:

find ~/.m2/repository \( -name \*SNAPSHOT -prune -o -name \*.lastUpdated \) -exec rm -r {} \;

Recommended work setup

  1. File > Project Group > New Group, Name: maven-dev
  2. Create a checkout:
    1. hg clone http://hg.netbeans.org/core-main/ core-main
    2. Create nbbuild/user.build.properties with cluster.config=standard to avoid building irrelevant modules.
    3. Run: ant
    4. Delete nbbuild/netbeans/ergonomics (keep everything enabled).
    5. Open maven.* modules in IDE.
  3. Check out http://svn.apache.org/repos/asf/maven/maven-3/tags/maven-3.0-beta-2/ and:
    1. mvn -DskipTests install
    2. Open maven-* modules in IDE.
  4. Check out https://svn.apache.org/repos/asf/maven/shared/tags/maven-dependency-tree-1.2/ and:
    1. mvn install
    2. Open in IDE.
  5. Tools > Library Manager, create a library Maven3, add maven-dev/nbbuild/netbeans/java/maven/lib/maven-*.jar to Classpath, add maven-3.0-beta-2/maven-*/{src/main/java,target/generated-sources/*} and maven-dependency-tree-1.2 to Sources.

External Binaries

  • Apache Maven (of course); we now bundle an unmodified distribution. NOTICE.txt lists its contents. In summary:
    • Maven code (Apache 2).
    • Apache Plexus (Apache 2).
    • Google Collections (Apache 2).
    • Maven Wagon (Apache 2); also uses CyberNeko HTML Parser and Xerces XNI (all Apache 2) (discussion).
    • Sonatype Aether (Apache 2).
    • Google Guice (Apache 2; patched by Maven team).
    • Sonatype Sisu Inject (Apache 2).
  • JDOM 1.0 (BSD-like); OSR 3391. Unchanged in 6.10.
  • Maven Dependency Tree 1.2 (Apache 2); OSR 11089. Unchanged in 6.10.
  • Maven Indexer 3.1.0 (Apache 2); OSR 9451. Simple upgrade from the 2.0.0 (then "Nexus Indexer") in 6.9.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo