> I have the following dependency in my pom but this version does not exist
> in our repository. Maven then tries to download it from
> http://repo1.maven.org/ where of course this package also does not exists.
> But Maven reports BUILD SUCCESS while there are unresolved packages. Is
> this normal behavior or is this a bug?
>
> I spent some time to figure out that I was using a wrong version. If Maven
> had given any sort of warning it would have saved me some time.
> So if this is by design then it would be a nice feature to have a warning
> of some sort.

There are two things going on here...

First, the purpose of the eclipse:eclipse goal is to simply take your
pom and produce Eclipse-compatible project files. So the
maven-eclipse-plugin does not really care (nor does it see other
functionality as part of its job) if the dependency artifacts exist in
your repo(s). If you want this to happen, you'd need to submit a patch
against the plugin to add the functionality.

Second, when you call a plugin goal directly like "mvn
eclipse:eclipse" then Maven does not run the full lifecycle, instead
it just invokes that goal directly. So Maven never has the opportunity
to complain about a missing artifact during an earlier lifecycle phase
as it would otherwise.

So, if you want to see these kinds of warnings or errors, I'd suggest
using "mvn validate eclipse:eclipse" instead. Revert the pom to
provide a "bad" version for a dependency and see if Maven complains as
you'd expect when you run it like this.

But ultimately, I think you shouldn't be using eclipse:eclipse at all.
Instead you should use M2E which is what "everyone" else is using.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to