Documentation on Maven Archetypes

From: Juergen Lorenz Simon (simo..ebtecc.com)
Date: Mon Nov 17 2008 - 06:31:40 EST

  • Next message: Henrique Prange: "Re: entity modeler, erprototypes and project local frameworks"

    Hi,

    I've been trying to get Maven integration up for some projects. I
    found a few
    rough edges in the documentation, especially the Wiki. When following
    the
    route given, I was not able to generate archetypes. Here are a few
    things I
    had to change, in order to make this work:

    - The archetype:create goal is deprecated. archetype:generate seems
            to be the valid command now.

    - After adding the archetypes to the archetype-catalog.xml, I was
    unable to
            create projects from archetypes. I found out, that i need to add a
    repository
            (not just pluginRepository) to the .m2/settings.xml. The file shown
    on this page:
            http://wiki.objectstyle.org/confluence/display/WOL/Quick+Start
            had to be extended a little.

            First I had to add an ID to the profile
            
            <profile>
                    <id>webobjects</id>
                    <pluginRepositories>
                    ...

            Next I had to add a repositories section (not pluginRepositories):

                    </pluginRepositories>
            
                    <repositories>
                            <repository>
                                    <id>mdimension.woproject</id>
                                    <name>MDimension WOProject Maven Repository</name>
                                    <url>http://webobjects.mdimension.com/maven2/releases>
                                    <releases>
                                            <enabled>true</enabled>
                                    </releases>
                                    <snapshots>
                                            <enabled>false</enabled>
                                    </snapshots>
                            </repository>
                    </repositories>

            And in the bottom section of my settings.xml, I found the following
    section
            where something needed adding:

                    <activeProfiles>
                    <activeProfile>xwiki</activeProfile>
                    <activeProfile>webobjects</activeProfile>
            </activeProfiles>

    - The archetype-catalog.xml attached to the following wiki page:
            
    http://wiki.objectstyle.org/confluence/display/WOL/woapplication-archetype
            states 2.0.16-SNAPSHOT as version. I had to change the version to
    2.0.16

    Now I can use the command mvn archetype:generate -
    DarchetypeCatalog=local
    and get a selection containing the woapplication and woframework
    archetypes.

    Regards,
    J.L.Simon



    This archive was generated by hypermail 2.0.0 : Mon Nov 17 2008 - 06:32:59 EST