Martin Todorov created MASSEMBLY-830:

             Summary: Cannot handle relocated artifacts
                 Key: MASSEMBLY-830
             Project: Maven Assembly Plugin
          Issue Type: Bug
          Components: dependencySet
    Affects Versions: 2.6
         Environment: $ mvn --version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
Maven home: C:\java\apache\maven-3.3.9
Java version: 1.8.0_92, vendor: Oracle Corporation
Java home: C:\java\jdk1.8.0_92\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

            Reporter: Martin Todorov
            Priority: Blocker

When one of the transitive dependencies is relocated, the 
{{maven-assembly-plugin}} doesn't follow the relocation and check the POM of 
the relocated artifact, but uses the actual POM artifact that declares the 
relocation. Since this POM doesn't define a version for the artifact, the build 
fails with:

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-assembly-plugin:2.6:single (make-assembly) on 
project blah: Execution make-assembly of goal 
org.apache.maven.plugins:maven-assembly-plugin:2.6:single failed: For artifact 
{}: The version cannot be empty. -> [Help 1]

As this is a transitive dependency of a third-party library, we have no control 
over it and have attempted to define:
* An {{<exclusion/>}} for this artifact in the dependency which requires it.
* A direct dependency (as the very first {{<dependency/>}}) to the relocated 
artifact (which has a version defined in the {{pom.xml}}).

Unfortunately, neither of these helped.

This is the POM with the relocation:
<?xml version="1.0" encoding="UTF-8"?> 
<project xsi:schemaLocation=" " xmlns=" " 

Please, advise!
Many thanks in advance!

This message was sent by Atlassian JIRA

Reply via email to