You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by wendellGee <pe...@yahoo.com> on 2008/01/18 23:52:05 UTC

How to create a jar that uses a subset of files in the source directory ?

I am reading that it is easy to do with profiles- as I read from the Maven
site :

If you are producing a JAR that is a derivative of the original (eg, just a
subset of classes, or the same JAR with debugging enabled), the Maven
supports this completely using profiles. See Introduction to Profiles for
more information.  



 I read the page in detail but still cannot figure out how. You can't
overwrite the source directory, so how do you tell maven that when running a
specific profile, you only want to include a subset of the main source
directory?

I can't find any examples of this and I haven't been  able to figure it out
by trial and error. Thanks in advance for any help.

-- 
View this message in context: http://www.nabble.com/How-to-create-a-jar-that-uses-a-subset-of-files-in-the-source-directory---tp14961436s177p14961436.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How to create a jar that uses a subset of files in the source directory ?

Posted by Dennis Lundberg <de...@apache.org>.
Starting with version 2.2 of maven-jar-plugin, you can use

<excludes>
   <exclude></exclude>
</excludes>

and

<includes>
   <include></include>
</includes>

in your configuration.

wendellGee wrote:
> I am reading that it is easy to do with profiles- as I read from the Maven
> site :
> 
> If you are producing a JAR that is a derivative of the original (eg, just a
> subset of classes, or the same JAR with debugging enabled), the Maven
> supports this completely using profiles. See Introduction to Profiles for
> more information.  
> 
> 
> 
>  I read the page in detail but still cannot figure out how. You can't
> overwrite the source directory, so how do you tell maven that when running a
> specific profile, you only want to include a subset of the main source
> directory?
> 
> I can't find any examples of this and I haven't been  able to figure it out
> by trial and error. Thanks in advance for any help.
> 


-- 
Dennis Lundberg

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