aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven: custom packaging of only few child modules with specific contents Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven: custom packaging of only few child modules with specific contents" Watch "Maven: custom packaging of only few child modules with specific contents" New topic
Author

Maven: custom packaging of only few child modules with specific contents

madhusudhan Jr
Greenhorn

Joined: Nov 14, 2012
Posts: 1
currently i have added maven profile concept to parent pom.xml which is creating custom client jars across the child modules.
But am getting default jar and client jars both, i need to get them separately on execution of maven package commnad, like mvn package -Pclient - only
client jars should be cretaed without default jars. Also i need to exclude or skip a module, please suggest.



My actual reuirement is i need to skip all the test packages from the child module 1 to 5, except child module 6. I need to create the module jars excluding test packages for 1to5 modules. So added the profile "client" in parent pom.xml, am able to get the custom jars but am also getting default jar with all the packages. jars are present in target folder.


Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3649
    
  17

Hi, welcome to CodeRanch!

What do you mean by skipping the test packages?

Why don't you use the standard Maven layout for test packages? Don't put them in src/main/java, put them in src/test/java instead. Maven will automatically run your tests when you compile, and exclude them from the packaging. An added bonus is that your test classes can be in the same package as the classes they're testing (e.g. com.pages.abc), and they can test package private methods.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven: custom packaging of only few child modules with specific contents