[
http://jira.codehaus.org/browse/MECLIPSE-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Barrie Treloar closed MECLIPSE-551.
-----------------------------------
Resolution: Fixed
The problem is two fold.
One, for paths that are identical the code silently ignored them because
internally they are represented as a Set and the usage of the add() method did
not check the return value for success.
The second problem is that handling paths that overlap isn't as trivial as you
would like.
The following describes how it is handled.
Adding a resource that maps to an existing directory will attempt to merge the
new resources into the already added directory.
If one directory is a source and the other is a resource directory then the
result will be a source directory and
any includes or excludes will be removed since Eclipse has no "main", "test" or
"resource" concepts. The output directory will be the source directories
value.
If the two directories are the same resources type (i.e isResource is equal)
then the result will be the same resource type with the includes from each
merged together (duplicates will be removed), similarly for the
excludes. No effort is made to ensure that the includes and excludes are
disjointed sets. Please fix your pom instead. The output directories must match.
There is no support for cases where the test, or filtering values are not
identical.
The IT test "project-53-MECLIPSE-551" was created using the wicket quickstart
http://wicket.apache.org/quickstart.html and returns a .classpath with no
include/exclude for overlapping source directories.
And so should behave like version 2.5.1.
> [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
> Assignee: Barrie Treloar
> Fix For: 2.7
>
>
> {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