Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maven-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4
with:
maven4-build: true
maven4-version: '4.0.0-rc-3' # as in project, rc-4 needs some work
maven4-version: '4.0.0-rc-5' # as in project
15 changes: 14 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ under the License.

<properties>
<javaVersion>17</javaVersion>
<mavenVersion>4.0.0-rc-3</mavenVersion>
<mavenVersion>4.0.0-rc-5</mavenVersion>

<guiceVersion>6.0.0</guiceVersion>
<mavenAntrunPluginVersion>${version.maven-antrun-plugin}</mavenAntrunPluginVersion>
Expand Down Expand Up @@ -105,6 +105,19 @@ under the License.
<artifactId>guava</artifactId>
<version>33.6.0-jre</version>
</dependency>
<!--
maven-plugin-testing-harness 4.0.0-beta-4 transitively pins maven-xml to 4.0.0-rc-3
and pulls in maven-xml-impl 4.0.0-alpha-9 (an artifact ID that no longer exists
from rc-4 onward; the XmlService implementation moved into maven-xml itself).
Pin maven-xml to ${mavenVersion} so the right XmlService provider is on the
test classpath; otherwise Holder.<clinit> fails with
"No XmlService implementation found" and every unit test errors out.
-->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-xml</artifactId>
<version>${mavenVersion}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
15 changes: 12 additions & 3 deletions src/it/MDEPLOY-169_deploy-at-end-multithread/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
* under the License.
*/

assert new File( basedir, "target/repo/org/apache/maven/its/mdeploy-169/multithread/1.0/multithread-1.0.pom" ).exists()
assert new File( basedir, "module1/target/repo/org/apache/maven/its/mdeploy-169/module1/1.0/module1-1.0.pom" ).exists()
assert new File( basedir, "module2/target/repo/org/apache/maven/its/mdeploy-169/module2/1.0/module2-1.0.pom" ).exists()
rootRepo = new File( basedir, "target/repo" )
module1Repo = new File( basedir, "module1/target/repo" )
module2Repo = new File( basedir, "module2/target/repo" )

if (mavenVersion.startsWith('4.')) {
// Maven 4 deploys in the root target directory, as defined in the root POM
module1Repo = module2Repo = rootRepo
}

assert new File( rootRepo, "org/apache/maven/its/mdeploy-169/multithread/1.0/multithread-1.0.pom" ).exists()
assert new File( module1Repo, "org/apache/maven/its/mdeploy-169/module1/1.0/module1-1.0.pom" ).exists()
assert new File( module2Repo, "org/apache/maven/its/mdeploy-169/module2/1.0/module2-1.0.pom" ).exists()
15 changes: 12 additions & 3 deletions src/it/MDEPLOY-170_deploy-at-end-configperproject/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
* under the License.
*/

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() )
rootRepo = new File( basedir, "target/repo" )
module1Repo = new File( basedir, "module1/target/repo" )
module2Repo = new File( basedir, "module1/target/repo" )

if (mavenVersion.startsWith('4.')) {
// Maven 4 deploys in the root target directory, as defined in the root POM
module1Repo = module2Repo = rootRepo
}

assert new File( rootRepo, "org/apache/maven/its/mdeploy-170/configperproject/1.0/configperproject-1.0.pom" ).exists()
assert new File( module1Repo, "org/apache/maven/its/mdeploy-170/module1/1.0/module1-1.0.pom" ).exists()
assert !( new File( module2Repo, "org/apache/maven/its/mdeploy-170/module2/1.0/module2-1.0.pom" ).exists() )
2 changes: 1 addition & 1 deletion src/it/MDEPLOY-224_deploy-at-end-only-modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<version>1.0</version>
<packaging>pom</packaging>

<description>Tests deployment at end only in modules.</description>
<description>Tests deployment at end only in modules. https://github.com/apache/maven-deploy-plugin/issues/374</description>

<modules>
<module>module1</module>
Expand Down
15 changes: 12 additions & 3 deletions src/it/MDEPLOY-224_deploy-at-end-only-modules/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,18 @@
* under the License.
*/

