You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bogdan Minciu <bm...@pentalog.fr> on 2009/04/06 09:36:17 UTC

Maven Clean Plugin exclude target folder

Hello,

As I read from 
http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html, 
"The Maven Clean Plugin will delete the target directory by default."

But I was wondering, is there any possibility to exclude some folders 
under the /target folder from the deleted directories? For example I 
would like to delete anything under /target besides the /target/src 
folder. I tried using the <excludes> with no success. I have some useful 
.java files in there. I know this isn't the best architecture, but I am 
using some code generators that could not be configured otherwise.


Many thanks in advance,

-- 
Bogdan MINCIU
Développeur
Tél Fr : +33 (0)177 35 35 23
Tél Ro : +40 (0)268 54 77 75
17, rue M. Kogalniceanu
500090 Brasov, ROMANIA
http://www.pentalog.ro


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


IBM WSEJBDeploy

Posted by "Yanko, Curtis" <cu...@uhc.com>.
 As we embark on this little endeavor I wanted to see if anyone had some
input or experience in this area. We use Artifactory as an internal repo
and are trying to support WAS 5.1 & 6 apps.

I found the Peter Pilgrim article (
http://www.jroller.com/peter_pilgrim/entry/battling_with_maven_2_integra
ting ) but the 2006 date makes me wonder if someone hasn't improved on
this since then. I can't say that I've seen a EJB plugin with WAS
support in it so is the Peter Pilgrim approach still the way to go? 


==========
Curtis Yanko
Application & Developer Infrastructure Services
Source->Build->Deploy



This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.


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


RE: Maven Clean Plugin exclude target folder

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Agree. Everything in the target folder should be considered temporal and
wiped on a clean build. 

-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Monday, April 06, 2009 3:48 AM
To: Maven Users List
Subject: Re: Maven Clean Plugin exclude target folder

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Not sure what you are generating the sources from, but for generated
SOAP client code, we usually build this as a separate module (jar) and
have our code depend on it - saves us generating code all the time.

For other generated code (from the source tree for example) we have
taken the approach that a clean command should remove them *all* to
ensure consistency in the final artifact.  If some code lived through a
clean cycle, we argued that it could potentially cause unwanted
side-effects.

Just my two cents,

Cheers,

Johan

Bogdan Minciu wrote:
> Hello,
> 
> As I read from
>
http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_addit
ional_files.html,
> "The Maven Clean Plugin will delete the target directory by default."
> 
> But I was wondering, is there any possibility to exclude some folders
> under the /target folder from the deleted directories? For example I
> would like to delete anything under /target besides the /target/src
> folder. I tried using the <excludes> with no success. I have some
useful
> .java files in there. I know this isn't the best architecture, but I
am
> using some code generators that could not be configured otherwise.
> 
> 
> Many thanks in advance,
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ2bPMpHYnED7evioRAqH7AJ92CT5bNRLLtSsV9UBTA+v3QadJxgCeOeNE
BS1twPO7tXYZIVQlQkU8xr4=
=B+KC
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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: Maven Clean Plugin exclude target folder

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Not sure what you are generating the sources from, but for generated
SOAP client code, we usually build this as a separate module (jar) and
have our code depend on it - saves us generating code all the time.

For other generated code (from the source tree for example) we have
taken the approach that a clean command should remove them *all* to
ensure consistency in the final artifact.  If some code lived through a
clean cycle, we argued that it could potentially cause unwanted
side-effects.

Just my two cents,

Cheers,

Johan

Bogdan Minciu wrote:
> Hello,
> 
> As I read from
> http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html,
> "The Maven Clean Plugin will delete the target directory by default."
> 
> But I was wondering, is there any possibility to exclude some folders
> under the /target folder from the deleted directories? For example I
> would like to delete anything under /target besides the /target/src
> folder. I tried using the <excludes> with no success. I have some useful
> .java files in there. I know this isn't the best architecture, but I am
> using some code generators that could not be configured otherwise.
> 
> 
> Many thanks in advance,
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ2bPMpHYnED7evioRAqH7AJ92CT5bNRLLtSsV9UBTA+v3QadJxgCeOeNE
BS1twPO7tXYZIVQlQkU8xr4=
=B+KC
-----END PGP SIGNATURE-----

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