Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  • These two functions need not be the same POM, but are in our current implementation
  • You can install the shared, parent POM without running the install on the children by using the parameter -N, e.g.
    • mvn -N install
      This will install the parent to your local repository (which you need to do if you change it) without running the install on the children.

Our use of parent poms

Version 2.3.0

Pom parent hierarchy:

No Format

maven-super-pom
  uimaj
    uimaj/eclipse-plugin-superpom
      (all the eclipse projects in the uima base)
    SandboxDistr
      SandboxDist/annotator-package
      (all the sandbox projects)
    uima-as
      (all the uima-as projects)

The parts common to a release are factored toward the top.

The factoring of resources and test resources in the build is such that if you specify any resource, you have to specify the ones that are the standard ones (src/main/resources and src/test/resources) if you want them included.

Parents, if edited, should be installed into your local repo - otherwise, the changes may not be picked up. Currently, it appears maven picks up the changes only for the immediate parent, not for grandparents (unless the grandparent is installed).

We do not use (at the moment) the Apache Super Pom (http://repo1.maven.org/maven2/org/apache/apache/6/apache-6.pom. One reason is that it includes the standard license and notice in the jars; we include custom license and notice files depending on the subproject, along with a Disclaimer file (while we're in incubation).

The mvn command

The mvn command documention appears when you type mvn -help. Besides the options, it takes 0 or more goals to run, and/or 0 or more life-cycle phases to run. If given a life cycle phase, such as "install", it runs all the previous phases in the life cycle, up to that point. If given a goal, such as "eclipse:eclipse", it may run life-cycle phases up to a specified point, depending on the goal implementation. For eclipse:eclipse, the documentation says it runs the phase "generate-resources" - meaning it runs all the life cycle phases up to that point.

If given multiple arguments, it does each one in sequence. e.g. mvn clean install or mvn eclipse:clean eclipse:eclipse

Useful mvn commands

mvn help:effective-pom - shows the fully inherited pom

mvn -N xxx - skip calling maven on submodules - useful when changing a parent and needing to install it.

Coding dependency scopes: compile vs. provided

...