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.
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. 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. On Thu, Feb 12, 2009 at 11:24 AM, John Willemin <j...@buttdynoracing.com> wrote: > Alright - I am pretty new to Maven and have some newbie questions. It's a > little wierd for me coming from seven years of Ant. I have read through the > definitive guide (mostly skimming) and set up a simple web application using > archetype:create. I like that it tries to enforce directory structure as > well as build lifecycle. I have added a few dependencies to the application > and I'm trying to figure out how folks use Maven in a mostly-offline > environment. > > We have a situation where the developers all have laptops. At work, these > are not hooked up to the Internet. If we want to check stuff into > Subversion, we need to go home. > > In a Maven project, is it assumed that the jars are not going to be checked > in with the source code and that they'll just be auto-snagged over the > Internet during a build? > > If you want to move your Maven project to a different network, where you > won't have internet access, do you copy your local .m2 directory as well as > the project, or do you set up a new central repository on that network? > > That's a starting point until I get my head better wrapped around this :) > > Thanks, > John > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- -- David Weintraub qazw...@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org