maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Eckenfels <>
Subject Re: How to exclude directory in Maven in basedir from adding sources torelease?
Date Thu, 29 Jan 2015 20:31:56 GMT
In your case you need to also exclude the target/ directory.

 However I am not sure if that kind of resource 'abuse' should be done.


----- Ursprüngliche Nachricht -----
Von: "Stefan Miklosovic" <>
Gesendet: ‎29.‎01.‎2015 21:26
An: "Maven Users List" <>
Betreff: How to exclude directory in Maven in basedir from adding sources torelease?


I have parent pom.xml and I have modules there, structure is like this:


When I want to release this project, I do it like

mvn release:prepare release:perform

What it does is that when I look into sources of parent project (pom.xml project), I can see
that contains all directories including some_dir1, some_dir2 and README.adoc

I want to exclude these directories and README.adoc from being in resulting parent sources
release zip.

My initial approach was like this in root pom.xml


But that fails. The first module1 said that:

Failed to execute goal org.apache.maven.plugins:maven-source-plugin:2.2.1:jar-no-fork (attach-sources)
on project module1: Error creating source archive: A zip file cannot include itself ->
[Help 1]

How do I get rid of these directories in a resulting sources release zip archive?


Stefan Miklosovic
Red Hat Brno - JBoss Mobile Platform

irc: smikloso

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message