David Legg pisze:
Just thought I'd mention a tiny improvement that could be made to the
"Your first Cocoon application using Maven 2" [1] web page.
The section titled "Creating a block" gives a maven command which uses
the deprecated goal "archetype:create" instead of "archetype:generate"
leading to the following disconcerting message during the build: -
[INFO] [archetype:create]
[WARNING] This goal is deprecated. Please use mvn archetype:generate
instead
If I use archetype:generate instead then Maven interactively asks me
some questions I have to guess the answers to ;-)
David, thanks for reporting this problem.
Anyway, it's more Maven to be blamed here that has released alpha version of Archetype 2.0 plug-in
that is picked up automatically by Maven now.
The tutorial was written at the time when there was no 2.0 version and the instructions worked just
fine. The are two possible solutions to this situation:
1. Let's switch to interactive mode and provide archetype catalog just like for example MyFaces
provides[1]. This would result in following work-flow:
mvn archetype:generate
-DarchetypeCatalog=http://cocoon.apache.org/2.2/archetype-catalog.xml
Then Maven would ask you only which exactly archetype you want to choose and interactively ask for
basic info like group/artifact id.
2. Give up interactive mode completely and stick to utterly long command by attaching another
property: -Darchetype.interactive=false and making it even longer:
mvn archetype:create -Darchetype.interactive=false -DarchetypeGroupId=org.apache.cocoon
-DarchetypeArtifactId=cocoon-22-archetype-block -DarchetypeVersion=1.0.0 -DgroupId=com.mycompany
-DartifactId=myBlock
The question is which one we prefer? What do you, dear users, think about it?
Personally, I prefer first option because three lines long command is far from
being user-friendly.
[1] http://myfaces.apache.org/archetype-catalog.xml
--
Grzegorz Kossakowski
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]