maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-6450) Allow importing a POM with a classifier
Date Wed, 25 Jul 2018 22:00:01 GMT

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

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

yborovikov 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_r205275754
 
 

 ##########
 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:
   Hi @KathrynN, thank you for looking at the diff!
   
   The `assertViolations( result, 0, 0, 0 );` is used in 5 other test methods in addition
to the one I've edited. Changing these would expand the scope of this concise diff to those
unrelated test cases - is it, in your opinion, justified?

----------------------------------------------------------------
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:
users@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)

Mime
View raw message