You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Conny Kreyssel (JIRA)" <ji...@codehaus.org> on 2011/04/20 17:27:22 UTC

[jira] Created: (MNG-5072) Wrong warning if you use multiple scopes for one dependency

Wrong warning if you use multiple scopes for one dependency
-----------------------------------------------------------

                 Key: MNG-5072
                 URL: http://jira.codehaus.org/browse/MNG-5072
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Dependencies
    Affects Versions: 3.0.3
            Reporter: Conny Kreyssel


Example POM:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.kreyssel.maven.multiscopebug</groupId>
	<artifactId>multiscopebug</artifactId>
	<version>0.0.1-SNAPSHOT</version>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<scope>test,runtime</scope>
		</dependency>
	</dependencies>
</project>

If you use multiple scope for a dependencies you get a warning like:

[WARNING] Some problems were encountered while building the effective model for
org.kreyssel.maven.multirepos:multirepos-parent:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.scope' for junit:junit:jar must be one of [pr
ovided, compile, runtime, test, system] but is 'test,runtime'. @ line 13, column
 11

Please change it. Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5072) Wrong warning if you use multiple scopes for one dependency

Posted by "Conny Kreyssel (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-5072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=264280#action_264280 ] 

Conny Kreyssel commented on MNG-5072:
-------------------------------------

Thanks Benjamin, you right.

But if its wrong syntax, should it not be an error and maven should stop the build. What scope did maven use in this case?

> Wrong warning if you use multiple scopes for one dependency
> -----------------------------------------------------------
>
>                 Key: MNG-5072
>                 URL: http://jira.codehaus.org/browse/MNG-5072
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0.3
>            Reporter: Conny Kreyssel
>            Assignee: Benjamin Bentmann
>
> Example POM:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> 	<modelVersion>4.0.0</modelVersion>
> 	<groupId>org.kreyssel.maven.multiscopebug</groupId>
> 	<artifactId>multiscopebug</artifactId>
> 	<version>0.0.1-SNAPSHOT</version>
> 	<dependencies>
> 		<dependency>
> 			<groupId>junit</groupId>
> 			<artifactId>junit</artifactId>
> 			<version>4.8.1</version>
> 			<scope>test,runtime</scope>
> 		</dependency>
> 	</dependencies>
> </project>
> If you use multiple scope for a dependencies you get a warning like:
> [WARNING] Some problems were encountered while building the effective model for
> org.kreyssel.maven.multirepos:multirepos-parent:jar:0.0.1-SNAPSHOT
> [WARNING] 'dependencies.dependency.scope' for junit:junit:jar must be one of [pr
> ovided, compile, runtime, test, system] but is 'test,runtime'. @ line 13, column
>  11
> Please change it. Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5072) Wrong warning if you use multiple scopes for one dependency

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-5072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=264288#action_264288 ] 

Benjamin Bentmann commented on MNG-5072:
----------------------------------------

bq. should it not be an error and maven should stop the build.
See MNG-3991.
bq. What scope did maven use in this case?
I leave this as an excersice to you, mostly because I don't like stating the behavior which others might then pick up as being by design while it's really an undefined gray zone.

> Wrong warning if you use multiple scopes for one dependency
> -----------------------------------------------------------
>
>                 Key: MNG-5072
>                 URL: http://jira.codehaus.org/browse/MNG-5072
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0.3
>            Reporter: Conny Kreyssel
>            Assignee: Benjamin Bentmann
>
> Example POM:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> 	<modelVersion>4.0.0</modelVersion>
> 	<groupId>org.kreyssel.maven.multiscopebug</groupId>
> 	<artifactId>multiscopebug</artifactId>
> 	<version>0.0.1-SNAPSHOT</version>
> 	<dependencies>
> 		<dependency>
> 			<groupId>junit</groupId>
> 			<artifactId>junit</artifactId>
> 			<version>4.8.1</version>
> 			<scope>test,runtime</scope>
> 		</dependency>
> 	</dependencies>
> </project>
> If you use multiple scope for a dependencies you get a warning like:
> [WARNING] Some problems were encountered while building the effective model for
> org.kreyssel.maven.multirepos:multirepos-parent:jar:0.0.1-SNAPSHOT
> [WARNING] 'dependencies.dependency.scope' for junit:junit:jar must be one of [pr
> ovided, compile, runtime, test, system] but is 'test,runtime'. @ line 13, column
>  11
> Please change it. Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-5072) Wrong warning if you use multiple scopes for one dependency

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-5072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-5072.
----------------------------------

    Resolution: Not A Bug
      Assignee: Benjamin Bentmann

A dependency can have one and only one scope, the comma-separated syntax you showed is wrong and the warning is appropriate.

> Wrong warning if you use multiple scopes for one dependency
> -----------------------------------------------------------
>
>                 Key: MNG-5072
>                 URL: http://jira.codehaus.org/browse/MNG-5072
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0.3
>            Reporter: Conny Kreyssel
>            Assignee: Benjamin Bentmann
>
> Example POM:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> 	<modelVersion>4.0.0</modelVersion>
> 	<groupId>org.kreyssel.maven.multiscopebug</groupId>
> 	<artifactId>multiscopebug</artifactId>
> 	<version>0.0.1-SNAPSHOT</version>
> 	<dependencies>
> 		<dependency>
> 			<groupId>junit</groupId>
> 			<artifactId>junit</artifactId>
> 			<version>4.8.1</version>
> 			<scope>test,runtime</scope>
> 		</dependency>
> 	</dependencies>
> </project>
> If you use multiple scope for a dependencies you get a warning like:
> [WARNING] Some problems were encountered while building the effective model for
> org.kreyssel.maven.multirepos:multirepos-parent:jar:0.0.1-SNAPSHOT
> [WARNING] 'dependencies.dependency.scope' for junit:junit:jar must be one of [pr
> ovided, compile, runtime, test, system] but is 'test,runtime'. @ line 13, column
>  11
> Please change it. Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira