This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 329

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: 15964
    
  19

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.
 
 
subject: How to run maven when power is gone
 
Similar Threads
How to set an output directory
Eclipse "Build Automatically" Not Working
how to configure tomcat server in eclipse for maven project
Maven Vs Ant
Maven change project setup m2eclipse