This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes How to run maven when power is gone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "How to run maven when power is gone" Watch "How to run maven when power is gone" New topic
Author

How to run maven when power is gone

shyam sunder prasad
Ranch Hand

Joined: Mar 23, 2011
Posts: 62
hi everybody,

i am using maven for OpenKM project . if enter command as mvn package in cmd then it is working fine when power is there .if the power is gone i cant run the maven successfully.
please help me how to run the maven when power is gone.
Sumit Bisht
Ranch Hand

Joined: Jul 02, 2008
Posts: 330

Use a Battery !
Maven fails as it tries to make connection with its central repository, which is used by default. For offline usage, you can create and use a repository manager (also useful if your internet connection is erratic/slow).
Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 433
    
    2
Power = internet connection?

You can run Maven offline with the -o command line switch.
shyam sunder prasad
Ranch Hand

Joined: Mar 23, 2011
Posts: 62
i mean internet connection is gone, i mean to say ,i need to point to local repository.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16473
    
  23

Maven is always going to look to the local repository (cache) on the machine doing the build. So this shouldn't be a problem except in cases where you have to pull new stuff from a remote repository or are publishing results to a remote repository.

In fact, I use the "-o" (offline) switch on my quick builds so that Maven won't even try and check for updates.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run maven when power is gone