-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRRESOURCES-126] Get rid of legacy #26
Conversation
And with 3.9.0 suddenly all the ITs suffer from "change packaging to pom" error.
src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java
Outdated
Show resolved
Hide resolved
Plain and an aggregator
src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good idea. It should be a major version bump in the plugin's own version.
go back to good ol' stinky mojo logger and replace vs replaceAll
Ran maven 3.9,.x build (w/ currently used MRR plugin, then with 3.1.0-SNAPSHOT), diffed outputs:
Seems in LICENSES the plugin now includes "itself" as well? |
Last commit fixes:
So, in Maven 3.9.x build this PR now produces same (sans some extra newlines, I guess due templates?) output as currently used 1.7.0 plugin. |
</goals> | ||
<configuration> | ||
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot> | ||
<!-- <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm misunderstanding this. Was the runOnlyAtExecutionRoot parameter removed, made a no-op, or still exists in a different plugin but is no longer needed here?
My concern is whether this change requires dependents to update their own POMs or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The runOnlyAtExecutionRoot
has been removed. But for maven plugin, this is same as no-op as build will not break even if present. Maybe we need to break the build and redirect users to new mojo?
See https://lists.apache.org/thread/bhtozf6w2nknvfzbfc1jb76fr6rqpkbx
The truth is, that this plugin was made for ASF purposes, am unsure is anyone outside ASF using it... so this is not a "general public" plugin like compiler or assembly plugin is...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new goal name should be logically identically to other plugins: "aggregate" at beginning or end:
osipovmi@deblndw011x:~/var/Projekte/maven-sources (submodules =)
$ grep -r --include='*.java' -- '-aggregate"' .
./plugins/reporting/jxr/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java:@Mojo( name = "test-aggregate", aggregator = true )
./plugins/reporting/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleAggregateReport.java:@Mojo( name = "checkstyle-aggregate", aggregator = true, requiresDependencyResolution = ResolutionScope.COMPILE,
./plugins/reporting/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleAggregateReport.java: return "checkstyle-aggregate";
./plugins/reporting/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AggregatorTestJavadocReport.java:@Mojo( name = "test-aggregate", aggregator = true, requiresDependencyResolution = ResolutionScope.TEST )
./plugins/tools/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfAggregateMojo.java: @Parameter( defaultValue = "${project.build.directory}/pdf-aggregate", required = true )
./plugins/tools/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfAggregateMojo.java: @Parameter( defaultValue = "${project.build.directory}/pdf-aggregate", required = true )
osipovmi@deblndw011x:~/var/Projekte/maven-sources (submodules =)
$ grep -r --include='*.java' '"aggregate-' .
./plugins/reporting/jxr/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule1MavenProjectStub.java: setArtifactId( "aggregate-test-submodule1" );
./plugins/reporting/jxr/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule2MavenProjectStub.java: setArtifactId( "aggregate-test-submodule2" );
./plugins/reporting/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AggregatorJavadocJar.java:@Mojo( name = "aggregate-jar", defaultPhase = LifecyclePhase.PACKAGE, aggregator = true,
./plugins/reporting/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AggregatorJavadocNoForkReport.java:@Mojo( name = "aggregate-no-fork", requiresDependencyResolution = ResolutionScope.COMPILE )
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java: File testPom = new File( unit, "aggregate-test/aggregate-test-plugin-config.xml" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java: File testPom = new File( unit, "aggregate-resources-test/aggregate-resources-test-plugin-config.xml" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java: File testPom = new File( unit, "aggregate-modules-not-in-subfolders-test/all/pom.xml");
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject1TestMavenProjectStub.java: setArtifactId( "aggregate-test-project1" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject1TestMavenProjectStub.java: build.setFinalName( "aggregate-test-project1" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject2TestMavenProjectStub.java: setArtifactId( "aggregate-test-project2" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject2TestMavenProjectStub.java: build.setFinalName( "aggregate-test-project2" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesTestMavenProjectStub.java: "aggregate-resources-test-plugin-config.xml",
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateTestMavenProjectStub.java: readModel( new File( getBasedir(), "aggregate-test-plugin-config.xml" ) );
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorCpdReport.java:@Mojo( name = "aggregate-cpd", aggregator = true, threadSafe = true )
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorCpdViolationCheckMojo.java:@Mojo( name = "aggregate-cpd-check", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true, aggregator = true )
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorCpdViolationCheckMojo.java:@Execute( goal = "aggregate-cpd" )
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorPmdNoForkReport.java:@Mojo( name = "aggregate-pmd-no-fork", aggregator = true, threadSafe = true,
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorPmdReport.java:@Mojo( name = "aggregate-pmd", aggregator = true, threadSafe = true,
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorPmdViolationCheckMojo.java:@Mojo( name = "aggregate-pmd-check", defaultPhase = LifecyclePhase.VERIFY, aggregator = true, threadSafe = true )
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorPmdViolationCheckMojo.java:@Execute( goal = "aggregate-pmd" )
</goals> | ||
<configuration> | ||
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot> | ||
<!-- <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new goal name should be logically identically to other plugins: "aggregate" at beginning or end:
osipovmi@deblndw011x:~/var/Projekte/maven-sources (submodules =)
$ grep -r --include='*.java' -- '-aggregate"' .
./plugins/reporting/jxr/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java:@Mojo( name = "test-aggregate", aggregator = true )
./plugins/reporting/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleAggregateReport.java:@Mojo( name = "checkstyle-aggregate", aggregator = true, requiresDependencyResolution = ResolutionScope.COMPILE,
./plugins/reporting/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleAggregateReport.java: return "checkstyle-aggregate";
./plugins/reporting/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AggregatorTestJavadocReport.java:@Mojo( name = "test-aggregate", aggregator = true, requiresDependencyResolution = ResolutionScope.TEST )
./plugins/tools/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfAggregateMojo.java: @Parameter( defaultValue = "${project.build.directory}/pdf-aggregate", required = true )
./plugins/tools/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfAggregateMojo.java: @Parameter( defaultValue = "${project.build.directory}/pdf-aggregate", required = true )
osipovmi@deblndw011x:~/var/Projekte/maven-sources (submodules =)
$ grep -r --include='*.java' '"aggregate-' .
./plugins/reporting/jxr/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule1MavenProjectStub.java: setArtifactId( "aggregate-test-submodule1" );
./plugins/reporting/jxr/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule2MavenProjectStub.java: setArtifactId( "aggregate-test-submodule2" );
./plugins/reporting/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AggregatorJavadocJar.java:@Mojo( name = "aggregate-jar", defaultPhase = LifecyclePhase.PACKAGE, aggregator = true,
./plugins/reporting/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AggregatorJavadocNoForkReport.java:@Mojo( name = "aggregate-no-fork", requiresDependencyResolution = ResolutionScope.COMPILE )
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java: File testPom = new File( unit, "aggregate-test/aggregate-test-plugin-config.xml" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java: File testPom = new File( unit, "aggregate-resources-test/aggregate-resources-test-plugin-config.xml" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java: File testPom = new File( unit, "aggregate-modules-not-in-subfolders-test/all/pom.xml");
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject1TestMavenProjectStub.java: setArtifactId( "aggregate-test-project1" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject1TestMavenProjectStub.java: build.setFinalName( "aggregate-test-project1" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject2TestMavenProjectStub.java: setArtifactId( "aggregate-test-project2" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject2TestMavenProjectStub.java: build.setFinalName( "aggregate-test-project2" );
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesTestMavenProjectStub.java: "aggregate-resources-test-plugin-config.xml",
./plugins/reporting/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateTestMavenProjectStub.java: readModel( new File( getBasedir(), "aggregate-test-plugin-config.xml" ) );
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorCpdReport.java:@Mojo( name = "aggregate-cpd", aggregator = true, threadSafe = true )
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorCpdViolationCheckMojo.java:@Mojo( name = "aggregate-cpd-check", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true, aggregator = true )
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorCpdViolationCheckMojo.java:@Execute( goal = "aggregate-cpd" )
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorPmdNoForkReport.java:@Mojo( name = "aggregate-pmd-no-fork", aggregator = true, threadSafe = true,
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorPmdReport.java:@Mojo( name = "aggregate-pmd", aggregator = true, threadSafe = true,
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorPmdViolationCheckMojo.java:@Mojo( name = "aggregate-pmd-check", defaultPhase = LifecyclePhase.VERIFY, aggregator = true, threadSafe = true )
./plugins/reporting/maven-pmd-plugin/src/main/java/org/apache/maven/plugins/pmd/AggregatorPmdViolationCheckMojo.java:@Execute( goal = "aggregate-pmd" )
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java
Show resolved
Hide resolved
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java
Show resolved
Hide resolved
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java
Show resolved
Hide resolved
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java
Show resolved
Hide resolved
aggregator = true, | ||
requiresDependencyResolution = ResolutionScope.TEST, | ||
threadSafe = true ) | ||
public class AggregatorProcessRemoteResourcesMojo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my precending comment regarding naming
This is one of the last plugins referenced in ASF parent pom whose latest release version still leads to a WARN with Maven 3.9.x. Therefore it would be nice to soon merge, release and then update in ASF parent. |
Conflict resolved. Tested with m-dependency-p, looks better
Artifacts used by project are listed |
As I see discussion here is about:
can we take such simple decision? I hope gola name like |
I guess so. |
Goal But I see one more issue |
Get rid of MAT, Maven 3.9.1 warning about
localRepository
, etc. Make Maven resolve and not Mojo, this gets rid of quite a lot code. ForrunOnlyAtExecutionRoot
introduce new mojoaggregate-process
that is aggregator Mojo.So, with this PR:
process
mojo does all as before, but is much simpler, but LOOSESrunOnlyAtExecutionRoot
parameter and functionalityaggregator-process
Mojo that does whatprocess
w/runOnlyAtExecutionRoot
before did with slight changes (in bulk output, that is IMHO acceptable).https://issues.apache.org/jira/browse/MRRESOURCES-126