You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrei Solntsev (JIRA)" <ji...@codehaus.org> on 2009/11/15 12:37:55 UTC
[jira] Created: (MNG-4444) Unable to use "test" scope dependencies
Unable to use "test" scope dependencies
---------------------------------------
Key: MNG-4444
URL: http://jira.codehaus.org/browse/MNG-4444
Project: Maven 2
Issue Type: Bug
Components: Dependencies
Affects Versions: 3.0-alpha-3
Reporter: Andrei Solntsev
Priority: Blocker
Maven build fails with the following error message:
"[ERROR] The project bla.bla-SNAPSHOT (C:\bla\pom.xml) has 1 error
[ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.scope' must be one of [compile, runtime, system] for org.testng:testng:jar:jdk15 but is 'test'.
Maven2.* build this project without problems.
--
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] (MNG-4444) Unable to use "test" scope dependencies
Posted by "Carlin Scott (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MNG-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=319733#comment-319733 ]
Carlin Scott commented on MNG-4444:
-----------------------------------
According to Maven documentation:
{quote}
*test*
This scope indicates that the dependency is not required for normal use of the application, and is only available for the +test compilation+ and execution phases.
{quote}
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
So if my plugin is only needed for test compilation, shouldn't I use the test scope?
> Unable to use "test" scope dependencies
> ---------------------------------------
>
> Key: MNG-4444
> URL: https://jira.codehaus.org/browse/MNG-4444
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 3.0-alpha-3
> Reporter: Andrei Solntsev
> Assignee: Benjamin Bentmann
> Priority: Blocker
>
> Maven build fails with the following error message:
> "[ERROR] The project bla.bla-SNAPSHOT (C:\bla\pom.xml) has 1 error
> [ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.scope' must be one of [compile, runtime, system] for org.testng:testng:jar:jdk15 but is 'test'.
> Maven2.* build this project without problems.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MNG-4444) Unable to use "test" scope
dependencies
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198356#action_198356 ]
Benjamin Bentmann edited comment on MNG-4444 at 11/15/09 6:38 AM:
------------------------------------------------------------------
Stricter validation of the POM than in Maven 2.x is by design. Plugin dependencies of scopes other than the ones listed in the error message make no sense. When Maven executes a plugin, we talk about a runtime classpath and test-scope dependencies in general don't contribute to this.
Simply remove the {{<scope>}} from the plugin dependency in your POM.
was (Author: bentmann):
Stricter validation of the POM than in Maven 2.x is by design. Plugin dependencies of scopes other than the ones listed in the error message make no sense. When Maven executes a plugin, we talk about a runtime classpath and test-scope dependencies in general don't contribute to this.
> Unable to use "test" scope dependencies
> ---------------------------------------
>
> Key: MNG-4444
> URL: http://jira.codehaus.org/browse/MNG-4444
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 3.0-alpha-3
> Reporter: Andrei Solntsev
> Assignee: Benjamin Bentmann
> Priority: Blocker
>
> Maven build fails with the following error message:
> "[ERROR] The project bla.bla-SNAPSHOT (C:\bla\pom.xml) has 1 error
> [ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.scope' must be one of [compile, runtime, system] for org.testng:testng:jar:jdk15 but is 'test'.
> Maven2.* build this project without problems.
--
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-4444) Unable to use "test" scope
dependencies
Posted by "Andrei Solntsev (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198389#action_198389 ]
Andrei Solntsev commented on MNG-4444:
--------------------------------------
Benjamin, thank you!
Removing the <scope> really helped. Stricter validation rules!
> Unable to use "test" scope dependencies
> ---------------------------------------
>
> Key: MNG-4444
> URL: http://jira.codehaus.org/browse/MNG-4444
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 3.0-alpha-3
> Reporter: Andrei Solntsev
> Assignee: Benjamin Bentmann
> Priority: Blocker
>
> Maven build fails with the following error message:
> "[ERROR] The project bla.bla-SNAPSHOT (C:\bla\pom.xml) has 1 error
> [ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.scope' must be one of [compile, runtime, system] for org.testng:testng:jar:jdk15 but is 'test'.
> Maven2.* build this project without problems.
--
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-4444) Unable to use "test" scope dependencies
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann closed MNG-4444.
----------------------------------
Resolution: Not A Bug
Assignee: Benjamin Bentmann
Stricter validation of the POM than in Maven 2.x is by design. Plugin dependencies of scopes other than the ones listed in the error message make no sense. When Maven executes a plugin, we talk about a runtime classpath and test-scope dependencies in general don't contribute to this.
> Unable to use "test" scope dependencies
> ---------------------------------------
>
> Key: MNG-4444
> URL: http://jira.codehaus.org/browse/MNG-4444
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 3.0-alpha-3
> Reporter: Andrei Solntsev
> Assignee: Benjamin Bentmann
> Priority: Blocker
>
> Maven build fails with the following error message:
> "[ERROR] The project bla.bla-SNAPSHOT (C:\bla\pom.xml) has 1 error
> [ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.scope' must be one of [compile, runtime, system] for org.testng:testng:jar:jdk15 but is 'test'.
> Maven2.* build this project without problems.
--
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