You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ra...@lga.de on 2006/05/09 16:12:15 UTC

m2: How do I expand the clean-goal?

Hi,
we have bound a source-generator on the generate-sources-phase with the
maven-antrun-plugin.
I wan't to clean the generated sources with the clean-goal, but clean is
not a Build-Lifeycle-Phase, so I can not do it at the same way.
In Maven 1 I had the pre-goal. How do I resolve my problem in maven 2 (I
have an Ant-Srcipt ready)?

Thanks
Rainer


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


Re: Re: Re: m2: How do I expand the clean-goal?

Posted by Ra...@lga.de.
That works,
Thanks
Rainer

"Henrik Mejlgaard" <hm...@gmail.com> schrieb am 09.05.2006 17:14:50:

> Syntax is something like this (from top of my head):

> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-clean-plugin</artifactId>
> <configuration>
> <filesets>
> <fileset>
> <directory>${basedir}/src/main/java</directory>
> <includes>
> <include>**/generated/**</include>
> <include>**/generated</include>
> </includes>
> </fileset>
> </filesets>
> </configuration>
> </plugin>

> /Henrik

> On 5/9/06, Rainer.Muetze@lga.de <Ra...@lga.de> wrote:
> >
> >
> > Good Idea, but how?
> >
> > I found only three parameters in the plugin-documentation, each can
handle
> > only a single directory and are read only!
> > mvn clean
> > ...
> > [INFO] Error configuring: org.apache.maven.plugins:maven-clean-plugin.
> > Reason: E
> > RROR: Cannot override read-only parameter: directory in goal:
clean:clean
> > ...
> >
> > But I need somethink like the folloing Ant-Task-Part:
> >
> > <delete verbose="false" includeEmptyDirs="true">
> >       <fileset dir="${basedir}/src/main/java" defaultexcludes="false">
> >             <include name="**/generated/**"/>
> >             <include name="**/generated"/>
> >       </fileset>
> > </delete>
> >
> > Can you tell me the configure-syntax, to do that?
> >
> > thanks
> > Rainer
> >
> >
> > "Henrik Mejlgaard" <hm...@gmail.com> schrieb am 09.05.2006
16:39:18:
> >
> > > Use the maven-clean-plugin and configure it to delete the generated
> > source
> > > folders you want.
> >
> > > /Henrik
> >
> > > On 5/9/06, Rainer.Muetze@lga.de <Ra...@lga.de> wrote:
> > > >
> > > > Hi,
> > > > we have bound a source-generator on the generate-sources-phase with
> > the
> > > > maven-antrun-plugin.
> > > > I wan't to clean the generated sources with the clean-goal, but
clean
> > is
> > > > not a Build-Lifeycle-Phase, so I can not do it at the same way.
> > > > In Maven 1 I had the pre-goal. How do I resolve my problem in maven
2
> > (I
> > > > have an Ant-Srcipt ready)?
> > > >
> > > > Thanks
> > > > Rainer
> > > >
> > > >
> > > >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >


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


Re: Re: m2: How do I expand the clean-goal?

Posted by Henrik Mejlgaard <hm...@gmail.com>.
Syntax is something like this (from top of my head):

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${basedir}/src/main/java</directory>
              <includes>
                <include>**/generated/**</include>
                <include>**/generated</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
  </plugin>

/Henrik

On 5/9/06, Rainer.Muetze@lga.de <Ra...@lga.de> wrote:
>
>
> Good Idea, but how?
>
> I found only three parameters in the plugin-documentation, each can handle
> only a single directory and are read only!
> mvn clean
> ...
> [INFO] Error configuring: org.apache.maven.plugins:maven-clean-plugin.
> Reason: E
> RROR: Cannot override read-only parameter: directory in goal: clean:clean
> ...
>
> But I need somethink like the folloing Ant-Task-Part:
>
> <delete verbose="false" includeEmptyDirs="true">
>       <fileset dir="${basedir}/src/main/java" defaultexcludes="false">
>             <include name="**/generated/**"/>
>             <include name="**/generated"/>
>       </fileset>
> </delete>
>
> Can you tell me the configure-syntax, to do that?
>
> thanks
> Rainer
>
>
> "Henrik Mejlgaard" <hm...@gmail.com> schrieb am 09.05.2006 16:39:18:
>
> > Use the maven-clean-plugin and configure it to delete the generated
> source
> > folders you want.
>
> > /Henrik
>
> > On 5/9/06, Rainer.Muetze@lga.de <Ra...@lga.de> wrote:
> > >
> > > Hi,
> > > we have bound a source-generator on the generate-sources-phase with
> the
> > > maven-antrun-plugin.
> > > I wan't to clean the generated sources with the clean-goal, but clean
> is
> > > not a Build-Lifeycle-Phase, so I can not do it at the same way.
> > > In Maven 1 I had the pre-goal. How do I resolve my problem in maven 2
> (I
> > > have an Ant-Srcipt ready)?
> > >
> > > Thanks
> > > Rainer
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Antwort: Re: m2: How do I expand the clean-goal?

Posted by Ra...@lga.de.
Good Idea, but how?

I found only three parameters in the plugin-documentation, each can handle
only a single directory and are read only!
mvn clean
...
[INFO] Error configuring: org.apache.maven.plugins:maven-clean-plugin.
Reason: E
RROR: Cannot override read-only parameter: directory in goal: clean:clean
...

But I need somethink like the folloing Ant-Task-Part:

<delete verbose="false" includeEmptyDirs="true">
      <fileset dir="${basedir}/src/main/java" defaultexcludes="false">
            <include name="**/generated/**"/>
            <include name="**/generated"/>
      </fileset>
</delete>

Can you tell me the configure-syntax, to do that?

thanks
Rainer


"Henrik Mejlgaard" <hm...@gmail.com> schrieb am 09.05.2006 16:39:18:

> Use the maven-clean-plugin and configure it to delete the generated
source
> folders you want.

> /Henrik

> On 5/9/06, Rainer.Muetze@lga.de <Ra...@lga.de> wrote:
> >
> > Hi,
> > we have bound a source-generator on the generate-sources-phase with the
> > maven-antrun-plugin.
> > I wan't to clean the generated sources with the clean-goal, but clean
is
> > not a Build-Lifeycle-Phase, so I can not do it at the same way.
> > In Maven 1 I had the pre-goal. How do I resolve my problem in maven 2
(I
> > have an Ant-Srcipt ready)?
> >
> > Thanks
> > Rainer
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >


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


Re: m2: How do I expand the clean-goal?

Posted by Henrik Mejlgaard <hm...@gmail.com>.
Use the maven-clean-plugin and configure it to delete the generated source
folders you want.

/Henrik

On 5/9/06, Rainer.Muetze@lga.de <Ra...@lga.de> wrote:
>
> Hi,
> we have bound a source-generator on the generate-sources-phase with the
> maven-antrun-plugin.
> I wan't to clean the generated sources with the clean-goal, but clean is
> not a Build-Lifeycle-Phase, so I can not do it at the same way.
> In Maven 1 I had the pre-goal. How do I resolve my problem in maven 2 (I
> have an Ant-Srcipt ready)?
>
> Thanks
> Rainer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>