Unexpected dependency requirement when performing "package", but not "install"

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Unexpected dependency requirement when performing "package", but not "install"

Eric Lilja
Hello, I have to set up Maven on a system which is completely offline,
restricted to work on a few, select projects.

During testing, everything initially looked good, I could perform "mvn
clean install" in all projects without issue, and could perform other
Maven-task as well, Intellij was happy, it could resolve all projects
fully, run all test cases etc, and did not complain about any missing

However, then I noticed, almost by accident, that I couldn't do "package"
or "verify" (which was odd, since install works, which is a later phase!),
because then surefire (3.0.0-M5) would complain it was
missing org.apache.maven:maven-toolchain:jar:3.0-alpha-2 (or one of its

Why Surefire would suddenly need that artifact (some old alpha from
2009..), during package- or verify-phase feels weird to me since the later
phase, install, works, and install entails packaging and verification
(compile also works, btw)

surefire-3.0.0-M3 also suffers from this issue...2.18.1 does not

What's going on here? Is my analysis correct, that if I can do "mvn clean
install", then "mvn clean package" should not be an issue, since installs
entails packaging?

For this exotic setup, we can easily work around this, obviously, but it
feels like a bug to me so I wanted to share it with you

- Eric L