You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Anuerin Diaz <ra...@gmail.com> on 2005/11/15 17:51:36 UTC

clean-triggered actions

hi,

   is there a way to trigger a plugin when the clean goal is executed
on a project? i need to clean up some files that reside outside the
build directory. i am planning to run some ant targets to do the
actual file removal but i need it to be triggered by only when clean
is invoked. currently i am deleting the files prior to compilation but
this is inefficient since most of the times these files do not change.

   thanks.

ciao!

--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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


Re: clean-triggered actions

Posted by Anuerin Diaz <ra...@gmail.com>.
it works... i documented it here ->
http://docs.codehaus.org/display/MAVENUSER/Mini+Guides

thanks.

ciao!

On 11/16/05, John Casey <jd...@commonjava.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 'clean' is actually a phase in another lifecycle, so binding to
> <phase>clean</phase> should work, I think. Try it and let us know!
>
> If it doesn't work, it probably should.
>
> Cheers,
>
> john
>
> Wim Deblauwe wrote:
> | Sorry about that, but looking closer, it seems that clean is not part
> of the
> | build cycle (see
> |
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
> | )
> |
> | so I'm afraid that this remains unanswered for now...
> |
> | regards,
> |
> | Wim
> |
> | 2005/11/15, Anuerin Diaz <ra...@gmail.com>:
> |
> |>thanks. so clean is also part of the build cycle... ill try that when
> |>i get back to the office tomorrow.
> |>
> |>ciao!
> |>
> |>On 11/15/05, Wim Deblauwe <wi...@gmail.com> wrote:
> |>
> |>>Use the antrun plugin and bind it to the clean lifecycle phase (more
> |>
> |>info
> |>
> |>>here:
> |>>http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
> |>
> |>,
> |>
> |>>heading 'Attaching the Mojo to the Build Lifecycle')
> |>>
> |>>regards,
> |>>
> |>>Wim
> |>>
> |>>2005/11/15, Anuerin Diaz <ra...@gmail.com>:
> |>>
> |>>>hi,
> |>>>
> |>>>is there a way to trigger a plugin when the clean goal is executed
> |>>>on a project? i need to clean up some files that reside outside the
> |>>>build directory. i am planning to run some ant targets to do the
> |>>>actual file removal but i need it to be triggered by only when clean
> |>>>is invoked. currently i am deleting the files prior to compilation but
> |>>>this is inefficient since most of the times these files do not change.
> |>>>
> |>>>thanks.
> |>>>
> |>>>ciao!
> |>>>
> |>>>--
> |>>>
> |>>>"Programming, an artform that fights back"
> |>>>
> |>>>Anuerin G. Diaz
> |>>>Registered Linux User #246176
> |>>>Friendly Linux Board @ http://mandrivausers.org/index.php
> |>>>http://capsule.ramfree17.org , when you absolutely have nothing else
> |>>>better to do
> |>>>
> |>>>---------------------------------------------------------------------
> |>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> |>>>For additional commands, e-mail: users-help@maven.apache.org
> |>>>
> |>>>
> |>>
> |>>
> |>
> |>--
> |>
> |>"Programming, an artform that fights back"
> |>
> |>Anuerin G. Diaz
> |>Registered Linux User #246176
> |>Friendly Linux Board @ http://mandrivausers.org/index.php
> |>http://capsule.ramfree17.org , when you absolutely have nothing else
> |>better to do
> |>
> |>---------------------------------------------------------------------
> |>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> |>For additional commands, e-mail: users-help@maven.apache.org
> |>
> |>
> |
> |
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
>
> iD8DBQFDeqZKK3h2CZwO/4URAuFsAJ9eActi3squP0QjC/CDaNj0eVqLNwCfc/rC
> IEE8PHgcwgYq0j8E9jawBTk=
> =XC+6
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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


Re: clean-triggered actions

Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

'clean' is actually a phase in another lifecycle, so binding to
<phase>clean</phase> should work, I think. Try it and let us know!

If it doesn't work, it probably should.

Cheers,

john

Wim Deblauwe wrote:
| Sorry about that, but looking closer, it seems that clean is not part
of the
| build cycle (see
|
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
| )
|
| so I'm afraid that this remains unanswered for now...
|
| regards,
|
| Wim
|
| 2005/11/15, Anuerin Diaz <ra...@gmail.com>:
|
|>thanks. so clean is also part of the build cycle... ill try that when
|>i get back to the office tomorrow.
|>
|>ciao!
|>
|>On 11/15/05, Wim Deblauwe <wi...@gmail.com> wrote:
|>
|>>Use the antrun plugin and bind it to the clean lifecycle phase (more
|>
|>info
|>
|>>here:
|>>http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
|>
|>,
|>
|>>heading 'Attaching the Mojo to the Build Lifecycle')
|>>
|>>regards,
|>>
|>>Wim
|>>
|>>2005/11/15, Anuerin Diaz <ra...@gmail.com>:
|>>
|>>>hi,
|>>>
|>>>is there a way to trigger a plugin when the clean goal is executed
|>>>on a project? i need to clean up some files that reside outside the
|>>>build directory. i am planning to run some ant targets to do the
|>>>actual file removal but i need it to be triggered by only when clean
|>>>is invoked. currently i am deleting the files prior to compilation but
|>>>this is inefficient since most of the times these files do not change.
|>>>
|>>>thanks.
|>>>
|>>>ciao!
|>>>
|>>>--
|>>>
|>>>"Programming, an artform that fights back"
|>>>
|>>>Anuerin G. Diaz
|>>>Registered Linux User #246176
|>>>Friendly Linux Board @ http://mandrivausers.org/index.php
|>>>http://capsule.ramfree17.org , when you absolutely have nothing else
|>>>better to do
|>>>
|>>>---------------------------------------------------------------------
|>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
|>>>For additional commands, e-mail: users-help@maven.apache.org
|>>>
|>>>
|>>
|>>
|>
|>--
|>
|>"Programming, an artform that fights back"
|>
|>Anuerin G. Diaz
|>Registered Linux User #246176
|>Friendly Linux Board @ http://mandrivausers.org/index.php
|>http://capsule.ramfree17.org , when you absolutely have nothing else
|>better to do
|>
|>---------------------------------------------------------------------
|>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
|>For additional commands, e-mail: users-help@maven.apache.org
|>
|>
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDeqZKK3h2CZwO/4URAuFsAJ9eActi3squP0QjC/CDaNj0eVqLNwCfc/rC
IEE8PHgcwgYq0j8E9jawBTk=
=XC+6
-----END PGP SIGNATURE-----

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


