wood burning stoves*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven on Linux 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 "Maven on Linux" Watch "Maven on Linux" New topic
Author

Maven on Linux

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Guys,

I would like to know what additional thing that I have to do other than getting Maven installed on my machine that runs Linux in order for me to execute my project artifacts?

Suggestions needed.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

For a properly-configured Maven project, once Maven is installed, you should be able to run the build and it should work. But I can think of two things that might go wrong (other than networking issues):

1) The project relies on a repository other than the default one, in which case you must declare the alternate repository in your m2_home/conf/settings.xml file

2) The project relies on artifacts that were manually loaded in a local repository by the person who put together the pom.xml. In such a case, the provider of the project should provide documentation on which artifacts must be manually installed.

If this does not help you, then I will state that you can usually get better responses to questions if you state up front what error you are seeing.


JBoss In Action
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

I would like to create a new project in Maven on Linux. I just wanted to know that I could use mvn install or similiar commands without a sudo permission?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

For your own project, the Maven install is all you need. Be aware that the first time couple of times that you run Maven it will take extra time because it will have to download various JAR files from the remote repository. But after those first few times, the builds should go much faster, at least until you try something different or want to access other libraries, in which case more JARs will be downloaded.

You might want to get "Better Builds With Maven", or "Maven The Definitive Guide", both free downloads and helpful to get you started.
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959


I just wanted to know that I could use mvn install or similiar commands without a sudo permission?


You don't need to use sudo to run any mvn commands.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Thanks!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15962
    
  19

"mvn install" doesn't mean what you think it does. It means "build the artifact and install it into the Maven Repository.

If you want to make an OS-installable application, you need to set up your own installation process. That means figuring out what directories you want the installed app to live in, setting up its config files (if any), creating and copying the scripts needed to run it (if any) and so forth.

For the most part, you'll be on your own. But for Red Hat/Fedora systems there's a Maven plug-in that can create RPM install packages and it works very nicely. You will need a good understanding of how RPMS are constructed, however.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: Maven on Linux
 
Similar Threads
mvn deploy over ssh prompts for password
Can we turn on and off the servlets in web.xml?
Make script to install war files in Tomcat
Settings XML file changes
Unable to Get Maven Installed