Hi,
so after diving more into this issue i found that the original
MavenProject is working different than the implemented Stub
(MavenProjectBasicStub), cause the MavenProject#getArtifactId() method
looks like this:
public String getArtifactId()
{
return getModel().getArtifactId();
}
in contrary the implemented Stub method of
MavenProjectBasicStub#getArtifactId() looks like this:
public String getArtifactId()
{
return "maven-resource-plugin-test#" + identifier;
}
which is not the same behaviour so i decided to change the Stub to
behave exactly like the original above and the result is as expected
that the tests now are working for both versions. maven-archiver 2.5 and
2.6.
I have also changed the behaviour of the getGroupId() of the stub to
behave exactly like the original...
This will solve my problem...
Many thanks for your patience.....and attention...
Kind regards
Karl Heinz Marbaise
On 11/23/14 9:39 PM, Karl Heinz Marbaise wrote:
Hi,
On 11/23/14 10:27 AM, Michael Osipov wrote:
Am 2014-11-22 um 20:58 schrieb Karl Heinz Marbaise:
Hi,
i'm trying to upgrade maven-ejb-plugin from maven-archiver 2.5 to
maven-archiver-2.6....and i'm currently faced with a puzzling
situation...
If i update to 2.6 several tests will fail...
For the tests there were stubs generated which using groupId/artifactId
etc. but if i update to 2.6 it looks like the defined ModelStub (which
contains artifactId etc.) seemed to be ignored and the
MavenProjectBasicStub.java takes over which means the ModelStub is
ignored (in some way)...
If i change MavenProjectBasicStub.java accordingly my tests will work...
Does someone has an idea which can explain this?
Can you share the problematic logfile or point to a Jenkins job log?
Sorry...sure i can....
I've maded a test project separately from SVN check in...
The branch upgrade contains log files and a pom which has been changed
to use maven-archiver-2.6 instead of 2.5 (the master contains unchanged
state):
https://github.com/khmarbaise/maven-ejb-plugin/tree/upgrade
This branch includes a log file after i made the upgrade and run
mvn -Prun-its clean verify
https://github.com/khmarbaise/maven-ejb-plugin/blob/upgrade/mvn-2.6.log
If i change the following lines it will run the tests without any issue...
diff --git
a/src/test/java/org/apache/maven/plugin/ejb/stub/MavenProjectBasicStub.java
b/src/test/java/org/apache/maven/plugin/ejb/stub/MavenProjectBasicStub.java
index d88274a..a268c20 100644
---
a/src/test/java/org/apache/maven/plugin/ejb/stub/MavenProjectBasicStub.java
+++
b/src/test/java/org/apache/maven/plugin/ejb/stub/MavenProjectBasicStub.java
@@ -117,12 +117,14 @@ public class MavenProjectBasicStub
public String getGroupId()
{
- return "org.apache.maven.plugin.test";
+ //return "org.apache.maven.plugin.test";
+ return "org.apache.maven.test";
}
public String getArtifactId()
{
- return "maven-resource-plugin-test#" + identifier;
+ return "maven-test-plugin";
+// return "maven-resource-plugin-test#" + identifier;
}
public String getPackaging()
It looks like (somehow) that the ModelStub is simply ignored...which
don't understand at the moment and why? So this change in maven-archiver
changes the behaviour in tests..? Plexus Injection ?
Classloader issue ? Test Case setup ?
I'm open for any suggestions...
Thanks in advance.
Kind regards
Karl Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org