You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2023/01/12 15:01:08 UTC

[GitHub] [maven-integration-testing] cstamas opened a new pull request, #230: [MNG-7667] Partial fix that "works for me"

cstamas opened a new pull request, #230:
URL: https://github.com/apache/maven-integration-testing/pull/230

   This change hunts down m-install-p and m-deploy-p versions from tested Maven (the one bound in default lifecycle) and resolves them and their dependencies. This makes IT pass for me with both, non updated Maven 3.9.0 and updated 3.9.0 re lifecycle plugins.
   
   The ITs exectute this mojo in Bootstrap IT that executes with pom that has packaging=pom, but the m-install-p and m-deploy-p are still present. The "proper" fix would be to somehow grab the versions of ALL plugins in all lifecycles burned in currently tested Maven, but unsure how to achieve that.
   
   ---
   
   https://issues.apache.org/jira/browse/MNG-7667


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-integration-testing] cstamas commented on a diff in pull request #230: [MNG-7667] Partial fix that "works for me"

Posted by GitBox <gi...@apache.org>.
cstamas commented on code in PR #230:
URL: https://github.com/apache/maven-integration-testing/pull/230#discussion_r1068281989


##########
core-it-support/maven-it-plugin-bootstrap/src/main/java/org/apache/maven/its/bootstrap/DownloadMojo.java:
##########
@@ -104,6 +105,21 @@ public void execute() throws MojoFailureException
             }
         }
 
+        // HACK: this plugin is executing in bootstrap project that has packaging=pom, but still enlists install/deploy
+        try
+        {
+            for ( Plugin plugin : session.getCurrentProject().getBuildPlugins() )
+            {
+                dependencies.add( toDependency(

Review Comment:
   Subsequent resolving (when already once resolved)  is fast: basically presence of file(s) on disk happens, so duplication (for now) is not something I'd worry about



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-integration-testing] cstamas commented on a diff in pull request #230: [MNG-7667] Partial fix that "works for me"

Posted by GitBox <gi...@apache.org>.
cstamas commented on code in PR #230:
URL: https://github.com/apache/maven-integration-testing/pull/230#discussion_r1068281989


##########
core-it-support/maven-it-plugin-bootstrap/src/main/java/org/apache/maven/its/bootstrap/DownloadMojo.java:
##########
@@ -104,6 +105,21 @@ public void execute() throws MojoFailureException
             }
         }
 
+        // HACK: this plugin is executing in bootstrap project that has packaging=pom, but still enlists install/deploy
+        try
+        {
+            for ( Plugin plugin : session.getCurrentProject().getBuildPlugins() )
+            {
+                dependencies.add( toDependency(

Review Comment:
   Resolving when once done is fast: basically presence of file(s) on disk happens, so duplication (for now) is not something I'd worry about



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-integration-testing] cstamas commented on a diff in pull request #230: [MNG-7667] Fix Bootstrap IT

Posted by GitBox <gi...@apache.org>.
cstamas commented on code in PR #230:
URL: https://github.com/apache/maven-integration-testing/pull/230#discussion_r1068636861


##########
core-it-support/maven-it-plugin-bootstrap/src/main/java/org/apache/maven/its/bootstrap/DownloadMojo.java:
##########
@@ -82,8 +86,10 @@
     @Override
     public void execute() throws MojoFailureException
     {
+        // this or that: either resolver file listed artifacts or collect lifecycle packaging plugins
         if ( file != null && file.exists() )
         {
+            System.out.println( "Collecting artifacts from file: " + file );

Review Comment:
   I just followed existing code, see below, in this mojo nothing uses logger, but everything uses System.out



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-integration-testing] slawekjaranowski commented on a diff in pull request #230: [MNG-7667] Fix Bootstrap IT

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #230:
URL: https://github.com/apache/maven-integration-testing/pull/230#discussion_r1068636121


##########
core-it-support/maven-it-plugin-bootstrap/src/main/java/org/apache/maven/its/bootstrap/DownloadMojo.java:
##########
@@ -82,8 +86,10 @@
     @Override
     public void execute() throws MojoFailureException
     {
+        // this or that: either resolver file listed artifacts or collect lifecycle packaging plugins
         if ( file != null && file.exists() )
         {
+            System.out.println( "Collecting artifacts from file: " + file );

Review Comment:
   Why system out instead of Mojo log? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-integration-testing] cstamas merged pull request #230: [MNG-7667] Fix Bootstrap IT

Posted by GitBox <gi...@apache.org>.
cstamas merged PR #230:
URL: https://github.com/apache/maven-integration-testing/pull/230


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-integration-testing] cstamas commented on pull request #230: [MNG-7667] Partial fix that "works for me"

Posted by GitBox <gi...@apache.org>.
cstamas commented on PR #230:
URL: https://github.com/apache/maven-integration-testing/pull/230#issuecomment-1380591738

   This fixes the original issue, but now we face other issue: all the ITs that use maven-plugin packaging and do verifier.verifyErrorFreeLog will fail, as m-plugin-p emits ERRORs that should be WARNs instead...
   
   Example:
   ```
   [INFO]
   [INFO] --- plugin:3.7.0:descriptor (default-descriptor) @ plugin-extension ---
   [ERROR]
   
   Some dependencies of Maven Plugins are expected to be in provided scope.
   Please make sure that dependencies listed below declared in POM
   have set '<scope>provided</scope>' as well.
   
   The following dependencies are in wrong scope:
    * org.apache.maven:maven-model:jar:3.8.6:compile
    * org.apache.maven:maven-artifact:jar:3.8.6:compile
    * org.apache.maven:maven-resolver-provider:jar:3.8.6:compile
    * org.apache.maven:maven-model-builder:jar:3.8.6:compile
    * org.apache.maven:maven-builder-support:jar:3.8.6:compile
    * org.apache.maven:maven-repository-metadata:jar:3.8.6:compile
   
   
   
   [INFO] Using 'UTF-8' encoding to read mojo source files.
   [INFO] java-annotations mojo extractor found 0 mojo descriptor.
   [INFO] java-javadoc mojo extractor found 1 mojo descriptor.
   [WARNING]
   [WARNING] Deprecated extractor java-javadoc extracted 1 descriptor. Upgrade your Mojo definitions.
   [WARNING] You should use Mojo Annotations instead of Javadoc tags.
   [WARNING]
   [INFO] ant mojo extractor found 0 mojo descriptor.
   [INFO] bsh mojo extractor found 0 mojo descriptor.
   [INFO]
   [INFO] --- resources:3.3.0:testResources (default-testResources) @ plugin-extension ---
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org