Re: clean-triggered actions

Posted by Wim Deblauwe <wi...@gmail.com>.
Sorry about that, but looking closer, it seems that clean is not part of the
build cycle (see
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
)

so I'm afraid that this remains unanswered for now...

regards,

Wim

2005/11/15, Anuerin Diaz <ra...@gmail.com>:
>
> thanks. so clean is also part of the build cycle... ill try that when
> i get back to the office tomorrow.
>
> ciao!
>
> On 11/15/05, Wim Deblauwe <wi...@gmail.com> wrote:
> > Use the antrun plugin and bind it to the clean lifecycle phase (more
> info
> > here:
> > http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
> ,
> > heading 'Attaching the Mojo to the Build Lifecycle')
> >
> > regards,
> >
> > Wim
> >
> > 2005/11/15, Anuerin Diaz <ra...@gmail.com>:
> > >
> > > hi,
> > >
> > > is there a way to trigger a plugin when the clean goal is executed
> > > on a project? i need to clean up some files that reside outside the
> > > build directory. i am planning to run some ant targets to do the
> > > actual file removal but i need it to be triggered by only when clean
> > > is invoked. currently i am deleting the files prior to compilation but
> > > this is inefficient since most of the times these files do not change.
> > >
> > > thanks.
> > >
> > > ciao!
> > >
> > > --
> > >
> > > "Programming, an artform that fights back"
> > >
> > > Anuerin G. Diaz
> > > Registered Linux User #246176
> > > Friendly Linux Board @ http://mandrivausers.org/index.php
> > > http://capsule.ramfree17.org , when you absolutely have nothing else
> > > better to do
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
>
>
> --
>
> "Programming, an artform that fights back"
>
> Anuerin G. Diaz
> Registered Linux User #246176
> Friendly Linux Board @ http://mandrivausers.org/index.php
> http://capsule.ramfree17.org , when you absolutely have nothing else
> better to do
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: clean-triggered actions

Posted by Anuerin Diaz <ra...@gmail.com>.
thanks. so clean is also part of the build cycle... ill try that when
i get back to the office tomorrow.

ciao!

On 11/15/05, Wim Deblauwe <wi...@gmail.com> wrote:
> Use the antrun plugin and bind it to the clean lifecycle phase (more info
> here:
> http://maven.apache.org/guides/plugin/guide-java-plugin-development.html,
> heading 'Attaching the Mojo to the Build Lifecycle')
>
> regards,
>
> Wim
>
> 2005/11/15, Anuerin Diaz <ra...@gmail.com>:
> >
> > hi,
> >
> > is there a way to trigger a plugin when the clean goal is executed
> > on a project? i need to clean up some files that reside outside the
> > build directory. i am planning to run some ant targets to do the
> > actual file removal but i need it to be triggered by only when clean
> > is invoked. currently i am deleting the files prior to compilation but
> > this is inefficient since most of the times these files do not change.
> >
> > thanks.
> >
> > ciao!
> >
> > --
> >
> > "Programming, an artform that fights back"
> >
> > Anuerin G. Diaz
> > Registered Linux User #246176
> > Friendly Linux Board @ http://mandrivausers.org/index.php
> > http://capsule.ramfree17.org , when you absolutely have nothing else
> > better to do
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>


--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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


Re: clean-triggered actions

Posted by Wim Deblauwe <wi...@gmail.com>.
Use the antrun plugin and bind it to the clean lifecycle phase (more info
here:
http://maven.apache.org/guides/plugin/guide-java-plugin-development.html,
heading 'Attaching the Mojo to the Build Lifecycle')

regards,

Wim

2005/11/15, Anuerin Diaz <ra...@gmail.com>:
>
> hi,
>
> is there a way to trigger a plugin when the clean goal is executed
> on a project? i need to clean up some files that reside outside the
> build directory. i am planning to run some ant targets to do the
> actual file removal but i need it to be triggered by only when clean
> is invoked. currently i am deleting the files prior to compilation but
> this is inefficient since most of the times these files do not change.
>
> thanks.
>
> ciao!
>
> --
>
> "Programming, an artform that fights back"
>
> Anuerin G. Diaz
> Registered Linux User #246176
> Friendly Linux Board @ http://mandrivausers.org/index.php
> http://capsule.ramfree17.org , when you absolutely have nothing else
> better to do
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>