Skip to content

Commit

Permalink
Revert "Handle plugin dependencies"
Browse files Browse the repository at this point in the history
This reverts commit 8177ccd.
  • Loading branch information
danielflower committed Dec 21, 2024
1 parent 0179c2a commit 9d3269e
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 473 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ private List<String> alterModel(MavenProject project, String newVersion) {
if (originalModel.getBuild() != null && originalModel.getBuild().getPlugins() != null) {
for (Plugin plugin : originalModel.getBuild().getPlugins()) {
alterSinglePlugin(errors, searchingFrom, projectProperties, plugin);
for (Dependency dependency : plugin.getDependencies()) {
alterSingleDependency(errors, searchingFrom, projectProperties, dependency);
}
}
}

Expand All @@ -128,7 +125,7 @@ private List<String> alterModel(MavenProject project, String newVersion) {
}
return errors;
}

private boolean isReleasablePlugin(Plugin plugin) {
try {
reactor.find(plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion());
Expand Down
1 change: 0 additions & 1 deletion src/site/markdown/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Changelog
### 3.6.0

* Latest tagged version from current branch is used for unchanged modules [issue #118 for details](https://github.com/danielflower/multi-module-maven-release-plugin/issues/118)
* Handle plugin dependencies the same way as "ordinary" dependencies (update version number)

### 3.2.0

Expand Down
70 changes: 0 additions & 70 deletions src/test/java/e2e/PluginDependencyTest.java

This file was deleted.

25 changes: 10 additions & 15 deletions src/test/java/scaffolding/TestProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ public void setMvnOpts(String mavenOpts) {

public List<String> mvnRelease(String buildNumber) throws IOException, InterruptedException {
return mvnRunner.runMaven(localDir,
"-DbuildNumber=" + buildNumber,
"releaser:release");
"-DbuildNumber=" + buildNumber,
"releaser:release");
}

public List<String> mvnRelease(String buildNumber, String... arguments) throws IOException, InterruptedException {
public List<String> mvnRelease(String buildNumber, String...arguments) throws IOException, InterruptedException {
return mvnRun("releaser:release", buildNumber, arguments);
}

public List<String> mvnReleaserNext(String buildNumber, String... arguments) throws IOException, InterruptedException {
public List<String> mvnReleaserNext(String buildNumber, String...arguments) throws IOException, InterruptedException {
return mvnRun("releaser:next", buildNumber, arguments);
}

Expand Down Expand Up @@ -93,7 +93,7 @@ private List<String> mvnRun(String goal, String buildNumber, String[] arguments)
String[] args = new String[arguments.length + 2];
args[0] = "-DbuildNumber=" + buildNumber;
System.arraycopy(arguments, 0, args, 1, arguments.length);
args[args.length - 1] = goal;
args[args.length-1] = goal;
return mvnRunner.runMaven(localDir, args);
}

Expand All @@ -111,10 +111,10 @@ private static TestProject project(String name) {

File localDir = Photocopier.folderForSampleProject(name);
Git local = Git.cloneRepository()
.setBare(false)
.setDirectory(localDir)
.setURI(originDir.toURI().toString())
.call();
.setBare(false)
.setDirectory(localDir)
.setURI(originDir.toURI().toString())
.call();

return new TestProject(originDir, origin, localDir, local);
} catch (Exception e) {
Expand Down Expand Up @@ -186,7 +186,7 @@ public static TestProject dependencyManagementProject() {
}

public static TestProject dependencyManagementUsingParentModuleVersionPropertyProject() {
return project("dependencymanagement-using-parent-module-version-property");
return project("dependencymanagement-using-parent-module-version-property");
}

public static TestProject moduleWithTestFailure() {
Expand All @@ -196,7 +196,6 @@ public static TestProject moduleWithTestFailure() {
public static TestProject moduleWithSnapshotDependencies() {
return project("snapshot-dependencies");
}

public static TestProject moduleWithSnapshotDependenciesWithVersionProperties() {
return project("snapshot-dependencies-with-version-properties");
}
Expand All @@ -205,10 +204,6 @@ public static TestProject differentDelimiterProject() {
return project("different-delimiter");
}

public static TestProject openapiSpecAsPluginDependency() {
return project("openapi-spec-as-plugin-dependency");
}

public void setMvnRunner(MvnRunner mvnRunner) {
this.mvnRunner = mvnRunner;
}
Expand Down
6 changes: 0 additions & 6 deletions test-projects/openapi-spec-as-plugin-dependency/.gitignore

This file was deleted.

43 changes: 0 additions & 43 deletions test-projects/openapi-spec-as-plugin-dependency/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9d3269e

Please sign in to comment.