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 2022/02/16 20:30:17 UTC

[GitHub] [maven-dependency-analyzer] slawekjaranowski opened a new pull request #50: [MSHARED-1035] Get rid of maven-plugin-testing-tools for IT test

slawekjaranowski opened a new pull request #50:
URL: https://github.com/apache/maven-dependency-analyzer/pull/50


   IT tests will be executed by maven-invoker-plugin
   
   ---
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MSHARED) filed 
          for the change (usually before you start working on it).  Trivial changes like typos do not 
          require a JIRA issue.  Your pull request should address just this issue, without 
          pulling in other changes. Also be sure having selected the correct component.
    - [x] Each commit in the pull request should have a meaningful subject line and body.
    - [x] Format the pull request title like `[MSHARED-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MSHARED-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the 
          commit message.
    - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [x] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will 
          be performed on your pull request automatically.
    - [x] You have run the integration tests successfully (`mvn -Prun-its clean verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [x] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   


-- 
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-dependency-analyzer] slawekjaranowski commented on a change in pull request #50: [MSHARED-1035] Get rid of maven-plugin-testing-tools for IT test

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #50:
URL: https://github.com/apache/maven-dependency-analyzer/pull/50#discussion_r808458152



##########
File path: pom.xml
##########
@@ -192,24 +149,34 @@
 
   <profiles>
     <profile>
-      <id>maven-repo-local</id>
-      <activation>
-        <property>
-          <name>maven.repo.local</name>
-        </property>
-      </activation>
+      <id>run-its</id>
       <build>
         <plugins>
-         <plugin>
-            <artifactId>maven-surefire-plugin</artifactId>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>install</goal>
+                  <goal>integration-test</goal>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
             <configuration>
-              <systemProperties combine.children="append">
-                <property>
-                  <!-- Pass this through to the tests (if set!) to have them pick the right repository -->
-                  <name>maven.repo.local</name>
-                  <value>${maven.repo.local}</value>
-                </property>
-              </systemProperties>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <localRepositoryPath>target/local-repo</localRepositoryPath>
+              <settingsFile>src/it/settings.xml</settingsFile>
+              <postBuildHookScript>verify</postBuildHookScript>
+              <goals>
+                <goal>verify</goal>
+              </goals>
+              <properties>
+                <maven.compiler.source>${java.specification.version}</maven.compiler.source>
+                <maven.compiler.target>${java.specification.version}</maven.compiler.target>

Review comment:
       Many thing depends on bytecode version in analysis so compiling test code for many version can help detect future problem with ... next java version
   
   if we need test feature which depends of jdk version we can add such requrement in invoker.properties




-- 
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-dependency-analyzer] michael-o commented on a change in pull request #50: [MSHARED-1035] Get rid of maven-plugin-testing-tools for IT test

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #50:
URL: https://github.com/apache/maven-dependency-analyzer/pull/50#discussion_r808458657



##########
File path: pom.xml
##########
@@ -192,24 +149,34 @@
 
   <profiles>
     <profile>
-      <id>maven-repo-local</id>
-      <activation>
-        <property>
-          <name>maven.repo.local</name>
-        </property>
-      </activation>
+      <id>run-its</id>
       <build>
         <plugins>
-         <plugin>
-            <artifactId>maven-surefire-plugin</artifactId>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>install</goal>
+                  <goal>integration-test</goal>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
             <configuration>
-              <systemProperties combine.children="append">
-                <property>
-                  <!-- Pass this through to the tests (if set!) to have them pick the right repository -->
-                  <name>maven.repo.local</name>
-                  <value>${maven.repo.local}</value>
-                </property>
-              </systemProperties>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <localRepositoryPath>target/local-repo</localRepositoryPath>
+              <settingsFile>src/it/settings.xml</settingsFile>
+              <postBuildHookScript>verify</postBuildHookScript>
+              <goals>
+                <goal>verify</goal>
+              </goals>
+              <properties>
+                <maven.compiler.source>${java.specification.version}</maven.compiler.source>
+                <maven.compiler.target>${java.specification.version}</maven.compiler.target>

Review comment:
       Makes sense.




-- 
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-dependency-analyzer] michael-o commented on a change in pull request #50: [MSHARED-1035] Get rid of maven-plugin-testing-tools for IT test

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #50:
URL: https://github.com/apache/maven-dependency-analyzer/pull/50#discussion_r808452039



##########
File path: pom.xml
##########
@@ -192,24 +149,34 @@
 
   <profiles>
     <profile>
-      <id>maven-repo-local</id>
-      <activation>
-        <property>
-          <name>maven.repo.local</name>
-        </property>
-      </activation>
+      <id>run-its</id>
       <build>
         <plugins>
-         <plugin>
-            <artifactId>maven-surefire-plugin</artifactId>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>install</goal>
+                  <goal>integration-test</goal>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
             <configuration>
-              <systemProperties combine.children="append">
-                <property>
-                  <!-- Pass this through to the tests (if set!) to have them pick the right repository -->
-                  <name>maven.repo.local</name>
-                  <value>${maven.repo.local}</value>
-                </property>
-              </systemProperties>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <localRepositoryPath>target/local-repo</localRepositoryPath>
+              <settingsFile>src/it/settings.xml</settingsFile>
+              <postBuildHookScript>verify</postBuildHookScript>
+              <goals>
+                <goal>verify</goal>
+              </goals>
+              <properties>
+                <maven.compiler.source>${java.specification.version}</maven.compiler.source>
+                <maven.compiler.target>${java.specification.version}</maven.compiler.target>

Review comment:
       Does this really make sense? I mean it depends now on the Java version run?!




-- 
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-dependency-analyzer] michael-o commented on pull request #50: [MSHARED-1035] Get rid of maven-plugin-testing-tools for IT test

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #50:
URL: https://github.com/apache/maven-dependency-analyzer/pull/50#issuecomment-1042295730


   That's massive..., will run...


-- 
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-dependency-analyzer] slawekjaranowski commented on pull request #50: [MSHARED-1035] Get rid of maven-plugin-testing-tools for IT test

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #50:
URL: https://github.com/apache/maven-dependency-analyzer/pull/50#issuecomment-1042321665


   All test pass ... on GH and Jenkins
   even with 18-ea on localhost 😸 


-- 
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-dependency-analyzer] slawekjaranowski merged pull request #50: [MSHARED-1035] Get rid of maven-plugin-testing-tools for IT test

Posted by GitBox <gi...@apache.org>.
slawekjaranowski merged pull request #50:
URL: https://github.com/apache/maven-dependency-analyzer/pull/50


   


-- 
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-dependency-analyzer] slawekjaranowski commented on pull request #50: [MSHARED-1035] Get rid of maven-plugin-testing-tools for IT test

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #50:
URL: https://github.com/apache/maven-dependency-analyzer/pull/50#issuecomment-1042305778


   Idea and way how to was done:
   - add simple maven plugin `src/it/setup-mock-plugin/src/main/java/it/test/MockAnalyzeMojo.java`
   - build and instal plugin in setup job of m-invoker-p
   - plugin generate `target/analysis.txt` with result of executing
   - use plugin in each IT test
   - assert content of `target/analysis.txt` in `verify.groovy`
   
   


-- 
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-dependency-analyzer] slawekjaranowski commented on pull request #50: [MSHARED-1035] Get rid of maven-plugin-testing-tools for IT test

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #50:
URL: https://github.com/apache/maven-dependency-analyzer/pull/50#issuecomment-1042310851


   I can't use new version of `maven-plugin-testing-harness` ... because for tests MavenProject instance is needed ... 
   MavenProject must contains resolve all dependency which is difficult to mock


-- 
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