Skip to content

Commit db78c5c

Browse files
gnodetbmarwell
authored andcommitted
[MSOURCES-149] Switch to the Maven 4 API
IT MSOURCES-140 is broken because of apache/maven#1587 # Conflicts: # pom.xml # src/test/java/org/apache/maven/plugins/source/SourceJarMojoTest.java
1 parent 10abbb4 commit db78c5c

29 files changed

+364
-1196
lines changed

.github/workflows/maven-verify.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ jobs:
2525
build:
2626
name: Verify
2727
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4
28+
with:
29+
ff-maven: "4.0.0-beta-3" # Maven version for fail-fast-build
30+
maven-matrix: '[ "4.0.0-beta-3" ]'
31+
jdk-matrix: '[ "17", "21" ]'

src/it/MSOURCES-121/verify.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919

2020
File buildLog = new File( basedir, 'build.log' )
2121

22-
assert buildLog.text =~ /\[ERROR\] Artifact org.apache.maven.its.sources:jar-no-fork:java-source:sources:1.0-SNAPSHOT already attached to a file target.jar-no-fork-1.0-SNAPSHOT-sources.jar: attach to target.jar-no-fork-1.0-SNAPSHOT-secondary-sources.jar should be done with another classifier/
22+
var fs = File.separatorChar == '\\' ? "\\\\" : "/"
23+
assert buildLog.text =~ /\[ERROR\] Artifact org.apache.maven.its.sources:jar-no-fork:jar:sources:1.0-SNAPSHOT already attached to a file target${fs}jar-no-fork-1.0-SNAPSHOT-sources.jar: attach to target${fs}jar-no-fork-1.0-SNAPSHOT-secondary-sources.jar should be done with another classifier/

src/it/MSOURCES-140/invoker.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
# under the License.
1717
invoker.buildResult = success
1818
invoker.goals = package clean install
19+
20+
# maven 4.0.0-beta-3 is broken because of https://github.com/apache/maven/pull/1587
21+
invoker.maven.version = 4.0.0-beta-4+

src/it/MSOURCES-140/verify.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
File buildLog = new File( basedir, 'build.log' )
2121

22-
assert buildLog.text =~ /\[INFO\] Artifact org.apache.maven.its.sources:jar-no-fork:java-source:sources:1.0-SNAPSHOT already attached to target.jar-no-fork-1.0-SNAPSHOT-sources.jar: ignoring same re-attach \(same artifact, same file\)/
22+
assert buildLog.text =~ /\[INFO\] Artifact org.apache.maven.its.sources:jar-no-fork:jar:sources:1.0-SNAPSHOT already attached to target" + File.separator + "jar-no-fork-1.0-SNAPSHOT-sources.jar: ignoring same re-attach \(same artifact, same file\)/

src/it/MSOURCES-62/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ under the License.
3939
<phase>package</phase>
4040
<configuration>
4141
<archive>
42-
<index>true</index>
4342
<addMavenDescriptor>false</addMavenDescriptor>
4443
<compress>true</compress>
4544
<manifestEntries>

0 commit comments

Comments
 (0)