[jira] [Commented] (MDEP-776) copy-dependencies overwrites artifacts of the same artifact id

2022-01-25 Thread Andreas Sewe (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17482122#comment-17482122
 ] 

Andreas Sewe commented on MDEP-776:
---

Seems almost like a duplicate of MDEP-772, although that is about the 
{{unpack}} goal, not {{copy-dependencies}}. Either way, emitting a warning 
would be good.

> copy-dependencies overwrites artifacts of the same artifact id
> --
>
> Key: MDEP-776
> URL: https://issues.apache.org/jira/browse/MDEP-776
> Project: Maven Dependency Plugin
>  Issue Type: Bug
>  Components: copy-dependencies
>Affects Versions: 3.1.2, 3.2.0
>Reporter: Nikolaos Georgiou
>Priority: Major
>
> We have a project which has 2 dependencies of different groupId but same 
> artifactId and version, e.g. com.acme:foo:1.2.3 and com.ecorp:foo:1.2.3
> We use the copy-dependencies goal of the plugin to copy libraries under 
> target/lib folder.
> Actual Result:
>  * only one foo.jar survives in the target/lib folder. The other one silently 
> gets overwritten. This leads to difficult to diagnose runtime errors, as one 
> JAR is missing.
>  
> Expected Result:
>  * it should at least give a warning, if not an error, that it has 
> overwritten an artifact during this process
>  
> Known workaround:
>  * we activated useRepositoryLayout, which allows both artifacts to survive 
> under a directory structure, which complicates a bit our classpath building 
> process (from target/lib/* we need to find all the JARs with a bit of bash 
> glue)
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (MDEP-776) copy-dependencies overwrites artifacts of the same artifact id

2021-11-15 Thread Nikolaos Georgiou (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17443795#comment-17443795
 ] 

Nikolaos Georgiou commented on MDEP-776:


[~michael-o] Could maybe the goal collect in-memory the resolved artifact IDs 
into a HashSet and complain on duplicates?

Alternatively, could there be a flag e.g. -DcomplainOnDuplicates=true that 
people could use on CI (where there is no previous run) and fail there hard?

Just thinking out loud.

> copy-dependencies overwrites artifacts of the same artifact id
> --
>
> Key: MDEP-776
> URL: https://issues.apache.org/jira/browse/MDEP-776
> Project: Maven Dependency Plugin
>  Issue Type: Bug
>  Components: copy-dependencies
>Affects Versions: 3.1.2, 3.2.0
>Reporter: Nikolaos Georgiou
>Priority: Major
>
> We have a project which has 2 dependencies of different groupId but same 
> artifactId and version, e.g. com.acme:foo:1.2.3 and com.ecorp:foo:1.2.3
> We use the copy-dependencies goal of the plugin to copy libraries under 
> target/lib folder.
> Actual Result:
>  * only one foo.jar survives in the target/lib folder. The other one silently 
> gets overwritten. This leads to difficult to diagnose runtime errors, as one 
> JAR is missing.
>  
> Expected Result:
>  * it should at least give a warning, if not an error, that it has 
> overwritten an artifact during this process
>  
> Known workaround:
>  * we activated useRepositoryLayout, which allows both artifacts to survive 
> under a directory structure, which complicates a bit our classpath building 
> process (from target/lib/* we need to find all the JARs with a bit of bash 
> glue)
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (MDEP-776) copy-dependencies overwrites artifacts of the same artifact id

2021-11-05 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17439221#comment-17439221
 ] 

Michael Osipov commented on MDEP-776:
-

Yes, this is a general problem when artifact ids collide. One issue with a 
warning is that the JAR could be from a previous run and how do you detect 
that?!

> copy-dependencies overwrites artifacts of the same artifact id
> --
>
> Key: MDEP-776
> URL: https://issues.apache.org/jira/browse/MDEP-776
> Project: Maven Dependency Plugin
>  Issue Type: Bug
>  Components: copy-dependencies
>Affects Versions: 3.1.2, 3.2.0
>Reporter: Nikolaos Georgiou
>Priority: Major
>
> We have a project which has 2 dependencies of different groupId but same 
> artifactId and version, e.g. com.acme:foo:1.2.3 and com.ecorp:foo:1.2.3
> We use the copy-dependencies goal of the plugin to copy libraries under 
> target/lib folder.
> Actual Result:
>  * only one foo.jar survives in the target/lib folder. The other one silently 
> gets overwritten. This leads to difficult to diagnose runtime errors, as one 
> JAR is missing.
>  
> Expected Result:
>  * it should at least give a warning, if not an error, that it has 
> overwritten an artifact during this process
>  
> Known workaround:
>  * we activated useRepositoryLayout, which allows both artifacts to survive 
> under a directory structure, which complicates a bit our classpath building 
> process (from target/lib/* we need to find all the JARs with a bit of bash 
> glue)
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)