You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "hgschmie (via GitHub)" <gi...@apache.org> on 2023/04/25 03:39:32 UTC

[GitHub] [maven-mvnd] hgschmie opened a new issue, #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1

hgschmie opened a new issue, #841:
URL: https://github.com/apache/maven-mvnd/issues/841

   ```bash
   mvnd --version
   Apache Maven Daemon (mvnd) 1.0-m6 darwin-aarch64 native client (47d4c6b9c399079d91312bb8ae35d1d76e7fd97a)
   Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.osx.OsXNativePty
   Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
   Maven home: /opt/homebrew/Cellar/mvnd/1.0-m6-m39/libexec/mvn
   Java version: 17.0.6, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
   Default locale: en_US, platform encoding: UTF-8
   OS name: "mac os x", version: "13.3.1", arch: "aarch64", family: "mac"
   ```
   
   ```bash
   mvn --version
   Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
   Maven home: /opt/homebrew/Cellar/maven/3.9.1/libexec
   Java version: 17.0.6, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
   Default locale: en_US, platform encoding: UTF-8
   OS name: "mac os x", version: "13.3.1", arch: "aarch64", family: "mac"
   ```
   
   how to reproduce:
   
   ```bash
   % git clone git@github.com:jdbi/jdbi
   % cd jdbi
   % git checkout v3.38.0-rc3
   % mvnd -pl :jdbi3-core -am clean install
   [...]
   [INFO] ------------------------------------------------------------------------
   [INFO] Reactor Summary for jdbi3 build parent 3.38.0-rc3:
   [INFO]
   [INFO] jdbi3 - internal - policy .......................... SUCCESS [  1.670 s]
   [INFO] jdbi3 - internal - build parent .................... FAILURE [  0.095 s]
   [INFO] jdbi3 build parent ................................. SKIPPED
   [INFO] jdbi3 core ......................................... SKIPPED
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  1.828 s (Wall Clock)
   [INFO] Finished at: 2023-04-24T20:23:59-07:00
   [INFO] ------------------------------------------------------------------------
   [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.2.1:enforce (enforce-jdbi) on project jdbi3-build-parent:
   [ERROR] Rule 1: org.apache.maven.enforcer.rules.property.RequireProperty failed with message:
   [ERROR] This module must set a moduleName.
   [ERROR] -> [Help 1]
   ```
   
   Same command with mvn works fine.
   
   Given the way our project sets module names (we use per-module profile activation based on the presence and absence of files in the directories), the most likely culprit is some sort of caching of profile activation.  The correct list of profile activations would be:
   
   ```
   Active Profiles for Project 'org.jdbi.internal:jdbi3-policy:jar:3.38.0-rc3':
   
   The following profiles are active:
   
   
   
   
   Active Profiles for Project 'org.jdbi.internal:jdbi3-build-parent:pom:3.38.0-rc3':
   
   The following profiles are active:
   
    - in-parent (source: org.jdbi.internal:jdbi3-build-parent:3.38.0-rc3)
    - macos arm (source: org.jdbi.internal:jdbi3-build-parent:3.38.0-rc3)
   
   
   
   Active Profiles for Project 'org.jdbi:jdbi3-parent:pom:3.38.0-rc3':
   
   The following profiles are active:
   
    - java17 (source: org.jdbi:jdbi3-parent:3.38.0-rc3)
    - in-parent (source: org.jdbi.internal:jdbi3-build-parent:3.38.0-rc3)
    - macos arm (source: org.jdbi.internal:jdbi3-build-parent:3.38.0-rc3)
   
   
   
   Active Profiles for Project 'org.jdbi:jdbi3-core:jar:3.38.0-rc3':
   
   The following profiles are active:
   
    - java17 (source: org.jdbi:jdbi3-parent:3.38.0-rc3)
    - macos arm (source: org.jdbi.internal:jdbi3-build-parent:3.38.0-rc3)
    - basepom.invoker-reporting (source: org.basepom:basepom-oss:52)
    - basepom.invoker-integration-testing (source: org.basepom:basepom-foundation:52)
   ```
   
   The `in-parent` profile provides a module name. Running the same command with `mvnd` yields no output (!).
   
   output of `mvnd -X -pl :jdbi3-core -am clean install`
   
   [logfile-mvnd.txt](https://github.com/apache/maven-mvnd/files/11316162/logfile-mvnd.txt)
   
   output of `mvn -X -pl :jdbi3-core -am clean install`
   
   [logfile-mvn.txt](https://github.com/apache/maven-mvnd/files/11316160/logfile-mvn.txt)
   
   


-- 
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.apache.org

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


[GitHub] [maven-mvnd] hgschmie commented on issue #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie commented on issue #841:
URL: https://github.com/apache/maven-mvnd/issues/841#issuecomment-1537212922

   pretty ping?


-- 
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-mvnd] gnodet commented on issue #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on issue #841:
URL: https://github.com/apache/maven-mvnd/issues/841#issuecomment-1542661421

   The fix is available at https://github.com/takari/takari-smart-builder/pull/25 


-- 
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-mvnd] hgschmie commented on issue #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie commented on issue #841:
URL: https://github.com/apache/maven-mvnd/issues/841#issuecomment-1537244819

   This also fails only with the `smart` builder. When using `--builder=singlethreaded` or `--builder=multithreaded`, the build succeeds.


-- 
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-mvnd] electrum commented on issue #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1

Posted by "electrum (via GitHub)" <gi...@apache.org>.
electrum commented on issue #841:
URL: https://github.com/apache/maven-mvnd/issues/841#issuecomment-1539207851

   @hgschmie thanks for tracking this down and filing the issue. We've been hitting this as well. I can confirm that putting `mvnd.builder=multithreaded` in my `~/.m2/mvnd.properties` file works around the issue for me.


-- 
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-mvnd] gnodet commented on issue #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on issue #841:
URL: https://github.com/apache/maven-mvnd/issues/841#issuecomment-1542333242

   So this problem is caused by a combination of two factors:
     * `mvnd` caches the realm, this is usually not a problem, but it is in the case of enforcer
     * the problem happens only if the modules are built in a given order
   
   What happens is that when the first module is built, the enforcer loads the rules, including the `requireProperty` one.  The first execution works fine.  However, during the second execution, the enforcer does not reload the rules, thereby executing the rule which should not be configured, hence the failure.


-- 
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-mvnd] hgschmie commented on issue #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie commented on issue #841:
URL: https://github.com/apache/maven-mvnd/issues/841#issuecomment-1537243430

   Quick update: I built the current trunk from scratch with 
   ```
   openjdk 17.0.6 2023-01-17
   OpenJDK Runtime Environment GraalVM CE 22.3.1 (build 17.0.6+10-jvmci-22.3-b13)
   OpenJDK 64-Bit Server VM GraalVM CE 22.3.1 (build 17.0.6+10-jvmci-22.3-b13, mixed mode, sharing)
   ```
   
   and tried both the m39 and m40 variants. Same result. So this is a problem that still exists in the current version and it is not confined specifically to maven 3.9 or maven 4.0
   


-- 
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-mvnd] gnodet commented on issue #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on issue #841:
URL: https://github.com/apache/maven-mvnd/issues/841#issuecomment-1542571864

   My analysis was wrong.  The problem seems to come from the MavenSession injected into plexus components for the enforcer realm, which does not point to the correct project.


-- 
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-mvnd] gnodet closed issue #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #841: Regression mvnd 1.0-m6 vs. mvn 3.9.1
URL: https://github.com/apache/maven-mvnd/issues/841


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