December 9, 2009

Manual (local or remote) install of maven artifacts needs sudo

Filed under: maven — michaelangela @ 6:04 am

While prepping to what I outlined in my last post about installing a maven artifact manually, I happened to search to see if it could be done remotely since I knew the repository location. That only makes sense considering what maven itself does. This post on the ever helpful Stack Overflow gave the steps but it just wouldn’t work. I even downloaded the dependency:get plugin and successfully installed it with:

sudo mvn install:install-file -DgroupId=org.apache.maven.plugins\
-DartifactId=maven-dependency-plugin -Dversion=2.1 -Dpackaging=jar\

That sudo is the required bit. It kept failing without sudo until i turned on mvn -e to see exactly what was happening and why it failed:

Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.1/exec-maven-plugin-1.1.jar
[WARNING] Unable to get resource 'org.codehaus.mojo:exec-maven-plugin:jar:1.1' from repository central
(http://repo1.maven.org/maven2): Specified destination directory cannot be created:

at first glance it looked like it couldn’t download it which is what I assumed. The actual problem was that it couldn’t create the directory! So with this

sudo mvn -e org.apache.maven.plugins:maven-dependency-plugin:2.1:get \
-DrepoUrl=http://repo1.maven.org/maven2/ \

it worked.

Now it’s time to see with this installed can I actually run the Marketcetera ORS…
IT’S ALIVE! The ORS launched though I had to run

sudo mvn -PexecuteDBInit exec:java

to get the database initialized properly. It aborted when running

mvn -Pexecute exec:java

because the table execreports was missing.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: