[ 
https://issues.apache.org/jira/browse/MSOURCES-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17755330#comment-17755330
 ] 

Gary D. Gregory commented on MSOURCES-143:
------------------------------------------

Here is my console output (using MAVEN_ARGS=-V)
{noformat}
mvn clean package
Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)
Maven home: C:\java\apache-maven-3.9.3
Java version: 1.8.0_382, vendor: Temurin, runtime: C:\Program Files\Eclipse 
Adoptium\jdk-8.0.382.5-hotspot\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< commons-cli:commons-cli >-----------------------
[INFO] Building Apache Commons CLI 1.6.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ commons-cli ---
[INFO] Deleting C:\Users\ggregory\git\a\commons-cli\target
[INFO]
[INFO] --- enforcer:3.3.0:enforce (enforce-maven-version) @ commons-cli ---
[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion 
passed
[INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed
[INFO]
[INFO] --- enforcer:3.3.0:enforce (enforce-java-version) @ commons-cli ---
[INFO]
[INFO] --- enforcer:3.3.0:enforce (enforce-maven-3) @ commons-cli ---
[INFO]
[INFO] --- apache-rat:0.15:check (rat-check) @ commons-cli ---
[INFO] Enabled default license matchers.
[INFO] Will parse SCM ignores for exclusions...
[INFO] Parsing exclusions from C:\Users\ggregory\git\a\commons-cli\.gitignore
[INFO] Finished adding exclusions from SCM ignore files.
[INFO] 76 implicit excludes.
[INFO] 13 explicit excludes.
[INFO] 100 resources included
[INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, generated: 
0, approved: 93 licenses.
[INFO]
[INFO] --- build-helper:3.4.0:parse-version (parse-version) @ commons-cli ---
[INFO]
[INFO] --- antrun:3.1.0:run (javadoc.resources) @ commons-cli ---
[INFO] Executing tasks
[INFO]      [copy] Copying 2 files to 
C:\Users\ggregory\git\a\commons-cli\target\apidocs\META-INF
[INFO] Executed tasks
[INFO]
[INFO] --- remote-resources:3.1.0:process (process-resource-bundles) @ 
commons-cli ---
[INFO] Skipping remote resources execution.
[INFO]
[INFO] --- buildnumber:3.2.0:create (default) @ commons-cli ---
[INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
[INFO] Working directory: C:\Users\ggregory\git\a\commons-cli
[INFO] Storing buildNumber: null at timestamp: 1692239650046
[INFO] Executing: cmd.exe /X /C "git symbolic-ref HEAD"
[INFO] Working directory: C:\Users\ggregory\git\a\commons-cli
[INFO] Storing scmBranch: master
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ commons-cli ---
[INFO] skip non existing resourceDirectory 
C:\Users\ggregory\git\a\commons-cli\src\main\resources
[INFO] Copying 2 resources from  to target\classes\META-INF
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ commons-cli ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 23 source files with javac [debug target 1.8] to target\classes
[INFO] 
/C:/Users/ggregory/git/a/commons-cli/src/main/java/org/apache/commons/cli/Parser.java:
 Some input files use unchecked or unsafe operations.
[INFO] 
/C:/Users/ggregory/git/a/commons-cli/src/main/java/org/apache/commons/cli/Parser.java:
 Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- bundle:5.1.9:manifest (bundle-manifest) @ commons-cli ---
[INFO] No MANIFEST.MF file found, generating manifest.
[INFO] Writing manifest: 
C:\Users\ggregory\git\a\commons-cli\target\osgi\MANIFEST.MF
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ commons-cli 
---
[INFO] Copying 1 resource from src\test\resources to target\test-classes
[INFO] Copying 2 resources from  to target\test-classes\META-INF
[INFO]
[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ commons-cli ---
[INFO] Changes detected - recompiling the module! :dependency
[INFO] Compiling 29 source files with javac [debug target 1.8] to 
target\test-classes
[INFO] 
/C:/Users/ggregory/git/a/commons-cli/src/test/java/org/apache/commons/cli/bug/BugCLI148Test.java:
 Some input files use or override a deprecated API.
[INFO] 
/C:/Users/ggregory/git/a/commons-cli/src/test/java/org/apache/commons/cli/bug/BugCLI148Test.java:
 Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] --- animal-sniffer:1.23:check (checkAPIcompatibility) @ commons-cli ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java18:1.0
[INFO]
[INFO] --- jacoco:0.8.10:prepare-agent (prepare-agent) @ commons-cli ---
[INFO] argLine set to 
-javaagent:C:\\Users\\ggregory\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.10\\org.jacoco.agent-0.8.10-runtime.jar=destfile=C:\\Users\\ggregory\\git\\a\\commons-cli\\target\\jacoco.exec
[INFO]
[INFO] --- surefire:3.1.2:test (default-test) @ commons-cli ---
[INFO] Using auto detected provider 
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.commons.cli.ApplicationTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.086 s 
-- in org.apache.commons.cli.ApplicationTest
[INFO] Running org.apache.commons.cli.ArgumentIsOptionTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s 
-- in org.apache.commons.cli.ArgumentIsOptionTest
[INFO] Running org.apache.commons.cli.BasicParserTest
[WARNING] Tests run: 62, Failures: 0, Errors: 0, Skipped: 26, Time elapsed: 
0.055 s -- in org.apache.commons.cli.BasicParserTest
[INFO] Running org.apache.commons.cli.bug.BugCLI133Test
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s 
-- in org.apache.commons.cli.bug.BugCLI133Test
[INFO] Running org.apache.commons.cli.bug.BugCLI13Test
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s 
-- in org.apache.commons.cli.bug.BugCLI13Test
[INFO] Running org.apache.commons.cli.bug.BugCLI148Test
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s 
-- in org.apache.commons.cli.bug.BugCLI148Test
[INFO] Running org.apache.commons.cli.bug.BugCLI162Test
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.010 s 
-- in org.apache.commons.cli.bug.BugCLI162Test
[INFO] Running org.apache.commons.cli.bug.BugCLI18Test
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s 
-- in org.apache.commons.cli.bug.BugCLI18Test
[INFO] Running org.apache.commons.cli.bug.BugCLI252Test
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 s 
-- in org.apache.commons.cli.bug.BugCLI252Test
[INFO] Running org.apache.commons.cli.bug.BugCLI265Test
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s 
-- in org.apache.commons.cli.bug.BugCLI265Test
[INFO] Running org.apache.commons.cli.bug.BugCLI266Test
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s 
-- in org.apache.commons.cli.bug.BugCLI266Test
[INFO] Running org.apache.commons.cli.bug.BugCLI71Test
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s 
-- in org.apache.commons.cli.bug.BugCLI71Test
[INFO] Running org.apache.commons.cli.bug.BugsTest
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 s 
-- in org.apache.commons.cli.bug.BugsTest
[INFO] Running org.apache.commons.cli.CommandLineTest
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 s 
-- in org.apache.commons.cli.CommandLineTest
[INFO] Running org.apache.commons.cli.DefaultParserTest
[INFO] Tests run: 69, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.052 s 
-- in org.apache.commons.cli.DefaultParserTest
[INFO] Running org.apache.commons.cli.DisablePartialMatchingTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s 
-- in org.apache.commons.cli.DisablePartialMatchingTest
[INFO] Running org.apache.commons.cli.GnuParserTest
[WARNING] Tests run: 62, Failures: 0, Errors: 0, Skipped: 21, Time elapsed: 
0.045 s -- in org.apache.commons.cli.GnuParserTest
[INFO] Running org.apache.commons.cli.HelpFormatterTest
[INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 s 
-- in org.apache.commons.cli.HelpFormatterTest
[INFO] Running org.apache.commons.cli.OptionBuilderTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 s 
-- in org.apache.commons.cli.OptionBuilderTest
[INFO] Running org.apache.commons.cli.OptionGroupTest
[INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 s 
-- in org.apache.commons.cli.OptionGroupTest
[INFO] Running org.apache.commons.cli.OptionsTest
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s 
-- in org.apache.commons.cli.OptionsTest
[INFO] Running org.apache.commons.cli.OptionTest
[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 s 
-- in org.apache.commons.cli.OptionTest
[INFO] Running org.apache.commons.cli.PatternOptionBuilderTest
Exception found converting v to desired type: Unable to parse the URL: 
foo://commons.apache.org
Exception found converting d to desired type: Unable to find the class: 
System.DateTime
Exception found converting f to desired type: Unable to find file: 
non-existing.file
Exception found converting x to desired type: For input string: "3,5"
Exception found converting i to desired type: java.lang.IllegalAccessException; 
Unable to create an instance of: java.util.Calendar
Exception found converting n to desired type: Unable to find the class: 
System.DateTime
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.033 s 
-- in org.apache.commons.cli.PatternOptionBuilderTest
[INFO] Running org.apache.commons.cli.PosixParserTest
[WARNING] Tests run: 62, Failures: 0, Errors: 0, Skipped: 9, Time elapsed: 
0.036 s -- in org.apache.commons.cli.PosixParserTest
[INFO] Running org.apache.commons.cli.TypeHandlerTest
[INFO] Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.030 s 
-- in org.apache.commons.cli.TypeHandlerTest
[INFO] Running org.apache.commons.cli.UtilTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s 
-- in org.apache.commons.cli.UtilTest
[INFO] Running org.apache.commons.cli.ValuesTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 s 
-- in org.apache.commons.cli.ValuesTest
[INFO] Running org.apache.commons.cli.ValueTest
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.010 s 
-- in org.apache.commons.cli.ValueTest
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 440, Failures: 0, Errors: 0, Skipped: 56
[INFO]
[INFO]
[INFO] --- jar:3.3.0:jar (default-jar) @ commons-cli ---
[INFO] Building jar: 
C:\Users\ggregory\git\a\commons-cli\target\commons-cli-1.6.0-SNAPSHOT.jar
[INFO]
[INFO] --- site:3.12.1:attach-descriptor (attach-descriptor) @ commons-cli ---
[INFO] Skipping because packaging 'jar' is not pom.
[INFO]
[INFO] --- jar:3.3.0:test-jar (default) @ commons-cli ---
[INFO] Building jar: 
C:\Users\ggregory\git\a\commons-cli\target\commons-cli-1.6.0-SNAPSHOT-tests.jar
[INFO]
[INFO] --- source:3.3.0:jar-no-fork (create-source-jar) @ commons-cli ---
[INFO] Building jar: 
C:\Users\ggregory\git\a\commons-cli\target\commons-cli-1.6.0-SNAPSHOT-sources.jar
[INFO]
[INFO] --- source:3.3.0:test-jar-no-fork (create-source-jar) @ commons-cli ---
[INFO] Building jar: 
C:\Users\ggregory\git\a\commons-cli\target\commons-cli-1.6.0-SNAPSHOT-test-sources.jar
[INFO]
[INFO] --- cyclonedx:2.7.9:makeAggregateBom (build-sbom-cyclonedx) @ 
commons-cli ---
[INFO] CycloneDX: Resolving Dependencies
[INFO] CycloneDX: Creating BOM version 1.4 with 0 component(s)
[INFO] CycloneDX: Writing and validating BOM (XML): 
C:\Users\ggregory\git\a\commons-cli\target\commons-cli-1.6.0-SNAPSHOT-bom.xml
[INFO]            attaching as commons-cli-1.6.0-SNAPSHOT-cyclonedx.xml
[INFO] CycloneDX: Writing and validating BOM (JSON): 
C:\Users\ggregory\git\a\commons-cli\target\commons-cli-1.6.0-SNAPSHOT-bom.json
[WARNING] Unknown keyword additionalItems - you should define your own Meta 
Schema. If the keyword is irrelevant for validation, just use a 
NonValidationKeyword
[INFO]            attaching as commons-cli-1.6.0-SNAPSHOT-cyclonedx.json
[INFO]
[INFO] >>> spdx:0.6.3:createSPDX (build-sbom-spdx) > verify @ commons-cli >>>
[INFO]
[INFO] --- enforcer:3.3.0:enforce (enforce-maven-version) @ commons-cli ---
[INFO]
[INFO] --- enforcer:3.3.0:enforce (enforce-java-version) @ commons-cli ---
[INFO]
[INFO] --- enforcer:3.3.0:enforce (enforce-maven-3) @ commons-cli ---
[INFO]
[INFO] --- apache-rat:0.15:check (rat-check) @ commons-cli ---
[INFO] Enabled default license matchers.
[INFO] Will parse SCM ignores for exclusions...
[INFO] Parsing exclusions from C:\Users\ggregory\git\a\commons-cli\.gitignore
[INFO] Finished adding exclusions from SCM ignore files.
[INFO] 76 implicit excludes.
[INFO] 13 explicit excludes.
[INFO] 100 resources included
[INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, generated: 
0, approved: 93 licenses.
[INFO]
[INFO] --- build-helper:3.4.0:parse-version (parse-version) @ commons-cli ---
[INFO]
[INFO] --- antrun:3.1.0:run (javadoc.resources) @ commons-cli ---
[INFO] Executing tasks
[INFO] Executed tasks
[INFO]
[INFO] --- remote-resources:3.1.0:process (process-resource-bundles) @ 
commons-cli ---
[INFO] Skipping remote resources execution.
[INFO]
[INFO] --- buildnumber:3.2.0:create (default) @ commons-cli ---
[INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
[INFO] Working directory: C:\Users\ggregory\git\a\commons-cli
[INFO] Storing buildNumber: null at timestamp: 1692239665554
[INFO] Executing: cmd.exe /X /C "git symbolic-ref HEAD"
[INFO] Working directory: C:\Users\ggregory\git\a\commons-cli
[INFO] Storing scmBranch: master
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ commons-cli ---
[INFO] skip non existing resourceDirectory 
C:\Users\ggregory\git\a\commons-cli\src\main\resources
[INFO] Copying 2 resources from  to target\classes\META-INF
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ commons-cli ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- bundle:5.1.9:manifest (bundle-manifest) @ commons-cli ---
[INFO] Writing manifest: 
C:\Users\ggregory\git\a\commons-cli\target\osgi\MANIFEST.MF
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ commons-cli 
---
[INFO] Copying 1 resource from src\test\resources to target\test-classes
[INFO] Copying 2 resources from  to target\test-classes\META-INF
[INFO]
[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ commons-cli ---
[INFO] Changes detected - recompiling the module! :dependency
[INFO] Compiling 29 source files with javac [debug target 1.8] to 
target\test-classes
[INFO] 
/C:/Users/ggregory/git/a/commons-cli/src/test/java/org/apache/commons/cli/bug/BugCLI148Test.java:
 Some input files use or override a deprecated API.
[INFO] 
/C:/Users/ggregory/git/a/commons-cli/src/test/java/org/apache/commons/cli/bug/BugCLI148Test.java:
 Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] --- animal-sniffer:1.23:check (checkAPIcompatibility) @ commons-cli ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java18:1.0
[INFO]
[INFO] --- jacoco:0.8.10:prepare-agent (prepare-agent) @ commons-cli ---
[INFO] argLine set to 
-javaagent:C:\\Users\\ggregory\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.10\\org.jacoco.agent-0.8.10-runtime.jar=destfile=C:\\Users\\ggregory\\git\\a\\commons-cli\\target\\jacoco.exec
[INFO]
[INFO] --- surefire:3.1.2:test (default-test) @ commons-cli ---
[INFO] Skipping execution of surefire because it has already been run for this 
configuration
[INFO]
[INFO] --- jar:3.3.0:jar (default-jar) @ commons-cli ---
[INFO]
[INFO] --- site:3.12.1:attach-descriptor (attach-descriptor) @ commons-cli ---
[INFO] Skipping because packaging 'jar' is not pom.
[INFO]
[INFO] --- jar:3.3.0:test-jar (default) @ commons-cli ---
[INFO] Building jar: 
C:\Users\ggregory\git\a\commons-cli\target\commons-cli-1.6.0-SNAPSHOT-tests.jar
[WARNING] artifact commons-cli:commons-cli:test-jar:tests:1.6.0-SNAPSHOT 
already attached, replace previous instance
[INFO]
[INFO] --- source:3.3.0:jar-no-fork (create-source-jar) @ commons-cli ---
[ERROR] We have duplicated artifacts attached.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  23.739 s
[INFO] Finished at: 2023-08-16T22:34:28-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-source-plugin:3.3.0:jar-no-fork 
(create-source-jar) on project commons-cli: Presumably you have configured 
maven-source-plugn to execute twice times in your build. You have to configure 
a classifier for at least on of them. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
{noformat}
 

> Can't create a source and test jar in Commons using commons-parent
> ------------------------------------------------------------------
>
>                 Key: MSOURCES-143
>                 URL: https://issues.apache.org/jira/browse/MSOURCES-143
>             Project: Maven Source Plugin
>          Issue Type: Bug
>    Affects Versions: 3.3.0
>            Reporter: Gary D. Gregory
>            Priority: Major
>
> Steps to reproduce:
> # git clone https://gitbox.apache.org/repos/asf/commons-parent.git
> # cd commons-parent
> # git checkout 8d886ce8382f7a79f06d51a3afc386b8a37d0473
> # mvn clean install
> # cd ..
> # git clone https://gitbox.apache.org/repos/asf/commons-cli.git
> # cd commons-cli
> # git checkout 08f8c5034a8492be6db65b2086341c292489ee53
> # mvn clean package
> [INFO] --- source:3.3.0:jar-no-fork (create-source-jar) @ commons-cli ---
> [ERROR] We have duplicated artifacts attached.
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  15.233 s
> [INFO] Finished at: 2023-08-15T15:39:45-04:00
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-source-plugin:3.3.0:jar-no-fork 
> (create-source-jar) on project commons-cli: Presumably you have configured 
> maven-source-plugn to execute twice times in your build. You have to 
> configure a classifier for at least on of them. -> [Help 1]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to