You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jordan Zimmerman <jo...@jordanzimmerman.com> on 2015/08/17 01:38:21 UTC

Archetype - filter out archetype plugin

Hi,

I have an example project that also serves as source for an archetype. So, the pom has:

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-archetype-plugin</artifactId>
		….
            </plugin> 
        </plugins> 
    </build>

Of course, this means that the resulting archetype has this in its POM. Is there any way to filter this out? Is there another plugin I can use in conjunction with the archetype plugin? Or maybe this would make for a good addition to the archetype plugin itself.

Thoughts?

Re: Archetype - filter out archetype plugin

Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
I see - these are already generated archetypes. Let me be more clear: I have an example project that has the archetype plugin set to “create-from-project” and then install the archetype. 

            <plugin>
                <artifactId>maven-archetype-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>create-from-project</goal>
                        </goals>
                        <configuration>
                            <archetypePostPhase>deploy</archetypePostPhase>
                        </configuration>
                    </execution>
                    <execution>
                        <id>package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>create-from-project</goal>
                        </goals>
                        <configuration>
                            <archetypePostPhase>install</archetypePostPhase>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <propertyFile>${project.basedir}/archetype.properties</propertyFile>
                </configuration>
            </plugin>




On August 17, 2015 at 7:33:21 AM, Thomas Broyer (t.broyer@gmail.com) wrote:



On Mon, Aug 17, 2015 at 2:27 PM Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
I want the whole project as an archetype - from the parent down. You can’t make the parent pom’s packaging maven-archetype. Right?

Each module of gwt-maven-archetypes is an archetype *for a multimodule project*. (sources for each is in src/main/resources/archetype-resources though; so the projects cannot be used as examples at the same time)



On August 17, 2015 at 7:24:54 AM, Thomas Broyer (t.broyer@gmail.com) wrote:

On Mon, Aug 17, 2015 at 2:15 PM Jordan Zimmerman <jo...@jordanzimmerman.com>
wrote:

> I’m not using packaging “maven-archetype”. It doesn’t seem to work with
> multi-module projects.


Works pretty-well for me: https://github.com/tbroyer/gwt-maven-archetypes/

Re: Archetype - filter out archetype plugin

Posted by Thomas Broyer <t....@gmail.com>.
On Mon, Aug 17, 2015 at 2:27 PM Jordan Zimmerman <jo...@jordanzimmerman.com>
wrote:

> I want the whole project as an archetype - from the parent down. You can’t
> make the parent pom’s packaging maven-archetype. Right?
>

Each module of gwt-maven-archetypes is an archetype *for a multimodule
project*. (sources for each is in src/main/resources/archetype-resources
though; so the projects cannot be used as examples at the same time)


>
> On August 17, 2015 at 7:24:54 AM, Thomas Broyer (t.broyer@gmail.com)
> wrote:
>
> On Mon, Aug 17, 2015 at 2:15 PM Jordan Zimmerman <
> jordan@jordanzimmerman.com>
> wrote:
>
> > I’m not using packaging “maven-archetype”. It doesn’t seem to work with
> > multi-module projects.
>
>
> Works pretty-well for me: https://github.com/tbroyer/gwt-maven-archetypes/
>
>

Re: Archetype - filter out archetype plugin

Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
I want the whole project as an archetype - from the parent down. You can’t make the parent pom’s packaging maven-archetype. Right?

-Jordan


On August 17, 2015 at 7:24:54 AM, Thomas Broyer (t.broyer@gmail.com) wrote:

On Mon, Aug 17, 2015 at 2:15 PM Jordan Zimmerman <jo...@jordanzimmerman.com>  
wrote:  

> I’m not using packaging “maven-archetype”. It doesn’t seem to work with  
> multi-module projects.  


Works pretty-well for me: https://github.com/tbroyer/gwt-maven-archetypes/  

Re: Archetype - filter out archetype plugin

Posted by Thomas Broyer <t....@gmail.com>.
On Mon, Aug 17, 2015 at 2:15 PM Jordan Zimmerman <jo...@jordanzimmerman.com>
wrote:

> I’m not using packaging “maven-archetype”. It doesn’t seem to work with
> multi-module projects.


Works pretty-well for me: https://github.com/tbroyer/gwt-maven-archetypes/

Re: Archetype - filter out archetype plugin

Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
I’m not using packaging “maven-archetype”. It doesn’t seem to work with multi-module projects. I’m merely adding the archetype plugin to my example project and building the archetype on package phase.

-Jordan



On August 17, 2015 at 12:45:39 AM, Hervé BOUTEMY (herve.boutemy@free.fr) wrote:

Hi,  

This is unusual: how do you build it once as a project and once as an  
archetype?  

Because, in general, the build as archetype is done by definig "maven-  
archetype" packaging [1], which makes the project unusable as direct project  

Regards,  

Hervé  

[1] http://maven.apache.org/archetype/archetype-packaging/  

Le dimanche 16 août 2015 18:38:21 Jordan Zimmerman a écrit :  
> Hi,  
>  
> I have an example project that also serves as source for an archetype. So,  
> the pom has:  
>  
> <build>  
> <plugins>  
> <plugin>  
> <artifactId>maven-archetype-plugin</artifactId>  
> ….  
> </plugin>  
> </plugins>  
> </build>  
>  
> Of course, this means that the resulting archetype has this in its POM. Is  
> there any way to filter this out? Is there another plugin I can use in  
> conjunction with the archetype plugin? Or maybe this would make for a good  
> addition to the archetype plugin itself.  
>  
> Thoughts?  


---------------------------------------------------------------------  
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org  
For additional commands, e-mail: users-help@maven.apache.org  


Re: Archetype - filter out archetype plugin

Posted by Hervé BOUTEMY <he...@free.fr>.
Hi,

This is unusual: how do you build it once as a project and once as an 
archetype?

Because, in general, the build as archetype is done by definig "maven-
archetype" packaging [1], which makes the project unusable as direct project

Regards,

Hervé

[1] http://maven.apache.org/archetype/archetype-packaging/

Le dimanche 16 août 2015 18:38:21 Jordan Zimmerman a écrit :
> Hi,
> 
> I have an example project that also serves as source for an archetype. So,
> the pom has:
> 
>     <build>
>         <plugins>
>             <plugin>
>                 <artifactId>maven-archetype-plugin</artifactId>
> 		….
>             </plugin> 
>         </plugins> 
>     </build>
> 
> Of course, this means that the resulting archetype has this in its POM. Is
> there any way to filter this out? Is there another plugin I can use in
> conjunction with the archetype plugin? Or maybe this would make for a good
> addition to the archetype plugin itself.
> 
> Thoughts?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org