Raphaël,
        Thank you for your reply, that outlined list your created of the
steps is exactly what I did, and a good bit more accurate than what I
typed in my last email,


         "What i am not sure to understand is what you expected to have instead 
of
           what you got."
            - Raphaël Piéroni


        What I expected to have was a combined pom.xml of the the two
Archtypes, provided there would have been no conflicting elements
inside the two prototype prom.xml files.

        For instance,
        
        Say that the prototype pom.xml of the Java6Archetype I created would
contain the following unique lines:

<project>
        ...
  <build>
        <plugins>
          <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                </configuration>
          </plugin>
        </plugins>
  </build>
        ...
</project>
****prototype pom.xml of the Java6Archetype****

And that the JUnit4Archetype prototype pom.xml would have the
following unique lines:

<project>
...
<dependencies>
...
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.0</version>
      <scope>test</scope>
    </dependency>
...
</dependencies>
</project>
****prototype pom.xml of the JUnit4Archetype****

I was under the impression that if you ran "mvn archetype:create"
twice on the same resulting project (TestLayered), that the result
would be a pom.xml file that would contain:
- the build-plugin settings from the prototype pom.xml of the Java6Archetype
-and-
- the junit4 dependencies from the prototype pom.xml of the Unit4Archetype.

What lead me to believe this was the statement in the Guide to
Creating Archetypes documentation (which I mentioned in my previous
email) mainly:


An optional <allowPartial>true</allowPartial>  tag makes it possible
to run the archetype:create  even on existing projects.


Now my question is if there is indeed anyway to do what I mentioned
above, since it would allow me to very easily create a system that
would configure the project (for JUnit, Hibernate, Spring, etc...), by
running several different pre-configured archetypes on the same
project.

Thank you,
    Andrew J. Leer

On 8/30/07, Raphaël Piéroni <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am not sure to well understand what you meant.
> Here comes what i have understood, plesae correct me if i am wrong:
> - you did mvn archetype:create -DarchetypeArtifactId=java6archetype
> -DartifactId=TestLayer
> - you obtained the TestLayer folder in the directory you executed the mvn
> comand
> - that folder contains the TestLayer project created from the choosen Java6
> archetype
> - you changed directory to that folder
> - you then did archetype:create -DarchetypeArtifactId=Junit4achetype
> -DartifactId=TestLayer
> - you obtained a modification of the TestLayer project's pom and file
> structure.
>
> What i am not sure to understand is what you expected to have instead of
> what you got.
>
> Regards,
>
> Raphaël Piéroni
>
> 2007/8/30, Andrew Leer <[EMAIL PROTECTED]>:
> >
> > I am certain that I have misinterpreted the meaning of this piece of
> > documentation:
> >
> > Guide to Creating Archetypes
> > - (http://maven.apache.org/guides/mini/guide-creating-archetypes.html)
> >    | - 2. Create the archetype descriptor
> >
> >         An optional <allowPartial>true</allowPartial>  tag makes it
> > possible to run the
> >         archetype:create  even on existing projects.
> >
> > I thought that this meant that I could create several of my own
> > archetypes and than generate a single project; running the
> > archtype:create command over the generated project several times until
> > the accumulated properties of each archetype were all added to that
> > single project.
> >
> > ****Begin Example****
> >
> > If I have the following Archetypes installed in M2_REPO:
> > - Java6Archetype
> > - JUnit4Archetype
> >
> > And I create a project called TestLayered Project using the
> > Java6Archetype above and the archetype:create command.
> >
> > I should then be able to run the JUnit4Archetype with the
> > archetype:create command over top of the existing TestLayered Project
> > resulting in a blending of the two archetypes within the TestLayered
> > Project.
> >
> > ****End Example****
> >
> > This is what I believed the documentation meant by:
> >
> >          "An optional <allowPartial>true</allowPartial>  tag makes it
> > possible to run the
> >          archetype:create  even on existing projects."
> >
> > I now realize that this is wrong.  Is there anyway to implement this
> > sort of "mixing" and "matching" or "layering" of Archtypes in a single
> > project?
> >
> > Also, what did the documentation mean by the statement above?  I read
> > elsewhere that it has something to do with modular builds.
> >
> > Thank you,
> >         Andrew J. Leer
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to