Say does anybody have an explanation of what
<pre>
<blockquote>
<!--
Allows archetype:create to be
called on an existing project.
-->
<allowPartial>true</allowPartial>
</blockquote>
</pre>
does in the archetype.xml file? I read that it has something to do
with running two archetypes (using archetype:create) on the same
project. But what does it do?
Thank you,
Andrew J. Leer
On 8/31/07, Raphaël Piéroni <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I tested and it seems the current implementation is bugged
>
> I send you a test i made using archetypeng (sandbox, unreleased)
>
>
>
> 2007/8/31, Andrew Leer < [EMAIL PROTECTED]>:
> > Certainly...
> >
> > Here you go....the archetypes...
> >
> > On 8/30/07, Raphaël Piéroni <[EMAIL PROTECTED]> wrote:
> > > Can you please send me the archetypes, as i am lazy to rewrite them ;-)
> > >
> > >
> > > Raphaël
> > >
> > > 2007/8/30, Andrew Leer <[EMAIL PROTECTED]>:
> > > > Yeah its definitely Friday, I know that feeling...but I do not think
> > > > you are dumb, if you don't understand what I am saying, I am just not
> > > > communicating clearly enough:
> > > >
> > > > The resulting pom.xml file I get after running "mvn archetype:create"
> > > > using the two aforementioned archetypes I mentioned above, in this
> > > > order:
> > > >
> > > > 1. Java6Archetype
> > > > 2. JUnit4Archetype
> > > >
> > > > As you can bellow the resulting pom.xml file in the Layered Test
> > > > project only matches that of the Java6Archetype, as the
> > > > JUnit4Archetype dependencies are not included in the pom.xml file.
> > > >
> > > > <project xmlns="http://maven.apache.org/POM/4.0.0"
> > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> "
> > > >
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > > > http://maven.apache.org/maven-v4_0_0.xsd ">
> > > > <modelVersion>4.0.0</modelVersion>
> > > > <groupId>com.mooo </groupId>
> > > > <artifactId>LayeredTestArtifact</artifactId>
> > > > <version>1.0-SNAPSHOT</version>
> > > > <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>
> > > > <dependencies>
> > > > <dependency>
> > > > <groupId>junit</groupId>
> > > > <artifactId>junit</artifactId>
> > > > <version> 3.8.1</version>
> > > > <scope>test</scope>
> > > > </dependency>
> > > > </dependencies>
> > > > <developers>
> > > > <developer>
> > > > <id>leeand00</id>
> > > > <name>Andrew J. Leer</name>
> > > > <email>[EMAIL PROTECTED] </email>
> > > > <url>
> > > http://www.facebook.com/p/Andrew_J_Leer/698010716</url>
> > > > </developer>
> > > > </developers>
> > > > </project>
> > > > ****Resulting pom.xml file after running "mvn archetype:create" twice
> > > > on the same project, using two different Archetypes. ****
> > > >
> > > > On 8/30/07, Raphaël Piéroni <[EMAIL PROTECTED]> wrote:
> > > > > Sorry to answer directly, but i am still not understanding well, and
> > > don't
> > > > > desire to show everybody how dumb i can be.
> > > > >
> > > > > Isn't what you've got equals what you've expected ?
> > > > >
> > > > > If not can you please show me the differences. Because, i may be
> > > somewhat
> > > > > dumb as i had a hard day work today ;-),
> > > > > but it seems to me that you ask to know how to have what you got and
> > > that's
> > > > > exactly what you've expected.
> > > > >
> > > > > I must be dumb or my english is a bit erroded
> > > > >
> > > > > Regards,
> > > > >
> > > > > Raphaël
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 2007/8/30, Andrew Leer <[EMAIL PROTECTED]>:
> > > > > >
> > > > > > 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]
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
> >
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]