[Created] (MNG-6490) maven fails reporting circular dependency when the dependency is a classified secondary artifact
John Canny created MNG-6490:
Summary: maven fails reporting circular dependency when the dependency is a classified secondary artifact
URL: https://issues.apache.org/jira/browse/MNG-6490 Project: Maven
Issue Type: Bug
Affects Versions: 3.5.4, 3.5.3, 3.5.2
Environment: Ubuntu 16.0.4 LTS, Ubuntu 18.0.4 LTS, Mac OS High Sierra, Oracle and OpenJDK 8, Oracle Java 11,
Reporter: John Canny
As of maven 3.5.2, 3.5.3, 3.5.4, the following pom fails with the error
"dependencies.dependency. Main:MainJar:1' for Main:MainJar:1 is referencing itself"
But the dependency is not circular, it references a classified jar (in our use cases its an architecture-dependent native code container jar). The pom below allows the main jar to be built without building the dependency every time (other lines conditionally build the dependency), and ensures the appropriate pre-built dependency is loaded. Behavior in maven 3.5.0 and earlier was correct (i.e. no error). This breaks several of the usage scenarios for classified artifacts...