You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2010/03/10 11:50:55 UTC

[jira] Commented: (MNG-4582) Extensions not working when defined in a module

    [ http://jira.codehaus.org/browse/MNG-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=213329#action_213329 ] 

Benjamin Bentmann commented on MNG-4582:
----------------------------------------

We need some more details to analyze the issue. As a minimum, the complete debug log from Maven 3.0 that shows what's actually going on. Ideally, a complete&runnable example project.

bq. <!-- plugin that searches config files on classpath (with Plexus ResourceManager) -->
Versions of plexus-resources before 1.0-alpha-7 have bug in the resource loading that shows up in Maven 3. So updating this plugin dependency might solve the issue.

Anyways, using {{<extensions>}} here is a misuse of the element. Instead, you should declare config artifacts as dependencies of the plugin that uses them:
{code:xml}
<plugin>
  <dependencies>
    <!-- additional artifacts for plugin class path here -->
  </dependencies>
</plugin>
{code}

> Extensions not working when defined in a module
> -----------------------------------------------
>
>                 Key: MNG-4582
>                 URL: http://jira.codehaus.org/browse/MNG-4582
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Class Loading
>    Affects Versions: 3.0-alpha-6
>            Reporter: Jochen Ehret
>            Priority: Minor
>
> We want to use Maven Extensions so we can easily look up configuration files. This is our project configuration:
> build-project (contains only list of modules):
> <modules>
>   <module>parent-project</module>
>   <module>subproject1</module>
>   <!-- more modules -->
> </modules>
> parent-project (contains only configurations, has no declared <parent> project):
> <build>
>   <extensions>
>     <extension>
>       <!-- artifact with config files -->
>     </extension>
>   </extensions>
>   <plugins>
>     <plugin>
>       <!-- plugin that searches config files on classpath (with Plexus ResourceManager) -->
>     </plugin>
>   </plugin>
> </build>
> subproject1 (has parent-project as <parent>, executes plugin)
> With maven-2.2.1 the config files are correctly loaded and available on the classpath. With maven-3.0-alpha-6, the config files are not on the classpath. 
> If we move the extension up into the "build-project", the config files are available again, but we would like to keep configurations out of the build-project. 
> Can you please fix the extension classpath loading?

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