-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #1137: using PomHelper.getGroupId if groupId of the current …
…project root is empty (#1162)
- Loading branch information
Showing
5 changed files
with
142 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
versions-maven-plugin/src/test/resources/org/codehaus/mojo/set/issue-1137/child/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>group</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>1.0</version> | ||
</parent> | ||
<artifactId>child</artifactId> | ||
<version>1.0</version> | ||
</project> |
11 changes: 11 additions & 0 deletions
11
versions-maven-plugin/src/test/resources/org/codehaus/mojo/set/issue-1137/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>group</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>1.0</version> | ||
<packaging>pom</packaging> | ||
<modules> | ||
<module>child</module> | ||
</modules> | ||
</project> |
102 changes: 102 additions & 0 deletions
102
versions-test/src/main/java/org/codehaus/mojo/versions/utils/TestLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
package org.codehaus.mojo.versions.utils; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.apache.commons.lang3.tuple.Triple; | ||
import org.apache.maven.plugin.logging.Log; | ||
|
||
public class TestLog implements Log { | ||
private final List<Triple<LogLevel, CharSequence, Throwable>> loggedMessages = new ArrayList<>(); | ||
|
||
public List<Triple<LogLevel, CharSequence, Throwable>> getLoggedMessages() { | ||
return loggedMessages; | ||
} | ||
|
||
@Override | ||
public boolean isDebugEnabled() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void debug(CharSequence charSequence) { | ||
debug(charSequence, null); | ||
} | ||
|
||
@Override | ||
public void debug(CharSequence charSequence, Throwable throwable) { | ||
loggedMessages.add(Triple.of(LogLevel.DEBUG, charSequence, throwable)); | ||
} | ||
|
||
@Override | ||
public void debug(Throwable throwable) { | ||
debug(null, throwable); | ||
} | ||
|
||
@Override | ||
public boolean isInfoEnabled() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void info(CharSequence charSequence) { | ||
info(charSequence, null); | ||
} | ||
|
||
@Override | ||
public void info(CharSequence charSequence, Throwable throwable) { | ||
loggedMessages.add(Triple.of(LogLevel.INFO, charSequence, throwable)); | ||
} | ||
|
||
@Override | ||
public void info(Throwable throwable) { | ||
info(null, throwable); | ||
} | ||
|
||
@Override | ||
public boolean isWarnEnabled() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void warn(CharSequence charSequence) { | ||
warn(charSequence, null); | ||
} | ||
|
||
@Override | ||
public void warn(CharSequence charSequence, Throwable throwable) { | ||
loggedMessages.add(Triple.of(LogLevel.WARN, charSequence, throwable)); | ||
} | ||
|
||
@Override | ||
public void warn(Throwable throwable) { | ||
warn(null, throwable); | ||
} | ||
|
||
@Override | ||
public boolean isErrorEnabled() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void error(CharSequence charSequence) { | ||
error(charSequence, null); | ||
} | ||
|
||
@Override | ||
public void error(CharSequence charSequence, Throwable throwable) { | ||
loggedMessages.add(Triple.of(LogLevel.ERROR, charSequence, throwable)); | ||
} | ||
|
||
@Override | ||
public void error(Throwable throwable) { | ||
error(null, throwable); | ||
} | ||
|
||
public enum LogLevel { | ||
DEBUG, | ||
INFO, | ||
WARN, | ||
ERROR | ||
} | ||
} |