tiagobento commented on issue #6669:
URL: 
https://github.com/apache/incubator-kie-drools/issues/6669#issuecomment-4331182704

   Ok, turns out reproducing this locally is a little more complicated.
   
   
   # A. Preparation
   1. You need to use .mvn/maven.config in order to block Maven subprocesses 
(`build-drools-test-coverage-jars` invocation of `maven-invoker-plugin` on 
`drools-test-suite`) from downloading content from apache.snapshots.
   2. You gotta make sure that there are no JARs inside the 
`drools-test-coverage/test-suite/src/test/resources/kjar/` folder. Otherwise 
the `maven-invoker-plugin` execution mentioned above doesn't kick in.
   3. You gotta build BOMs first so that they get installed in the local Maven 
repository and therefore can be seen by the Maven subprocesses mentioned in 1.
       - `mvn install -f bom && mvn install -f build-parent`
   
   After performing all those steps, build the tree skipping all tests (just so 
it's quick):
   
   # B. Build
   ```
   mvn clean install -pl :drools-test-suite -am -DskipTests
   ```
   
   Then, to reproduce the original issue, run:
   
   ```
   mvn clean install -pl :drools-test-suite
   ```
   
   Which will give you these logs:
   
   ```
   [INFO] --- invoker:3.2.1:run (build-drools-test-coverage-jars) @ 
drools-test-suite ---
   [WARNING] Filtering of parent/child POMs is not supported without cloning 
the projects
   [INFO] Building: drools-test-coverage-jars-with-invoker/pom.xml
   [INFO]   The build exited with code 1. See 
/Users/tiagobento/apache/incubator-kie-drools/drools-test-coverage/test-suite/../drools-test-coverage-jars/drools-test-coverage-jars-with-invoker/build.log
 for details.
   [INFO]           drools-test-coverage-jars-with-invoker/pom.xml ... FAILED 
(1.2 s)
   [INFO] drools-test-coverage-jars-with-invoker, executionResult:null
   [INFO] Building: setter-overload/pom.xml
   [INFO]           setter-overload/pom.xml .......................... SUCCESS 
(2.7 s)
   [INFO] 
fileLogger:/Users/tiagobento/apache/incubator-kie-drools/drools-test-coverage/test-suite/../drools-test-coverage-jars/setter-overload/build.log
   [INFO] Building: testEnum/pom.xml
   [INFO]           testEnum/pom.xml ................................. SUCCESS 
(1.9 s)
   [INFO] 
fileLogger:/Users/tiagobento/apache/incubator-kie-drools/drools-test-coverage/test-suite/../drools-test-coverage-jars/testEnum/build.log
   [INFO] Building: surf/pom.xml
   [INFO]           surf/pom.xml ..................................... SUCCESS 
(1.8 s)
   [INFO] 
fileLogger:/Users/tiagobento/apache/incubator-kie-drools/drools-test-coverage/test-suite/../drools-test-coverage-jars/surf/build.log
   [INFO] -------------------------------------------------
   [INFO] Build Summary:
   [INFO]   Passed: 3, Failed: 1, Errors: 0, Skipped: 0
   [INFO] -------------------------------------------------
   [ERROR] The following builds failed:
   [ERROR] *  drools-test-coverage-jars-with-invoker/pom.xml
   [INFO] -------------------------------------------------
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  9.996 s
   [INFO] Finished at: 2026-04-27T19:09:01-04:00
   [INFO] 
------------------------------------------------------------------------
   [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-invoker-plugin:3.2.1:run 
(build-drools-test-coverage-jars) on project drools-test-suite: 1 build failed. 
See console output above for details. -> [Help 1]
   ```
   
   # C. Observation
   Looking at the contents of 
`drools-test-coverage/drools-test-coverage-jars/drools-test-coverage-jars-with-invoker/build.log`
 you'll see:
   
   ```
   [INFO] Scanning for projects...
   [INFO]
   [INFO] ---< org.drools.testcoverage:drools-test-coverage-jars-with-invoker 
>---
   [INFO] Building Drools :: Test Coverage :: Jars for tests built by invoker 
999-SNAPSHOT
   [INFO]   from interpolated-pom.xml
   [INFO] --------------------------------[ jar 
]---------------------------------
   [WARNING] Could not transfer metadata 
org.kie:kie-maven-plugin:999-SNAPSHOT/maven-metadata.xml from/to 
block-apache-snapshots (https://repository.apache.org/snapshots/): Blocked 
mirror for repositories: [apache.snapshots 
(https://repository.apache.org/snapshots, default, snapshots)]
   [WARNING] org.kie:kie-maven-plugin:999-SNAPSHOT/maven-metadata.xml failed to 
transfer from https://repository.apache.org/snapshots/ during a previous 
attempt. This failure was cached in the local repository and resolution will 
not be reattempted until the update interval of block-apache-snapshots has 
elapsed or updates are forced. Original error: Could not transfer metadata 
org.kie:kie-maven-plugin:999-SNAPSHOT/maven-metadata.xml from/to 
block-apache-snapshots (https://repository.apache.org/snapshots/): Blocked 
mirror for repositories: [apache.snapshots 
(https://repository.apache.org/snapshots, default, snapshots)]
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  0.229 s
   [INFO] Finished at: 2026-04-27T19:08:54-04:00
   [INFO] 
------------------------------------------------------------------------
   [ERROR] Failed to execute goal on project 
drools-test-coverage-jars-with-invoker: Could not collect dependencies for 
project 
org.drools.testcoverage:drools-test-coverage-jars-with-invoker:jar:999-SNAPSHOT
   [ERROR] Failed to read artifact descriptor for 
org.kie:kie-maven-plugin:jar:999-SNAPSHOT
   [ERROR]      Caused by: The following artifacts could not be resolved: 
org.kie:kie-maven-plugin:pom:999-SNAPSHOT (absent): Could not transfer artifact 
org.kie:kie-maven-plugin:pom:999-SNAPSHOT from/to block-apache-snapshots 
(https://repository.apache.org/snapshots/): Blocked mirror for repositories: 
[apache.snapshots (https://repository.apache.org/snapshots, default, snapshots)]
   [ERROR] -> [Help 1]
   [ERROR]
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR]
   [ERROR] For more information about the errors and possible solutions, please 
read the following articles:
   [ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to