You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2015/05/04 00:07:28 UTC
[1/3] maven-surefire git commit: TestNG should be able to run its own
tests
Repository: maven-surefire
Updated Branches:
refs/heads/master 1bae26b8a -> c02be388b
TestNG should be able to run its own tests
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/8355fc15
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/8355fc15
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/8355fc15
Branch: refs/heads/master
Commit: 8355fc1501eabbd52e7c19991430f591e2daf57f
Parents: 1bae26b
Author: Julien Herr <ju...@alcatel-lucent.com>
Authored: Mon Apr 20 14:41:00 2015 +0200
Committer: Tibor17 <ti...@lycos.com>
Committed: Sun May 3 23:44:32 2015 +0200
----------------------------------------------------------------------
.../org/apache/maven/plugin/surefire/AbstractSurefireMojo.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8355fc15/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 659e6fe..57ad4ee 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -1734,6 +1734,11 @@ public abstract class AbstractSurefireMojo
+ artifact.getVersion() );
}
}
+ else if ( getTestNGArtifactName().equals(
+ project.getArtifact().getGroupId() + ":" + project.getArtifact().getArtifactId() ) )
+ {
+ return project.getArtifact();
+ }
return artifact;
}
[3/3] maven-surefire git commit: Rework after review
Posted by ti...@apache.org.
Rework after review
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/c02be388
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/c02be388
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/c02be388
Branch: refs/heads/master
Commit: c02be388b6e5110982a6a9e238199c298119c3fb
Parents: 464a1cc
Author: Julien Herr <ju...@alcatel-lucent.com>
Authored: Sun May 3 22:45:32 2015 +0200
Committer: Tibor17 <ti...@lycos.com>
Committed: Sun May 3 23:44:33 2015 +0200
----------------------------------------------------------------------
.../maven/plugin/surefire/AbstractSurefireMojo.java | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/c02be388/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index dd49f56..33b90bd 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -1723,6 +1723,8 @@ public abstract class AbstractSurefireMojo
throws MojoExecutionException
{
Artifact artifact = getProjectArtifactMap().get( getTestNGArtifactName() );
+ Artifact projectArtifact = project.getArtifact();
+ String projectArtifactName = projectArtifact.getGroupId() + ":" + projectArtifact.getArtifactId();
if ( artifact != null )
{
@@ -1734,11 +1736,11 @@ public abstract class AbstractSurefireMojo
+ artifact.getVersion() );
}
}
- else if ( getTestNGArtifactName().equals(
- project.getArtifact().getGroupId() + ":" + project.getArtifact().getArtifactId() ) )
+ else if ( projectArtifactName.equals( getTestNGArtifactName() ) )
{
- return project.getArtifact();
+ artifact = projectArtifact;
}
+
return artifact;
}
@@ -1758,11 +1760,12 @@ public abstract class AbstractSurefireMojo
private Artifact getJunitArtifact()
{
Artifact artifact = getProjectArtifactMap().get( getJunitArtifactName() );
+ Artifact projectArtifact = project.getArtifact();
+ String projectArtifactName = projectArtifact.getGroupId() + ":" + projectArtifact.getArtifactId();
- if ( artifact == null && getJunitArtifactName().equals(
- project.getArtifact().getGroupId() + ":" + project.getArtifact().getArtifactId() ) )
+ if ( artifact == null && projectArtifactName.equals( getJunitArtifactName() ) )
{
- return project.getArtifact();
+ artifact = projectArtifact;
}
return artifact;
[2/3] maven-surefire git commit: Surefire should return the project
artifact if the project is JUnit itself
Posted by ti...@apache.org.
Surefire should return the project artifact if the project is JUnit itself
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/464a1cc5
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/464a1cc5
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/464a1cc5
Branch: refs/heads/master
Commit: 464a1cc5ceb22d7a853744b1c1eafcdc5bd18758
Parents: 8355fc1
Author: Julien Herr <ju...@alcatel-lucent.com>
Authored: Sun May 3 22:09:12 2015 +0200
Committer: Tibor17 <ti...@lycos.com>
Committed: Sun May 3 23:44:33 2015 +0200
----------------------------------------------------------------------
.../maven/plugin/surefire/AbstractSurefireMojo.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/464a1cc5/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 57ad4ee..dd49f56 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -1757,7 +1757,15 @@ public abstract class AbstractSurefireMojo
private Artifact getJunitArtifact()
{
- return getProjectArtifactMap().get( getJunitArtifactName() );
+ Artifact artifact = getProjectArtifactMap().get( getJunitArtifactName() );
+
+ if ( artifact == null && getJunitArtifactName().equals(
+ project.getArtifact().getGroupId() + ":" + project.getArtifact().getArtifactId() ) )
+ {
+ return project.getArtifact();
+ }
+
+ return artifact;
}
private Artifact getJunitDepArtifact()