Reputation: 4619
I have two GAE Java projects, A and B. I want to use some of the mature classes from A in B (and continue to use them in A too, of course). Both projects were created using maven and then imported into Eclipse (in my mind, this kinda makes maven primary and Eclipse secondary :-).
What is the best way to do this, keeping maven primary?
I expect the solution will be something like:
Hopefully after this I will be able to run and test (mostly done by running mvn appengine:devserver
) A and B independent of each other.
My knowledge of maven is limited, so how do I create (e.g., which archetype to use) this project C such that:
mvn appengine:devserver
If there is a better but completely different solution, I wouldn't mind considering that too.
Configuration:
Thanks!!
Upvotes: 0
Views: 178
Reputation: 181
Regarding which archetype to use, you can use maven quickstart archetype:
mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart
from : https://maven.apache.org/archetype/maven-archetype-bundles/maven-archetype-quickstart/
Upvotes: 1
Reputation: 8869
Well, you are very close to the "good and right" solution. You write it in your question :-)
Note that as you have mentioned, if there is any change in project C, projects A+B will have to be re-compiled.
Of course, C.JAR is ready for use and there it is not related to any IDE such as Eclipse.
Upvotes: 1