I agree with John's suggestion.
You also need to read up on SNAPSHOTs.
Check out the free books at http://maven.apache.org/articles.html and
look for best practices.
Set up a Maven repo like Nexus. This is worth the small effort for the
improvement in your life with Maven.
Even if you are a 1 man shop, it is worthwhile.
Set it up on your workstation if you have to or put it on a small server
in the cloud.
Ron
On 15/10/2012 8:20 AM, John Patrick wrote:
If this was me I would create a new pom, which would be the parent for
the 3 libraries, I would then also build at that level.
e.g.
~/mavenprojects/pom.xml (packaging pom)
~/mavenprojects/myLib1/pom.xml (packaging jar)
~/mavenprojects/myLib2/pom.xml (packaging jar)
~/mavenprojects/myLib3/pom.xml (packaging jar)
Basically that is how every project I've worked on works. You have to
define the parent and relative Path correctly in the lib projects, and
add modules into the parent pom. Basically one pom per thing,
sometimes over kill but often easier then scaling projects up or
moving between projects.
We have ~65 pom on my main project, ~15 are pom's to logically group
functionaility, some are simply a single wsdl or xsd, others are the
jpa layer.
Others might have different views but that is how I'd do it.
On 15 October 2012 12:51, Lucio Crusca <[email protected]> wrote:
Hello *,
I'm new to maven. I'd like to mavenize three projects of mine. Let's say they
are myLib1, myLib2 and myLib3. My directory structure is
~/mavenprojects/myLib1
~/mavenprojects/myLib2
~/mavenprojects/myLib3
myLib3 depends on myLib1 and myLib2; myLib2 depends only on myLib1. The three
libraries are in development stage, so I change their code very often. I need
a maven setup that, when compiling myLib3, automatically compiles myLib1 and
myLib2 also, if their source code has been changed, and recreates respective
jars. The same goes for myLib2 in respect to its myLib1 dependency.
I've tried adding myLib1 as a module of myLib2 in myLib2 pom file, but then I
had to change the packaging to "pom", which stopped maven from compiling and
packaging myLib2.
Then I considered adding the compiled jars as dependencies, but in this case I
don't have a maven repository to query, and I don't want to manually install
myLib1 and myLib2 jars, since that would keep maven from recompiling the
respective sources.
What's the correct solution in my case?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]