You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason Dillon (JIRA)" <ji...@codehaus.org> on 2007/04/06 02:08:02 UTC
[jira] Closed: (MGROOVY-25) Groovy scripts compiled by the maven
groovy plugin does not have the org.apache.maven.plugin package on its
classpath
[ http://jira.codehaus.org/browse/MGROOVY-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Dillon closed MGROOVY-25.
-------------------------------
Resolution: Won't Fix
You need to include everything your code depends on in the modules dependencies.
> Groovy scripts compiled by the maven groovy plugin does not have the org.apache.maven.plugin package on its classpath
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: MGROOVY-25
> URL: http://jira.codehaus.org/browse/MGROOVY-25
> Project: Maven 2.x Groovy Plugin
> Issue Type: Bug
> Affects Versions: 1.0-alpha-2
> Environment: all
> Reporter: Jesse Eichar
> Assigned To: Jason Dillon
> Priority: Minor
>
> consider the following script:
> class ScriptClass{
> def testRequirements(){
> def requiredFile=new File("/requiredFile")
> if( !requiredFile.exists ){
> throw new org.apache.maven.plugin.MojoFailureException( "RequiredFile does not exist" )
> }
> }
> }
> This script will not compile correctly using the compile plugin because the MojoFailureException is not on the classpath. As a work around you can throw an AssertionError or a RuntimeException but in both cases you get a big ugly stacktrace. If you can throw a MojoFailureException the maven build will fail cleaning reporting the error and the stack trace can be shown using the -e stack trace.
--
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