Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Maven could apply same strategy: generate a consumer-only POM when publishing artifacts to a repository, with minimal information. The original POM is then called "build" POM since it contains instructions to build the artifact and the generated simplified POM is called "consumer" POM since it's intended for artifact consumers. Once this is done, we can have new build POM versions, which will require newer Maven versions to build, while consumer POM remains compatible with classical POM v4: the only requirement is to be able to generate a consumer POM (a simplified POM v4) from the original build POM used during build: flatten-maven-plugin has already proven that generating a simplified POM from the original POM and publishing it to Maven repository is feasible.

The consumer-only POM will also be easier to explain and document consumer features, without being disturbed by build content.

Special case: parent POMs (packaging=pom)

...

Consumer POM file name does not really have a meaning, but if it had, it would remaing remain as pom.xml.

Build POM file name, while updating POM format, could be changed to something like build.xml, build.pom, or even build.json or build.yaml: not sure this would be a good idea, but at least, we can.

Consumer POM fields

First step is to define which fields from POM v4 we want to keep in consumer POM: (minus) removed, (plus) kept because required, (thumbs up) kept by choice (could be removed if we decide), (warning) keep only a part of content

...