Hi Jo, 

I don't think that it's necessarily a specific m2e thing you need to do to 
achieve that but rather the standard maven way.

I assume since it is one checkout from SVN that all your sources, resources, 
binaries are in different folders.

The following possibilities would now be available:

1.) Generate the POM for each artifact and create an additional parent project 
that contains those projects as modules. Either directly in the checkout's root 
or another folder. This could lead to the following structure:

/svn/project1
/svn/project2
/svn/project3
/svn/pom.xml or /svn/root/pom.xml

Then you can import the different projects into Eclipse using m2e as different 
projects.

2.) create one project for your checkout and organize it internally using the 
multiple source/resource folders using build helper. Then you could create the 
different artifacts e.g. using the assembly plugin and attach them to your 
project.

This has the problem that it's not the Maven approach exactly and that the 
assembly plugin doesn't work well directly inside Eclipse. But to build the 
real artifacts you could still use a Maven run configuration or trigger it 
through the command line or something like that. Also you would lose to deploy 
the different artifacts with different artifact/groupids since they would be 
other qualifiers for the same artifact.

3.) Create one pom for the project itself and use other projects that depend on 
it and extract stuff to build different other artifacts based on the one 
project (we use an approach like that to build some tools that are based of our 
standard projects) The caveat with that solution is that the building of the 
different extra projects is only available on the command line/through a maven 
run configuration because the assembly and dependency plugins are currently not 
useful inside of m2e.

Without knowing more about your scenario that would be my suggestions.

Regards,
Johannes


Am Freitag, 18. Januar 2013 um 20:36 schrieb Toolforger:

> Hi all,
> 
> I have a single tree of sources, resources and binaries, and I need to 
> massage this into multiple Maven artifacts.
> I want to avoid having to keep multiple copies of that project on disk 
> (it's an SVN checkout, and having multiple copies might end me in 
> different parts at different revision levels).
> 
> I know how to set up a pom for each artifact that I wish to generate, 
> but what's the best way to organize a single source tree and multiple 
> poms with m2e?
> 
> Regards,
> Jo
> _______________________________________________
> m2e-users mailing list
> [email protected] (mailto:[email protected])
> https://dev.eclipse.org/mailman/listinfo/m2e-users
> 
> 


_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to