On 2010-08-20 07:38, Jack Neilson wrote: > Hi All, > > > I have a requirement to build a maven project into different jars, There are > 10 different java packages > > in the src and I want about 4 different jars to be generated from a single > pom.xml. I am trying to create > > different profile for each jar I want to create in the same pom.xml. I am > trying to use include/exclude tags to > > the include/exclude package(pattern matching). Everytime I run the pom.xml > with a specific profile it is creating the > > jar with all the packages in it. Please help.
The version of maven-compiler-plugin you are using (2.0.2) is very old (over 3.5 years old). I'd suggest you try the latest version 2.3.1. If you really (REALLY) want to go against Maven best practices and create 4 JARs from a single source tree, I would go about it another way. Instead of including/excluding during compilation I would do it during packaging, i.e. try to use includes/excludes for the JAR plugin. > > > > <plugin> > > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-resources-plugin</artifactId> > > <version>2.3</version> > > </plugin> > > <plugin> > > <artifactId>maven-compiler-plugin > > </artifactId> > > <version>2.0.2</version> > > <configuration> > > <argLine>-ea -Xmx1024m</argLine> > > <fork>true</fork> > > <source>1.5</source> > > <target>1.5</target> > > <excludes> > > <exclude>**/pojo/**</exclude> > > <exclude>**/util/**</exclude> > > </excludes> > > > > <includes> > > <include>**/moto/**</include> > > </includes> > > </configuration> > > </plugin> > > > > > Thanks in Advance! > -- Dennis Lundberg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
