Conversion to Maven standard layout

The Maven standard layout simplifies POMs and makes it easier for new-comers to find their way around the different components. The basic elements are:

src/main/assembly
src/main/java
src/test/java

This pages describes how to convert to the standard layout from the following layout, which is common in older components:

src/assembly
src/java
src/test

First, create the new parent directories

src/main
src/test/java

Then move the directories as follows:

src/java => src/main/java (in Eclipse you can drag src/java and drop it in src/main)
src/test/org => src/test/java (drag src/test/org and drop in src/test/java)
assembly TBA

Various files now need to be editted:

  • pom.xml - remove <sourceDirectory> and <testSourceDirectory> elements
  • build.xml if present
    • src/java => src/main/java
    • src/test => src/test/java
    • TBA

to be completed

  • No labels