Skip to content

enable build with Maven 4#655

Open
hboutemy wants to merge 1 commit intomaven-deploy-plugin-3.xfrom
maven4-enabled
Open

enable build with Maven 4#655
hboutemy wants to merge 1 commit intomaven-deploy-plugin-3.xfrom
maven4-enabled

Conversation

@hboutemy
Copy link
Copy Markdown
Member

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

@Bukama
Copy link
Copy Markdown
Contributor

Bukama commented May 9, 2026

[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

edit:

deploy-attached-sources

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT:deploy-file (default-cli) on project test: D:\target-.jar not found.

deploy-default-packaging

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.1.5-SNAPSHOT:deploy-file (default-cli) on project test: D:\lib\test-1.1.jar not found

MDEPLOY-169_deploy-at-end-multithread

Assertion failed:

assert new File( basedir, "module1/target/repo/org/apache/maven/its/mdeploy-169/module1/1.0/module1-1.0.pom" ).exists()
| | |
| D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-169_deploy-at-end-multithread false
D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-169_deploy-at-end-multithread\module1\target\repo\org\apache\maven\its\mdeploy-169\module1\1.0\module1-1.0.pom

[INFO] Installing D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-169_deploy-at-end-multithread\module1\target\consumer-6293687905353999056.pom to D:\Github\Maven\maven-deploy-plugin\target\local-repo\org\apache\maven\its\mdeploy-169\module1\1.0\module1-1.0.pom

MDEPLOY-170_deploy-at-end-configperproject

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

[INFO] Installing D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-170_deploy-at-end-configperproject\module1\target\consumer-1389750655688884827.pom to D:\Github\Maven\maven-deploy-plugin\target\local-repo\org\apache\maven\its\mdeploy-170\module1\1.0\module1-1.0.pom

MDEPLOY-224_deploy-at-end-only-modules

Assertion failed:

assert new File( basedir, "module1/target/repo/org/apache/maven/its/mdeploy-224/module1/1.0/module1-1.0.pom" ).exists()
| | |
| D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-224_deploy-at-end-only-modules false
D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-224_deploy-at-end-only-modules\module1\target\repo\org\apache\maven\its\mdeploy-224\module1\1.0\module1-1.0.pom

[INFO] Installing D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-224_deploy-at-end-only-modules\module1\target\consumer-10985243690833197708.pom to D:\Github\Maven\maven-deploy-plugin\target\local-repo\org\apache\maven\its\mdeploy-224\module1\1.0\module1-1.0.pom

MDEPLOY-225_deploy-at-end-skip-root

Assertion failed:

assert ! new File( basedir, "target/repo" ).exists()
| | | |
| | | true
| | D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-225_deploy-at-end-skip-root
| D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-225_deploy-at-end-skip-root\target\repo
false

[INFO] Installing D:\Github\Maven\maven-deploy-plugin\target\it\MDEPLOY-225_deploy-at-end-skip-root\pom.xml to D:\Github\Maven\maven-deploy-plugin\target\local-repo\org\apache\maven\its\mdeploy-225\parent\1.0\parent-1.0-build.pom

@Bukama
Copy link
Copy Markdown
Contributor

Bukama commented May 9, 2026

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

image

So what has changed here in Maven 4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants