You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "hboutemy (via GitHub)" <gi...@apache.org> on 2026/03/26 20:38:13 UTC

[PR] enable build with Maven 4 [maven-deploy-plugin]

hboutemy opened a new pull request, #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655

   build with Maven 4 in CI, to check if maven-deploy-plugin 3.x works with Maven 4
   
   and complete the table on https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=406620656#Maven4.0.0GAchecklist-Maven4API
   
   


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655#issuecomment-5011697621

   @hboutemy Please assign appropriate label to PR according to the type of change.


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy merged PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "Bukama (via GitHub)" <gi...@apache.org>.
Bukama commented on PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655#issuecomment-4413370793

   Interesting: The four ITs with JIRA-issueID overwrite `deployAtEnd` value to `true` fail. This is the new default in version 4.x of the plugin, but we are testing 3.x so this should not make any difference when choosing the path to deploy.
   
   
   I still could not figure out why the `distributionManagement` is ignored for subprojects
   
   
   ```
   <!-- Set in parent of the IT project -->
   
   <distributionManagement>
     <repository>
       <id>it</id>
       <url>file:///${basedir}/target/repo</url>
     </repository>
   </distributionManagement>
   
   
   // All files are deployed there
   [INFO] Uploading to it: file:///D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-170_deploy-at-end-configperproject/target/repo/org/apache/maven/its/mdeploy-170/configperproject/1.0/configperproject-1.0-build.pom
   
   // Even subprojects files
   [INFO] Uploading to it: file:///D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-170_deploy-at-end-configperproject/target/repo/org/apache/maven/its/mdeploy-170/module1/1.0/module1-1.0.pom
   ```
   
   The file exists there (See screenshot below), but the verify script checks the target folder inside each subproject
   
   
   ```
   verify-script:
   
   assert new File( basedir, "target/repo/org/apache/maven/its/mdeploy-170/configperproject/1.0/configperproject-1.0.pom" ).exists()
   assert new File( basedir, "module1/target/repo/org/apache/maven/its/mdeploy-170/module1/1.0/module1-1.0.pom" ).exists()
   assert !( new File( basedir, "module2/target/repo/org/apache/maven/its/mdeploy-170/module2/1.0/module2-1.0.pom" ).exists() )
   
   
   Assertion failed:
   
   assert new File( basedir, "module1/target/repo/org/apache/maven/its/mdeploy-170/module1/1.0/module1-1.0.pom" ).exists()
   | | |
   | D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-170_deploy-at-end-configperproject false
   D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-170_deploy-at-end-configperproject\module1\target\repo\org\apache\maven\its\mdeploy-170\module1\1.0\module1-1.0.pom
   
   ```
   
   The file exists, but in the target repository of the parent
   
   `D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-170_deploy-at-end-configperproject\target\repo\org\apache\maven\its\mdeploy-170\module1\1.0`
   
   <img width="1566" height="557" alt="image" src="https://github.com/user-attachments/assets/95c23e68-cdd8-4c3d-b564-a1e27ca56f7c" />
   
   
   
   So what has changed here in Maven 4? 


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "Bukama (via GitHub)" <gi...@apache.org>.
Bukama commented on PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655#issuecomment-4412933189

   ```
   [INFO] -------------------------------------------------
   [ERROR] The following builds failed:
   [ERROR] *  deploy-attached-sources\pom.xml
   [ERROR] *  deploy-default-packaging\pom.xml
   [ERROR] *  MDEPLOY-169_deploy-at-end-multithread\pom.xml
   [ERROR] *  MDEPLOY-170_deploy-at-end-configperproject\pom.xml
   [ERROR] *  MDEPLOY-224_deploy-at-end-only-modules\pom.xml
   [ERROR] *  MDEPLOY-225_deploy-at-end-skip-root\pom.xml
   ```


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "Bukama (via GitHub)" <gi...@apache.org>.
Bukama commented on PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655#issuecomment-4638905127

   @cstamas Could you please check if those a resolver related?


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "Bukama (via GitHub)" <gi...@apache.org>.
Bukama commented on PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655#issuecomment-4638239463

   
   Looking at `deploy-attached-sources` and `deploy-default-packaging`
   
   
   Logs are from `deploy-attached-sources`
   
   Packaging is right into local repository
   
   ```
   [DEBUG] isUp2date: false (Destination D:\Github\Maven\maven-deploy-plugin\target\it\deploy-attached-sources\target\test-1.0-SNAPSHOT.jar not found.)
   [INFO] Building jar: D:\Github\Maven\maven-deploy-plugin\target\it\deploy-attached-sources\target\test-1.0-SNAPSHOT.jar
   ```
   
   
   But deploying does not pick the project path information when using 4.0.0-SNAPSHOT
   ```
   [INFO] --- deploy:3.1.5-SNAPSHOT:deploy-file (default-cli) @ test ---
   [DEBUG] Collector skip mode enabled: versionless (key function GACE)
   [DEBUG] Reading file model from org.codehaus.plexus:plexus-xml:3.0.1
   [DEBUG] Reading file model from org.codehaus.plexus:plexus-utils:4.0.2
   [DEBUG] Reading file model from org.codehaus.plexus:plexus:18
   [DEBUG] Reading file model from org.apache.maven.resolver:maven-resolver-util:1.9.27
   [DEBUG] Reading file model from org.junit:junit-bom:5.10.2
   [DEBUG] Reading file model from org.apache.maven.resolver:maven-resolver:1.9.27
   [DEBUG] Reading file model from org.apache.maven.resolver:maven-resolver-api:1.9.27
   [DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=332800, ConflictMarker.markTime=56900, ConflictMarker.nodeCount=5, ConflictIdSorter.graphTime=184300, ConflictIdSorter.topsortTime=169300, ConflictIdSorter.conflictIdCount=5, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2401000, ConflictResolver.conflictItemCount=5, BfDependencyCollector.collectTime=49614500, BfDependencyCollector.transformTime=5093600}
   [DEBUG] org.apache.maven.plugins:maven-deploy-plugin:jar:3.1.5-SNAPSHOT
   [DEBUG] +- org.codehaus.plexus:plexus-utils:jar:4.0.2 [compile]
   [DEBUG] +- org.codehaus.plexus:plexus-xml:jar:3.0.1 [compile]
   [DEBUG] \- org.apache.maven.resolver:maven-resolver-util:jar:1.9.27 [compile]
   [DEBUG]    \- org.apache.maven.resolver:maven-resolver-api:jar:1.9.27 [compile]
   [DEBUG]   Excluded: org.apache.maven.resolver:maven-resolver-util:jar:1.9.27
   [DEBUG]   Excluded: org.apache.maven.resolver:maven-resolver-api:jar:1.9.27
   [DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT
   [DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT
   [DEBUG]   Imported:  < maven.api
   [DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT
   [DEBUG]   Included: org.apache.maven.plugins:maven-deploy-plugin:jar:3.1.5-SNAPSHOT
   [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:4.0.2
   [DEBUG]   Included: org.codehaus.plexus:plexus-xml:jar:3.0.1
   [DEBUG] Loading mojo org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT:deploy-file from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@5bc2b487]
   [DEBUG] Configuring mojo execution 'org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT:deploy-file:default-cli' with basic configurator -->
   [DEBUG]   (f) file = D:\target\-.jar
   [DEBUG]   (f) generatePom = true
   [DEBUG]   (f) javadoc = D:\target\--javadoc.jar
   [DEBUG]   (f) offline = false
   [DEBUG]   (f) pomFile = D:\pom.xml
   [DEBUG]   (f) repositoryId = remote-repository
   [DEBUG]   (f) retryFailedDeploymentCount = 1
   [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@526f6427
   [DEBUG]   (f) skip = false
   [DEBUG]   (f) sources = D:\target\--sources.jar
   [DEBUG]   (f) url = file:///target/repo
   [DEBUG] -- end configuration --
   ```
   
   and therefor fails.
   
   With Maven 3.9.16 the configuration is correct
   
   ```
   [INFO] --- deploy:3.1.5-SNAPSHOT:deploy-file (default-cli) @ test ---
   [DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=417500, ConflictMarker.markTime=50900, ConflictMarker.nodeCount=5, ConflictIdSorter.graphTime=224200, ConflictIdSorter.topsortTime=237100, ConflictIdSorter.conflictIdCount=5, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2037500, ConflictResolver.conflictItemCount=5, DfDependencyCollector.collectTime=54384700, DfDependencyCollector.transformTime=4312800}
   [DEBUG] org.apache.maven.plugins:maven-deploy-plugin:jar:3.1.5-SNAPSHOT
   [DEBUG]    org.codehaus.plexus:plexus-utils:jar:4.0.2:compile
   [DEBUG]    org.codehaus.plexus:plexus-xml:jar:3.0.1:compile
   [DEBUG]    org.apache.maven.resolver:maven-resolver-util:jar:1.9.27:compile
   [DEBUG]       org.apache.maven.resolver:maven-resolver-api:jar:1.9.27:compile
   [DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT
   [DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT
   [DEBUG]   Imported:  < maven.api
   [DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT
   [DEBUG]   Included: org.apache.maven.plugins:maven-deploy-plugin:jar:3.1.5-SNAPSHOT
   [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:4.0.2
   [DEBUG]   Included: org.codehaus.plexus:plexus-xml:jar:3.0.1
   [DEBUG] Loading mojo org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT:deploy-file from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@5bc2b487]
   [DEBUG] Configuring mojo execution 'org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT:deploy-file:default-cli' with basic configurator -->
   [DEBUG]   (f) file = D:\Github\Maven\maven-deploy-plugin\target\it\deploy-attached-sources\target\test-1.0-SNAPSHOT.jar
   [DEBUG]   (f) generatePom = true
   [DEBUG]   (f) javadoc = D:\Github\Maven\maven-deploy-plugin\target\it\deploy-attached-sources\target\test-1.0-SNAPSHOT-javadoc.jar
   [DEBUG]   (f) offline = false
   [DEBUG]   (f) pomFile = D:\Github\Maven\maven-deploy-plugin\target\it\deploy-attached-sources\pom.xml
   [DEBUG]   (f) repositoryId = remote-repository
   [DEBUG]   (f) retryFailedDeploymentCount = 1
   [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@1416cf9f
   [DEBUG]   (f) skip = false
   [DEBUG]   (f) sources = D:\Github\Maven\maven-deploy-plugin\target\it\deploy-attached-sources\target\test-1.0-SNAPSHOT-sources.jar
   [DEBUG]   (f) url = file://D:\Github\Maven\maven-deploy-plugin\target\it\deploy-attached-sources/target/repo
   ```


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy commented on PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655#issuecomment-4698265588

   the 4 deployAtEnd IT failures should be fixed by #667 


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy commented on PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655#issuecomment-4698296441

   on `deploy-attached-sources` IT failure, yes, values seem not injected properly
   I think this is a bug in `maven-invoker-plugin` because https://github.com/apache/maven-deploy-plugin/blob/master/src/it/deploy-attached-sources/test.properties interpolation should do the job in Maven 4 as it does in Maven 3
   


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy commented on PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655#issuecomment-4698885519

   running `mvn -Prun-its clean verify -Dinvoker.test='deploy-default-packaging,deploy-attached-sources' -X` 
   and looking at the invocations of mvn command
   shows that both Maven 3 and 4 invoke with the same command, like
   
   ```
   [DEBUG] Executing: /bin/sh -c cd '/home/herve/dev/maven/sources/plugins/core/maven-deploy-plugin/target/it/deploy-attached-sources' && '/home/herve/.sdkman/candidates/maven/4.0.0-SNAPSHOT/bin/mvn' '-B' '-X' '-D' 'maven.repo.local=/home/herve/dev/maven/sources/plugins/core/maven-deploy-plugin/target/local-repo' '-s' '/home/herve/dev/maven/sources/plugins/core/maven-deploy-plugin/target/it/interpolated-settings.xml' '-D' 'javadoc=${basedir}/target/${project.artifactId}-${project.version}-javadoc.jar' '-D' 'file=${basedir}/target/${project.artifactId}-${project.version}.jar' '-D' 'sources=${basedir}/target/${project.artifactId}-${project.version}-sources.jar' '-D' 'url=file://${basedir}/target/repo' '-D' 'pomFile=${basedir}/pom.xml' 'org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT:deploy-file'
   ```
   
   it seems it is interpolation of `${basedir}` or `${project.artifactId}` at command-line level that does not work the same way between Maven 3 and 4
   ... continuing the analysis...


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


Re: [PR] enable build with Maven 4 [maven-deploy-plugin]

Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy commented on PR #655:
URL: https://github.com/apache/maven-deploy-plugin/pull/655#issuecomment-4698924924

   ok, issue is easy to reproduce in any project that has a `pom.xml`:
   
   ```
   mvn install:install-file -Dfile='${basedir}/target/${project.artifactId}-${project.version}.jar' -DpomFile='${basedir}/pom.xml'
   ```
   
   with Maven 4:
   ```
   [INFO] --- install:3.1.3:install-file (default-cli) @ test ---
   [ERROR] The specified file '/target/-.jar' does not exist
   ```
   


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