Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package maven-source-plugin for
openSUSE:Factory checked in at 2025-12-01 11:13:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/maven-source-plugin (Old)
and /work/SRC/openSUSE:Factory/.maven-source-plugin.new.14147 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "maven-source-plugin"
Mon Dec 1 11:13:42 2025 rev:6 rq:1320568 version:3.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/maven-source-plugin/maven-source-plugin.changes
2025-07-22 12:54:38.093892471 +0200
+++
/work/SRC/openSUSE:Factory/.maven-source-plugin.new.14147/maven-source-plugin.changes
2025-12-01 11:14:08.908607212 +0100
@@ -1,0 +2,27 @@
+Sat Nov 29 05:19:43 UTC 2025 - Fridrich Strba <[email protected]>
+
+- Upgrade to version 3.4.0
+ * Bug Fixes
+ + MSOURCES-140: fail only if re-attach different files
+ * Maintenance
+ + Bump m-invoker-p to 3.9.1
+ + Allow to manually execute release drafter
+ + GH Issues (Maven 3 branch)
+ + MNGSITE-529: Rename "Goals" to "Plugin Documentation"
+ * Dependency updates
+ + Use plexus-utils version from parent
+ + MSOURCES-146: Bump commons-io:commons-io from 2.11.0 to 2.16.0
+ + Bump commons-io:commons-io from 2.16.0 to 2.21.0
+ + MSOURCES-147: Bump org.codehaus.plexus:plexus-archiver from
+ 4.9.1 to 4.9.2
+ + Bump org.codehaus.plexus:plexus-archiver from 4.9.2 to 4.10.4
+ + MSOURCES-145: Bump org.apache.maven:maven-archiver from 3.6.1
+ to 3.6.2
+ + Bump org.apache.maven:maven-archiver from 3.6.2 to 3.6.5
+ + Bump org.apache.maven.plugin-testing:maven-plugin-testing-harness
+ from 3.3.0 to 3.4.0
+ + Bump mavenVersion from 3.2.5 to 3.9.11
+ + Bump org.apache.maven.plugins:maven-plugins from 41 to 45
+ + Bump org.codehaus.plexus:plexus-utils from 3.5.1 to 3.6.0
+
+-------------------------------------------------------------------
Old:
----
maven-source-plugin-3.3.1-source-release.zip
New:
----
_scmsync.obsinfo
build.specials.obscpio
maven-source-plugin-3.4.0-source-release.zip
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ maven-source-plugin.spec ++++++
--- /var/tmp/diff_new_pack.u3YfsS/_old 2025-12-01 11:14:09.368626685 +0100
+++ /var/tmp/diff_new_pack.u3YfsS/_new 2025-12-01 11:14:09.372626854 +0100
@@ -1,7 +1,7 @@
#
# spec file for package maven-source-plugin
#
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: maven-source-plugin
-Version: 3.3.1
+Version: 3.4.0
Release: 0
Summary: Plugin for creating source JARs
License: Apache-2.0
++++++ _scmsync.obsinfo ++++++
mtime: 1764393761
commit: 3cb0c8c4c2a72da9d1bfbdfdd1b3ffecb1bca1a67d0b37c7c63b89c8c9b6cd69
url: https://src.opensuse.org/java-packages/maven-source-plugin.git
revision: 3cb0c8c4c2a72da9d1bfbdfdd1b3ffecb1bca1a67d0b37c7c63b89c8c9b6cd69
projectscmsync: https://src.opensuse.org/java-packages/_ObsPrj
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2025-11-29 06:23:26.000000000 +0100
@@ -0,0 +1 @@
+.osc
++++++ maven-source-plugin-3.3.1-source-release.zip ->
maven-source-plugin-3.4.0-source-release.zip ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/maven-source-plugin-3.3.1/DEPENDENCIES
new/maven-source-plugin-3.4.0/DEPENDENCIES
--- old/maven-source-plugin-3.3.1/DEPENDENCIES 2024-03-30 01:48:50.000000000
+0100
+++ new/maven-source-plugin-3.4.0/DEPENDENCIES 2025-11-22 22:27:04.000000000
+0100
@@ -8,37 +8,37 @@
From: 'an unknown organization'
+ - aircompressor (https://github.com/airlift/aircompressor)
io.airlift:aircompressor:jar:0.27
+ License: Apache License 2.0
(https://www.apache.org/licenses/LICENSE-2.0.html)
+
- javax.inject (http://code.google.com/p/atinject/)
javax.inject:javax.inject:jar:1
License: The Apache Software License, Version 2.0
(http://www.apache.org/licenses/LICENSE-2.0.txt)
- - snappy (http://github.com/dain/snappy) org.iq80.snappy:snappy:jar:0.4
- License: Apache License 2.0
(http://www.apache.org/licenses/LICENSE-2.0.html)
-
- - XZ for Java (https://tukaani.org/xz/java.html) org.tukaani:xz:jar:1.9
- License: Public Domain
+ - XZ for Java (https://tukaani.org/xz/java.html) org.tukaani:xz:jar:1.10
+ License: 0BSD
-From: 'Codehaus' (http://www.codehaus.org/)
+From: 'Codehaus Plexus' (https://codehaus-plexus.github.io/)
- - Plexus Interpolation API
(http://plexus.codehaus.org/plexus-components/plexus-interpolation)
org.codehaus.plexus:plexus-interpolation:jar:1.21
- License: The Apache Software License, Version 2.0
(http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Plexus Archiver Component
(https://codehaus-plexus.github.io/plexus-archiver/)
org.codehaus.plexus:plexus-archiver:jar:4.10.4
+ License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Plexus Interpolation API
(https://codehaus-plexus.github.io/plexus-pom/plexus-interpolation/)
org.codehaus.plexus:plexus-interpolation:bundle:1.28
+ License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
-From: 'Codehaus Plexus' (https://codehaus-plexus.github.io/)
+ - Plexus IO Components
(https://codehaus-plexus.github.io/plexus-pom/plexus-io/)
org.codehaus.plexus:plexus-io:jar:3.6.0
+ License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
- - Plexus Archiver Component
(https://codehaus-plexus.github.io/plexus-archiver/)
org.codehaus.plexus:plexus-archiver:jar:4.9.1
+ - Plexus Common Utilities (https://codehaus-plexus.github.io/plexus-utils/)
org.codehaus.plexus:plexus-utils:jar:4.0.2
License: Apache License, Version 2.0
(https://www.apache.org/licenses/LICENSE-2.0.txt)
- - Plexus IO Components (https://codehaus-plexus.github.io/plexus-io/)
org.codehaus.plexus:plexus-io:jar:3.4.1
- License: Apache License, Version 2.0
(http://www.apache.org/licenses/LICENSE-2.0.txt)
-
- - Plexus Common Utilities (https://codehaus-plexus.github.io/plexus-utils/)
org.codehaus.plexus:plexus-utils:jar:3.5.1
- License: Apache License, Version 2.0
(http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Plexus XML Utilities (https://codehaus-plexus.github.io/plexus-xml/)
org.codehaus.plexus:plexus-xml:jar:3.0.1
+ License: Apache License, Version 2.0
(https://www.apache.org/licenses/LICENSE-2.0.txt)
From: 'com.github.luben'
- - zstd-jni (https://github.com/luben/zstd-jni)
com.github.luben:zstd-jni:jar:1.5.5-11
+ - zstd-jni (https://github.com/luben/zstd-jni)
com.github.luben:zstd-jni:jar:1.5.7-6
License: BSD 2-Clause License
(https://opensource.org/licenses/BSD-2-Clause)
@@ -50,13 +50,19 @@
From: 'The Apache Software Foundation' (https://www.apache.org/)
- - Apache Commons IO (https://commons.apache.org/proper/commons-io/)
commons-io:commons-io:jar:2.11.0
- License: Apache License, Version 2.0
(https://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Apache Commons Codec (https://commons.apache.org/proper/commons-codec/)
commons-codec:commons-codec:jar:1.19.0
+ License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
+
+ - Apache Commons IO (https://commons.apache.org/proper/commons-io/)
commons-io:commons-io:jar:2.21.0
+ License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
+
+ - Apache Commons Compress
(https://commons.apache.org/proper/commons-compress/)
org.apache.commons:commons-compress:jar:1.28.0
+ License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
- - Apache Commons Compress
(https://commons.apache.org/proper/commons-compress/)
org.apache.commons:commons-compress:jar:1.25.0
+ - Apache Commons Lang (https://commons.apache.org/proper/commons-lang/)
org.apache.commons:commons-lang3:jar:3.18.0
License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
- - Apache Maven Archiver (https://maven.apache.org/shared/maven-archiver/)
org.apache.maven:maven-archiver:jar:3.6.1
+ - Apache Maven Archiver (https://maven.apache.org/shared/maven-archiver/)
org.apache.maven:maven-archiver:jar:3.6.5
License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/maven-source-plugin-3.3.1/NOTICE
new/maven-source-plugin-3.4.0/NOTICE
--- old/maven-source-plugin-3.3.1/NOTICE 2024-03-30 01:48:50.000000000
+0100
+++ new/maven-source-plugin-3.4.0/NOTICE 2025-11-22 22:27:04.000000000
+0100
@@ -1,5 +1,5 @@
Apache Maven Source Plugin
-Copyright 2002-2024 The Apache Software Foundation
+Copyright 2002-2025 The Apache Software Foundation
This product includes software developed at
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/maven-source-plugin-3.3.1/README.md
new/maven-source-plugin-3.4.0/README.md
--- old/maven-source-plugin-3.3.1/README.md 2024-03-30 01:48:50.000000000
+0100
+++ new/maven-source-plugin-3.4.0/README.md 2025-11-22 22:27:04.000000000
+0100
@@ -17,14 +17,13 @@
Contributing to [Apache Maven Source
Plugin](https://maven.apache.org/plugins/maven-source-plugin/)
======================
-[][jira]
[][license]
[](https://search.maven.org/artifact/org.apache.maven.plugins/maven-source-plugin)
[][build]
[][test-results]
-You have found a bug or you have an idea for a cool new feature? Contributing
+You have found a bug, or you have an idea for a cool new feature? Contributing
code is a great way to give something back to the open source community. Before
you dig right into the code, there are a few guidelines that we need
contributors to follow so that we can have a chance of keeping on top of
@@ -33,7 +32,6 @@
Getting Started
---------------
-+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
+ Make sure you have a [GitHub account](https://github.com/signup/free).
+ If you're planning to implement a new feature, it makes sense to discuss
your changes
on the [dev list][ml-list] first.
@@ -59,37 +57,23 @@
+ Create minimal diffs - disable on save actions like reformat source code
or organize imports.
If you feel the source code should be reformatted, create a separate PR
for this change.
+ Check for unnecessary whitespace with `git diff --check` before committing.
-+ Make sure your commit messages are in the proper format. Your commit message
should contain the key of the JIRA issue.
-```
-[MJAR-XXX] - Subject of the JIRA Ticket
- Optional supplemental description.
-```
+ Make sure you have added the necessary tests (JUnit/IT) for your changes.
+ Run all the tests with `mvn -Prun-its verify` to assure nothing else was
accidentally broken.
+ Submit a pull request to the repository in the Apache organization.
-+ Update your JIRA ticket and include a link to the pull request in the ticket.
If you plan to contribute on a regular basis, please consider filing a
[contributor license agreement][cla].
-Making Trivial Changes
-----------------------
-
-For changes of a trivial nature to comments and documentation, it is not always
-necessary to create a new ticket in JIRA. In this case, it is appropriate to
-start the first line of a commit with '(doc)' instead of a ticket number.
-
Additional Resources
--------------------
+ [Contributing
patches](https://maven.apache.org/guides/development/guide-maven-development.html#Creating_and_submitting_a_patch)
-+ [Apache Maven Source Plugin JIRA project page][jira]
+ [Contributor License Agreement][cla]
+ [General GitHub documentation](https://help.github.com/)
+ [GitHub pull request
documentation](https://help.github.com/send-pull-requests/)
-+ [Apache Maven Twitter Account](https://twitter.com/ASFMavenProject)
-+ #Maven IRC channel on freenode.org
++ [Apache Maven X Account](https://x.com/ASFMavenProject)
++ [Apache Maven Bluesky Account](https://bsky.app/profile/maven.apache.org)
++ [Apache Maven Mastodon
Account](https://mastodon.social/deck/@[email protected])
-[jira]: https://issues.apache.org/jira/projects/MSOURCES/
[license]: https://www.apache.org/licenses/LICENSE-2.0
[ml-list]: https://maven.apache.org/mailing-lists.html
[code-style]: https://maven.apache.org/developers/conventions/code.html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/maven-source-plugin-3.3.1/pom.xml
new/maven-source-plugin-3.4.0/pom.xml
--- old/maven-source-plugin-3.3.1/pom.xml 2024-03-30 01:48:50.000000000
+0100
+++ new/maven-source-plugin-3.4.0/pom.xml 2025-11-22 22:27:04.000000000
+0100
@@ -23,12 +23,12 @@
<parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugins</artifactId>
- <version>41</version>
+ <version>45</version>
<relativePath />
</parent>
<artifactId>maven-source-plugin</artifactId>
- <version>3.3.1</version>
+ <version>3.4.0</version>
<packaging>maven-plugin</packaging>
<name>Apache Maven Source Plugin</name>
@@ -52,18 +52,18 @@
</contributors>
<prerequisites>
- <maven>${mavenVersion}</maven>
+ <maven>3.6.3</maven>
</prerequisites>
<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/maven-source-plugin.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-source-plugin.git</developerConnection>
- <tag>maven-source-plugin-3.3.1</tag>
+ <tag>maven-source-plugin-3.4.0</tag>
<url>https://github.com/apache/maven-source-plugin/tree/${project.scm.tag}</url>
</scm>
<issueManagement>
- <system>JIRA</system>
- <url>https://issues.apache.org/jira/browse/MSOURCES</url>
+ <system>GitHub Issues</system>
+ <url>https://github.com/apache/maven-source-plugin/issues</url>
</issueManagement>
<ciManagement>
<system>Jenkins</system>
@@ -78,8 +78,10 @@
<properties>
<javaVersion>8</javaVersion>
- <mavenVersion>3.2.5</mavenVersion>
-
<project.build.outputTimestamp>2024-03-30T01:48:50Z</project.build.outputTimestamp>
+ <mavenVersion>3.9.11</mavenVersion>
+
<project.build.outputTimestamp>2025-11-22T22:27:03Z</project.build.outputTimestamp>
+
+ <version.maven-invoker-plugin>3.9.1</version.maven-invoker-plugin>
</properties>
<dependencyManagement>
@@ -87,7 +89,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>2.11.0</version>
+ <version>2.21.0</version>
</dependency>
</dependencies>
</dependencyManagement>
@@ -122,29 +124,29 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
+ <version>${version.maven-plugin-tools}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
- <version>3.6.1</version>
+ <version>3.6.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
- <version>4.9.1</version>
+ <version>4.10.4</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>3.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
- <version>3.3.0</version>
+ <version>3.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/it/MSOURCES-121/pom.xml
new/maven-source-plugin-3.4.0/src/it/MSOURCES-121/pom.xml
--- old/maven-source-plugin-3.3.1/src/it/MSOURCES-121/pom.xml 2024-03-30
01:48:50.000000000 +0100
+++ new/maven-source-plugin-3.4.0/src/it/MSOURCES-121/pom.xml 2025-11-22
22:27:04.000000000 +0100
@@ -29,9 +29,10 @@
<name>Test for multiple attachments of files</name>
<description>This build should fail based on the duplicate
- execution with the same configuration. This will errornously
- add the classifier/file twice times.
+ execution with the same configuration. This will erroneously
+ add the classifier/file twice.
MSOURCES-121.
+ update with MSOURCES-141: do not fail but detect and not add twice
</description>
<properties>
@@ -56,6 +57,9 @@
<goals>
<goal>jar-no-fork</goal>
</goals>
+ <configuration>
+ <finalName>${project.build.finalName}-secondary</finalName>
+ </configuration>
</execution>
</executions>
</plugin>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/it/MSOURCES-121/verify.groovy
new/maven-source-plugin-3.4.0/src/it/MSOURCES-121/verify.groovy
--- old/maven-source-plugin-3.3.1/src/it/MSOURCES-121/verify.groovy
1970-01-01 01:00:00.000000000 +0100
+++ new/maven-source-plugin-3.4.0/src/it/MSOURCES-121/verify.groovy
2025-11-22 22:27:04.000000000 +0100
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+
+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/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/invoker.properties
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/invoker.properties
--- old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/invoker.properties
1970-01-01 01:00:00.000000000 +0100
+++ new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/invoker.properties
2025-11-22 22:27:04.000000000 +0100
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+invoker.buildResult = success
+invoker.goals = package clean install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/pom.xml
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/pom.xml
--- old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/pom.xml 1970-01-01
01:00:00.000000000 +0100
+++ new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/pom.xml 2025-11-22
22:27:04.000000000 +0100
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.sources</groupId>
+ <artifactId>jar-no-fork</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <name>Test for multiple attachments of one file caused by multiple runs in
one session</name>
+ <description>mvn package clean install should not fail</description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>@project.version@</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/src/main/java/MyClass.java
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/src/main/java/MyClass.java
---
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/src/main/java/MyClass.java
1970-01-01 01:00:00.000000000 +0100
+++
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/src/main/java/MyClass.java
2025-11-22 22:27:04.000000000 +0100
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public class MyClass
+{
+
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/src/main/resources/main.properties
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/src/main/resources/main.properties
---
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/src/main/resources/main.properties
1970-01-01 01:00:00.000000000 +0100
+++
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/src/main/resources/main.properties
2025-11-22 22:27:04.000000000 +0100
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/src/test/java/MyTest.java
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/src/test/java/MyTest.java
--- old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/src/test/java/MyTest.java
1970-01-01 01:00:00.000000000 +0100
+++ new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/src/test/java/MyTest.java
2025-11-22 22:27:04.000000000 +0100
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public class MyTest
+{
+
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/src/test/resources/test.properties
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/src/test/resources/test.properties
---
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/src/test/resources/test.properties
1970-01-01 01:00:00.000000000 +0100
+++
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/src/test/resources/test.properties
2025-11-22 22:27:04.000000000 +0100
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/verify.groovy
new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/verify.groovy
--- old/maven-source-plugin-3.3.1/src/it/MSOURCES-140/verify.groovy
1970-01-01 01:00:00.000000000 +0100
+++ new/maven-source-plugin-3.4.0/src/it/MSOURCES-140/verify.groovy
2025-11-22 22:27:04.000000000 +0100
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+
+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\)/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
new/maven-source-plugin-3.4.0/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
---
old/maven-source-plugin-3.3.1/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
2024-03-30 01:48:50.000000000 +0100
+++
new/maven-source-plugin-3.4.0/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
2025-11-22 22:27:04.000000000 +0100
@@ -20,10 +20,12 @@
import java.io.File;
import java.io.IOException;
+import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import java.util.Objects;
import org.apache.maven.archiver.MavenArchiveConfiguration;
import org.apache.maven.archiver.MavenArchiver;
@@ -303,15 +305,29 @@
}
if (attach) {
+ boolean requiresAttach = true;
for (Artifact attachedArtifact :
project.getAttachedArtifacts()) {
- if (isAlreadyAttached(attachedArtifact, project,
getClassifier())) {
- getLog().error("We have duplicated artifacts
attached.");
- throw new MojoExecutionException("Presumably you have
configured maven-source-plugin "
- + "to execute twice in your build. You have to
configure a classifier "
- + "for at least one of them.");
+ Artifact previouslyAttachedArtifact =
+ getPreviouslyAttached(attachedArtifact, project,
getClassifier());
+ if (previouslyAttachedArtifact != null) {
+ File previouslyAttachedFile =
previouslyAttachedArtifact.getFile();
+ // trying to attache the same file/path or not?
+ if (!outputFile.equals(previouslyAttachedFile)) {
+ getLog().error("Artifact " +
previouslyAttachedArtifact.getId()
+ + " already attached to a file " +
relative(previouslyAttachedFile) + ": attach to "
+ + relative(outputFile) + " should be done
with another classifier");
+ throw new MojoExecutionException("Presumably you
have configured maven-source-plugin "
+ + "to execute twice in your build to
different output files. "
+ + "You have to configure a classifier for
at least one of them.");
+ }
+ requiresAttach = false;
+ getLog().info("Artifact " +
previouslyAttachedArtifact.getId() + " already attached to "
+ + relative(outputFile) + ": ignoring same
re-attach (same artifact, same file)");
}
}
- projectHelper.attachArtifact(project, getType(),
getClassifier(), outputFile);
+ if (requiresAttach) {
+ projectHelper.attachArtifact(project, getType(),
getClassifier(), outputFile);
+ }
} else {
getLog().info("NOT adding java-sources to attached artifacts
list.");
}
@@ -320,12 +336,19 @@
}
}
- private boolean isAlreadyAttached(Artifact artifact, MavenProject
checkProject, String classifier) {
+ private String relative(File to) {
+ Path basedir = project.getBasedir().getAbsoluteFile().toPath();
+ return basedir.relativize(to.getAbsoluteFile().toPath()).toString();
+ }
+
+ private Artifact getPreviouslyAttached(Artifact artifact, MavenProject
checkProject, String classifier) {
return artifact.getType().equals(getType())
- && artifact.getGroupId().equals(checkProject.getGroupId())
- &&
artifact.getArtifactId().equals(checkProject.getArtifactId())
- && artifact.getVersion().equals(checkProject.getVersion())
- && (artifact.getClassifier() != null ?
artifact.getClassifier().equals(classifier) : false);
+ &&
artifact.getGroupId().equals(checkProject.getGroupId())
+ &&
artifact.getArtifactId().equals(checkProject.getArtifactId())
+ &&
artifact.getVersion().equals(checkProject.getVersion())
+ && Objects.equals(artifact.getClassifier(), classifier)
+ ? artifact
+ : null;
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/maven-source-plugin-3.3.1/src/site/site.xml
new/maven-source-plugin-3.4.0/src/site/site.xml
--- old/maven-source-plugin-3.3.1/src/site/site.xml 2024-03-30
01:48:50.000000000 +0100
+++ new/maven-source-plugin-3.4.0/src/site/site.xml 2025-11-22
22:27:04.000000000 +0100
@@ -25,7 +25,7 @@
<body>
<menu name="Overview">
<item name="Introduction" href="index.html"/>
- <item name="Goals" href="plugin-info.html"/>
+ <item name="Plugin Documentation" href="plugin-info.html"/>
<item name="Usage" href="usage.html"/>
<item name="FAQ" href="faq.html"/>
<!-- According to https://issues.apache.org/jira/browse/MNGSITE-152 -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/maven-source-plugin-3.3.1/src/test/java/org/apache/maven/plugins/source/SourceJarMojoTest.java
new/maven-source-plugin-3.4.0/src/test/java/org/apache/maven/plugins/source/SourceJarMojoTest.java
---
old/maven-source-plugin-3.3.1/src/test/java/org/apache/maven/plugins/source/SourceJarMojoTest.java
2024-03-30 01:48:50.000000000 +0100
+++
new/maven-source-plugin-3.4.0/src/test/java/org/apache/maven/plugins/source/SourceJarMojoTest.java
2025-11-22 22:27:04.000000000 +0100
@@ -29,15 +29,16 @@
}
private String[] addMavenDescriptor(String project, String[]
listOfElements) {
- final String METAINF = "META-INF/";
- final String MAVENSOURCE = "maven/source/maven-source-plugin-test-";
- String[] result = new String[listOfElements.length + 5];
- System.arraycopy(listOfElements, 0, result, 0, listOfElements.length);
- result[listOfElements.length] = METAINF + "maven/";
- result[listOfElements.length + 1] = METAINF + "maven/source/";
- result[listOfElements.length + 2] = METAINF + MAVENSOURCE + project +
"/";
- result[listOfElements.length + 3] = METAINF + MAVENSOURCE + project +
"/pom.properties";
- result[listOfElements.length + 4] = METAINF + MAVENSOURCE + project +
"/pom.xml";
+ final String metainf = "META-INF/";
+ final String mavensource = "maven/source/maven-source-plugin-test-";
+ int length = listOfElements.length;
+ String[] result = new String[length + 5];
+ System.arraycopy(listOfElements, 0, result, 0, length);
+ result[length] = metainf + "maven/";
+ result[length + 1] = metainf + "maven/source/";
+ result[length + 2] = metainf + mavensource + project + "/";
+ result[length + 3] = metainf + mavensource + project +
"/pom.properties";
+ result[length + 4] = metainf + mavensource + project + "/pom.xml";
return result;
}