I would like you to ask for your opinion about MNG-2871:
The problem could be called "internal dependencies" in reactor when
everything is build by phase lower then "package". The real
jar's for such a dependencies like client-jar or test-jar are created
and attached to original artifacts in "package" phase.
So if we call "mvn test" for a parent pom we will not get this
(client-jar, test-jar) files build - so the dependencies will not be
resolved internally... They
will be resolved from repository (if they exist there - so not actual
version may be used) or the build will fail.
I see there two options:
a) Close this bug as WON'T BE FIXED (because it's design issue)
and answer is 'don't call "mvn test"' to do the tests... call
mvn package instead.
at least we can add warning in a such a case: "Dependency
... has not been resolved internally. Calling 'mvn package' or greater
phase may
resolve your problem." If we decide to this solution, I can prepare such
a patch.
or
b) Apply currently attached patches (MNG-2871
<http://jira.codehaus.org/browse/MNG-2871>-maven-project.diff, MNG-2871
<http://jira.codehaus.org/browse/MNG-2871>-core-integration-testing-2.diff)
that
will make things much better in case of ejb and ejb-client artifacts
(that is IMHO the most frequent and important usage of attached artifact).
I don't like exception's, but it may be worth. The main disadvantages
are that it is exception and that we will provide more then client would
need (declared ejb-client but we will link to whole jar).
The problem is most annoying because maven-release-plugin calls "mvn
test" after upgrading version's number... So it leads to
"mvn release:prepare" failure in case of ejb-client dependencies.
Thank you,
Piotr Tabor
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]