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

ASF GitHub Bot commented on MNG-6450:
-------------------------------------

KathrynN commented on a change in pull request #175: [MNG-6450] - Allow 
importing a POM with a classifier
URL: https://github.com/apache/maven/pull/175#discussion_r205390932
 
 

 ##########
 File path: 
maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
 ##########
 @@ -607,15 +607,12 @@ public void testBadImportScopeType()
                         "'dependencyManagement.dependencies.dependency.type' 
for test:a:jar must be 'pom'" );
     }
 
-    public void testBadImportScopeClassifier()
+    public void testImportScopeClassifier()
         throws Exception
     {
-        SimpleProblemCollector result = validateRaw( 
"bad-import-scope-classifier.xml" );
+        SimpleProblemCollector result = validateRaw( 
"import-scope-classifier.xml" );
 
-        assertViolations( result, 0, 1, 0 );
-
-        assertContains( result.getErrors().get( 0 ),
-                        
"'dependencyManagement.dependencies.dependency.classifier' for test:a:pom:cls 
must be empty" );
+        assertViolations( result, 0, 0, 0 );
 
 Review comment:
   Possibly in another story/issue, not here!  Maybe mark that refactoring as 
good for beginners too :)
   Thanks for the swift response 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Allow importing a POM with a classifier
> ---------------------------------------
>
>                 Key: MNG-6450
>                 URL: https://issues.apache.org/jira/browse/MNG-6450
>             Project: Maven
>          Issue Type: Improvement
>          Components: Dependencies, POM
>    Affects Versions: 3.0
>            Reporter: Yegor Borovikov
>            Priority: Major
>              Labels: easy-fix, pull-request-available
>
> Currently, a POM-packaged artifact with a classifier cannot be imported - 
> there is an explicit check for that in 
> [DefaultModelValidator|https://github.com/apache/maven/blob/master/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java#L480].
>  I couldn't find anything in Maven documentation that would mention/explain 
> this limitation. According to [~rfscholte] this [might 
> be|https://www.mail-archive.com/dev@maven.apache.org/msg114101.html] 
> "historical".
> Example use case: a BOM (bill of materials) plugin could generate a BOM POM 
> and attach it (with a classifier) to the project. However, currently there's 
> no way to import the generated BOM because of the restriction.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to