Tuesday, August 21, 2007

Maven download dependencies 'pseudo-goal'

Today I wanted to check that I had all the dependencies I needed for a
new project I imported into my workspace. As I had not made some
necessary modifications needed for compiling, and I didn't want to
make changes to the code, install anything onto the local repository,
or anyhow change anything at all, I started looking for a plugin-goal
combination that would satisfy my very specific needs, i.e, to just
download the dependencies.

To my surprise, I did not find it. But in my search, I run into this
thread in a forum:
http://mail-archives.apache.org/mod_mbox/maven-users/200605.mbox/%3C001c01c67450$b2c24680$1706a8c0@LXP0001%3E

Based on what people suggested in that thread, I just copied the
project.properties, project.xml and maven.xml - I am currently using
Maven 1.0.2 for this project - to an empty directory, and typed
'maven' from a command prompt. This did the trick indeed. Thinking it
over, it is quite logical, since there's nothing to compile but the
dependencies are specified anyway.

One additional note: in my configuration, the default goal for maven
is java:compile, as specified in the maven.xml file.

1 comment:

Anonymous said...

Thanks for writing this.