Get Nexus <http://nexus.sonatype.org/>  for your Maven repository.
It's free, and is a true Maven repository. Originally, I was using my
own repository using SCP, but a true Maven repository has features
that Maven clients can't emulate alone.

So this is something that we would use in place of just pointing at the default central repository, right? It looks like from reading their website that we could set up an "Internet" nexus, and an internal-network Nexus,and since it's just using the filesystem, we could store the contents of the Nexus database in version control every so often. Then when we wanted to push to the internal network we would burn a CD of the Nexus files, and build as usual, and Maven would pull the files out of that repository and put them into our respective home directories on the internal network. Does that sound remotely correct?

The big difference between Ant and Maven is that Ant describes how you
do a build and Maven  describes the project and its dependencies. In
Ant, you need to figure out your dependencies on their own and make
sure they are locally available.

Maven is suppose to work out its dependency matrix. For example, you
may know you need foo.jar, and that foo.jar depends upon bar.jar which
depends upon fubar.jar and barfoo.jar. In Ant, you would have to have
all of these available before you do a build.

In Maven, you merely state that you need version 1.2 of foo.jar, and
Maven understands that you also need the other jars and what versions.

I have gotten this far - and this part is quite handy. For instance, Hibernate requries all those wierd libraries like cglib, antlr, etc and Maven just figured out that I needed them with no prompting on my part.

Unlike Ant, Maven assumes you have some sort of Maven Repository, and
that it's normally network accessible. In Maven, you don't check in
JARs and other binaries .You version them and store them in a Maven
repository for fetching. They are downloaded when you need them. Yes,
they might be cached in your ~/.m2 directory or maybe stored locally
on a internal repository.

In Maven you always need a repository. This could be your ~/.m2
directory, so if you are not connected to the Internet, you could
download all the Jars you might need into your ~/.m2 repository. I
guess you could even create a Subversion repository for a
~/.m2/repository directory structure to allow people to check out the
needed Jars and create an ~/.m2/repository directory. But normally,
Maven assumes Internet connectivity of some sort when it needs
something that isn't already cached.

So, how do people typically set up their Eclipse classpath? With a standard Ant project, you point the New Project wizard at a directory and it does a pretty good job figuring out where your jars are. Does this require some plugin for Eclipse, or do people just add the jars as "external jars" in the project properties?

thanks,
john

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to