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/11/04 19:25:10 UTC

[GitHub] [maven-build-cache-extension] slawekjaranowski commented on a diff in pull request #36: [MBUILDCACHE-34] Improve IT test execution

slawekjaranowski commented on code in PR #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36#discussion_r1014397365


##########
src/test/java/org/apache/maven/buildcache/its/junit/IntegrationTestExtension.java:
##########
@@ -208,6 +208,8 @@ public Object resolveParameter( ParameterContext parameterContext,
 
             Verifier verifier = new Verifier( testExecutionDir.toString(), true );
             verifier.setLogFileName( "../log.txt" );
+            verifier.setSystemProperty( "projectVersion", System.getProperty( "projectVersion" ) );
+            verifier.setLocalRepo( System.getProperty( "localRepo" ) );

Review Comment:
   - `localRepo` is used to set property `maven.repo.local` which point to local Maven repository, instead of standard `.m2/repository`
   
   - `localRepo` value  is passed from pom.xml
   
   ```
   <localRepo>${project.build.directory}/local-repo</localRepo>
   ```
   
   so it is in `target` directory, it will be cleaned in standard way
   
   `localRepo` is first populated by m-invoker-p by install goal before integration test will be started, and current project arifact is instaled, next Maven process which is executed during test, download everything else was is needed
   
   before my change is m-install-p was configured to install project artifact in standard Maven local repository
   
   it is shared by all test
   
   on local workstation it will be the same
   
   https://maven.apache.org/plugins/maven-invoker-plugin/install-mojo.html



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