assert new File( basedir, "target/repo/org/apache/maven/its/mdeploy-224/parent/1.0/parent-1.0.pom" ).exists()
assert new File( basedir, "module1/target/repo/org/apache/maven/its/mdeploy-224/module1/1.0/module1-1.0.pom" ).exists()
assert new File( basedir, "module2/target/repo/org/apache/maven/its/mdeploy-224/module2/1.0/module2-1.0.pom" ).exists()
rootRepo = new File( basedir, "target/repo" )
module1Repo = new File( basedir, "module1/target/repo" )
module2Repo = new File( basedir, "module2/target/repo" )

if (mavenVersion.startsWith('4.')) {
// Maven 4 deploys in the root target directory, as defined in the root POM
module1Repo = module2Repo = rootRepo
}

assert new File( rootRepo, "org/apache/maven/its/mdeploy-224/parent/1.0/parent-1.0.pom" ).exists()
assert new File( module1Repo, "org/apache/maven/its/mdeploy-224/module1/1.0/module1-1.0.pom" ).exists()
assert new File( module2Repo, "org/apache/maven/its/mdeploy-224/module2/1.0/module2-1.0.pom" ).exists()

def buildLog = new File ( basedir, "build.log").text

Expand Down
2 changes: 1 addition & 1 deletion src/it/MDEPLOY-225_deploy-at-end-skip-root/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<version>1.0</version>
<packaging>pom</packaging>

<description>Tests deployment at end with skipped root project.</description>
<description>Tests deployment at end with skipped root project. https://github.com/apache/maven-deploy-plugin/issues/533</description>

<modules>
<module>module1</module>
Expand Down
18 changes: 15 additions & 3 deletions src/it/MDEPLOY-225_deploy-at-end-skip-root/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
* under the License.
*/

assert ! new File( basedir, "target/repo" ).exists()
assert new File( basedir, "module1/target/repo/org/apache/maven/its/mdeploy-225/module1/1.0/module1-1.0.pom" ).exists()
assert new File( basedir, "module2/target/repo/org/apache/maven/its/mdeploy-225/module2/1.0/module2-1.0.pom" ).exists()
rootRepo = new File( basedir, "target/repo" )
module1Repo = new File( basedir, "module1/target/repo" )
module2Repo = new File( basedir, "module2/target/repo" )

if (mavenVersion.startsWith('4.')) {
// Maven 4 deploys in the root target directory, as defined in the root POM (even if not deployed)
module1Repo = module2Repo = rootRepo
} else {
// Maven 3 deploys in the each module target directory, nothing in root
assert ! rootRepo.exists()
}

// check that files are deployed both by Maven 3 and 4 = https://github.com/apache/maven-deploy-plugin/issues/533
assert new File( module1Repo, "org/apache/maven/its/mdeploy-225/module1/1.0/module1-1.0.pom" ).exists()
assert new File( module2Repo, "org/apache/maven/its/mdeploy-225/module2/1.0/module2-1.0.pom" ).exists()
10 changes: 5 additions & 5 deletions src/it/deploy-attached-sources/test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
# under the License.

# Properties passed to invocations of the deploy plugin
pomFile = ${project.basedir}/pom.xml
pomFile = pom.xml

file = ${project.basedir}/target/${project.artifactId}-${project.version}.jar
sources = ${project.basedir}/target/${project.artifactId}-${project.version}-sources.jar
javadoc = ${project.basedir}/target/${project.artifactId}-${project.version}-javadoc.jar
file = target/test-1.0-SNAPSHOT.jar
sources = target/test-1.0-SNAPSHOT-sources.jar
javadoc = target/test-1.0-SNAPSHOT-javadoc.jar

url = file://${project.basedir}/target/repo
url=file:./target/repo
4 changes: 2 additions & 2 deletions src/it/deploy-default-packaging/test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
groupId = org.apache.maven.test
artifactId = test
version = 1.1
file = ${project.basedir}/lib/test-1.1.jar
url = file://${project.basedir}/target/repo
file = lib/test-1.1.jar
url = file:./target/repo
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public void execute() throws MojoException {
ProducedArtifact deployable = session.createProducedArtifact(
artifact.getGroupId(),
artifact.getArtifactId(),
artifact.getVersion().asString(),
artifact.getVersion().toString(),
classifiers.substring(ci, nci).trim(),
extension,
type);
Expand Down