[ 
http://jira.codehaus.org/browse/MCLOVER-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96119
 ] 

Nathan Beyer (Cerner) commented on MCLOVER-71:
----------------------------------------------

I believe the problem was introduced here [1], when the mojo was converted to 
use ResourceManager instead of Locator. I don't think the ResourceManager 
performs what the documentation of this particular method says that it will.

"
     * Registers the license file for Clover runtime by setting the 
<code>clover.license.path</code> system property.
     * If the user has configured the <code>licenseLocation</code> parameter 
the plugin tries to resolve it first as a
     * resource, then as a URL, and then as a file location on the filesystem. 
If the <code>licenseLocation</code>
     * parameter has not been defined by the user we look up a default Clover 
license in the classpath in
     * <code>/clover.license</code>.
"

[1] 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clover-plugin/src/main/java/org/apache/maven/plugin/clover/internal/AbstractCloverMojo.java?r1=417137&r2=481679

> Cannot resolve license file
> ---------------------------
>
>                 Key: MCLOVER-71
>                 URL: http://jira.codehaus.org/browse/MCLOVER-71
>             Project: Maven 2.x Clover Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Bryan Madsen
>
> The license file cannot be found when the license location is a URL. This 
> works with version 2.3.
> [INFO] [clover:instrumentInternal]
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Failed to load license file 
> [http://scm.apparch.cerner.corp/svn/apparch/licenses/clover.license]
> Embedded error: Could not find resource 
> 'http://scm.apparch.cerner.corp/svn/apparch/licenses/clover.license'.
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to load 
> license file 
> [http://scm.apparch.cerner.corp/svn/apparch/licenses/clover.license]
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:896)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:739)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:510)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to load 
> license file 
> [http://scm.apparch.cerner.corp/svn/apparch/licenses/clover.license]
>       at 
> org.apache.maven.plugin.clover.internal.AbstractCloverMojo.registerLicenseFile(AbstractCloverMojo.java:164)
>       at 
> org.apache.maven.plugin.clover.internal.AbstractCloverMojo.registerLicenseFile(AbstractCloverMojo.java:134)
>       at 
> org.apache.maven.plugin.clover.internal.AbstractCloverMojo.execute(AbstractCloverMojo.java:119)
>       at 
> org.apache.maven.plugin.clover.CloverInstrumentInternalMojo.execute(CloverInstrumentInternalMojo.java:132)
>       at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>       ... 20 more
> Caused by: org.codehaus.plexus.resource.loader.ResourceNotFoundException: 
> Could not find resource 
> 'http://scm.apparch.cerner.corp/svn/apparch/licenses/clover.license'.
>       at 
> org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsInputStream(DefaultResourceManager.java:91)
>       at 
> org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:117)
>       at 
> org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:100)
>       at 
> org.apache.maven.plugin.clover.internal.AbstractCloverMojo.registerLicenseFile(AbstractCloverMojo.java:159)
>       ... 25 more

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

        

Reply via email to