You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ralf Ebert (JIRA)" <ji...@codehaus.org> on 2009/04/25 19:19:44 UTC
[jira] Commented: (MECLIPSE-551) [regression] Resources are
excluded if resource dir equals source dir
[ http://jira.codehaus.org/browse/MECLIPSE-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=174222#action_174222 ]
Ralf Ebert commented on MECLIPSE-551:
-------------------------------------
As "workaround" for this issue one can downgrade the maven-eclipse-plugin:
{noformat}<!--
downgraded to 2.5.1 because of
http://jira.codehaus.org/browse/MECLIPSE-443
http://jira.codehaus.org/browse/MECLIPSE-551
(resource settings for src/main/java are ignored in general)
-->
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.5.1</version>
</plugin>
{noformat}
Mainly for historical reasons I have resource files in {{src/main/java}} and include them in the maven build like this:
{noformat}<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/*.sample</exclude>
</excludes>
</resource>
</resources>
{noformat}
This works perfectly for the mvn build and maven-eclipse-plugin 2.5.1. Since maven-eclipse-plugin 2.6 this is not reflected by the generated eclipse project configuration any more.
Ralf Ebert
[http://www.ralfebert.de/]
> [regression] Resources are excluded if resource dir equals source dir
> ---------------------------------------------------------------------
>
> Key: MECLIPSE-551
> URL: http://jira.codehaus.org/browse/MECLIPSE-551
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Components: Core : Dependencies resolution and build path (.classpath)
> Affects Versions: 2.6
> Reporter: Benjamin Bentmann
>
> {code:xml}
> <build>
> <resources>
> <resource>
> <directory>src/main/java</directory>
> <includes>
> <include>**/*.properties</include>
> </includes>
> </resource>
> </resources>
> </build>
> {code}
> For a non-standard project layout like sketched above where some resource files reside next to the source files (e.g. Messages.properties in Mercury), the change for MECLIPSE-443 causes these resources files to be excluded from the build path since they don't match the filter "**/*.java". This can for instance cause test failures in Eclipse due to resources missing on the class path.
> When source and resource directories equal, the includes/excludes need to be merged.
--
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