aspose file tools*
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 Soft Skills this week in the Jobs Discussion 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: 16303
    
  21

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