Found this issue when I first tried to use the archetype in a clean workspace following your post.
When you run the second step (mvn package -Pdraft) the activeByDefault profile is not activated and the build fails. This is documented behavior (see: http://jira.codehaus.org/browse/MNG-4917) and generally speaking is considered a better practice to explicitly activate your profiles.
The first commit makes prod and dev mutual exclusive. When the system property -Ddev is present only dev profile is activated and when the property is missing only prod profile is activated "by default".
Found this issue when I first tried to use the archetype in a clean workspace following your post.
When you run the second step (mvn package -Pdraft) the activeByDefault profile is not activated and the build fails. This is documented behavior (see: http://jira.codehaus.org/browse/MNG-4917) and generally speaking is considered a better practice to explicitly activate your profiles.
The first commit makes
prod
anddev
mutual exclusive. When the system property-Ddev
is present onlydev
profile is activated and when the property is missing onlyprod
profile is activated "by default".