You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Mackinlay (JIRA)" <ji...@codehaus.org> on 2011/11/09 10:27:51 UTC
[jira] Created: (MECLIPSE-704) Request to merge when 'filtering' is
not identical
Request to merge when 'filtering' is not identical
--------------------------------------------------
Key: MECLIPSE-704
URL: https://jira.codehaus.org/browse/MECLIPSE-704
Project: Maven 2.x Eclipse Plugin
Issue Type: Bug
Affects Versions: 2.8, 2.7
Reporter: Paul Mackinlay
Attachments: parent_pom.txt
mvn eclipse:eclipse fails with a "Request to merge when 'filtering' is not identical" message. There is a discussion about this on the internet and the accepted workaround is to user eclipse plugin 2.6 (see http://forums.atlassian.com/thread.jspa?threadID=34952)
In my case it is happening with non standard maven directory structure. The parent pom has the config in the attached parent_pom.txt file.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MECLIPSE-704) Request to merge when 'filtering' is not
identical
Posted by "Benjamin Leipold (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MECLIPSE-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=292078#comment-292078 ]
Benjamin Leipold commented on MECLIPSE-704:
-------------------------------------------
That's because the inferred result is wrong. Since eclipse does not support filtering, you have to remove those entries and take a look at maven's result. All *.properties files should be copied to the target directory. So, the correct inferred result should look like this:
{noformat}
<classpathentry kind="src" path="src/main/resources"/>
{noformat}
> Request to merge when 'filtering' is not identical
> --------------------------------------------------
>
> Key: MECLIPSE-704
> URL: https://jira.codehaus.org/browse/MECLIPSE-704
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Affects Versions: 2.7, 2.8
> Reporter: Paul Mackinlay
> Attachments: parent_pom.txt
>
>
> mvn eclipse:eclipse fails with a "Request to merge when 'filtering' is not identical" message. There is a discussion about this on the internet and the accepted workaround is to user eclipse plugin 2.6 (see http://forums.atlassian.com/thread.jspa?threadID=34952)
> In my case it is happening with non standard maven directory structure. The parent pom has the config in the attached parent_pom.txt file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MECLIPSE-704) Request to merge when 'filtering' is not
identical
Posted by "Benjamin Leipold (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MECLIPSE-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=291944#comment-291944 ]
Benjamin Leipold commented on MECLIPSE-704:
-------------------------------------------
By the way, what is the problem with different filter settings? This is only a maven feauter to replace properties when copying ressources, isn't it? This feature is not available in Eclipse, so it doesn't matter if they are not identical. Eclipse always simply copies the resources without replacing any properties. Or did i missed an eclipse feature all the years?
> Request to merge when 'filtering' is not identical
> --------------------------------------------------
>
> Key: MECLIPSE-704
> URL: https://jira.codehaus.org/browse/MECLIPSE-704
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Affects Versions: 2.7, 2.8
> Reporter: Paul Mackinlay
> Attachments: parent_pom.txt
>
>
> mvn eclipse:eclipse fails with a "Request to merge when 'filtering' is not identical" message. There is a discussion about this on the internet and the accepted workaround is to user eclipse plugin 2.6 (see http://forums.atlassian.com/thread.jspa?threadID=34952)
> In my case it is happening with non standard maven directory structure. The parent pom has the config in the attached parent_pom.txt file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MECLIPSE-704) Request to merge when 'filtering' is not
identical
Posted by "Dmitry Katsubo (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MECLIPSE-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=292063#comment-292063 ]
Dmitry Katsubo commented on MECLIPSE-704:
-----------------------------------------
Benjamin, you're right: Eclipse does not support any filtering. But maven-eclipse-plugin needs to calculate the include/exclude masks for the resource based on two (or maybe more) sections in Maven POM. I think this is a showstopper, but I might be wrong. It is not straightforward, e.g. for two entries I've posted in my [1st comment #287007|https://jira.codehaus.org/browse/MECLIPSE-704?focusedCommentId=287007#comment-287007] the following inferred result does not make sense:
{code}
include=[**/*.properties], exclude=[**/*.properties]
{code}
Your suggestion concerning the algo is welcomed.
> Request to merge when 'filtering' is not identical
> --------------------------------------------------
>
> Key: MECLIPSE-704
> URL: https://jira.codehaus.org/browse/MECLIPSE-704
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Affects Versions: 2.7, 2.8
> Reporter: Paul Mackinlay
> Attachments: parent_pom.txt
>
>
> mvn eclipse:eclipse fails with a "Request to merge when 'filtering' is not identical" message. There is a discussion about this on the internet and the accepted workaround is to user eclipse plugin 2.6 (see http://forums.atlassian.com/thread.jspa?threadID=34952)
> In my case it is happening with non standard maven directory structure. The parent pom has the config in the attached parent_pom.txt file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MECLIPSE-704) Request to merge when 'filtering' is not
identical
Posted by "Dmitry Katsubo (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MECLIPSE-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287007#comment-287007 ]
Dmitry Katsubo commented on MECLIPSE-704:
-----------------------------------------
I have the same issue for the following case: I would like *.properties resources to be filtered, any other resources to stay unfiltered.
{code}
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/*.properties</exclude>
</excludes>
</resource>
</resources>
</build>
{code}
Resulting error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.8:eclipse (default-cli) on project service-extractor: Request to merge when 'filtering' is not identical. Original=resource src/main/resources: output=bin, include=[**/*.properties], exclude=[**/*.java], test=false, filtering=true, merging with=resource src/main/resources: output=bin, include=[], exclude=[**/*.properties|**/*.java], test=false, filtering=false -> [Help 1]
> Request to merge when 'filtering' is not identical
> --------------------------------------------------
>
> Key: MECLIPSE-704
> URL: https://jira.codehaus.org/browse/MECLIPSE-704
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Affects Versions: 2.7, 2.8
> Reporter: Paul Mackinlay
> Attachments: parent_pom.txt
>
>
> mvn eclipse:eclipse fails with a "Request to merge when 'filtering' is not identical" message. There is a discussion about this on the internet and the accepted workaround is to user eclipse plugin 2.6 (see http://forums.atlassian.com/thread.jspa?threadID=34952)
> In my case it is happening with non standard maven directory structure. The parent pom has the config in the attached parent_pom.txt file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MECLIPSE-704) Request to merge when 'filtering' is not
identical
Posted by "Benjamin Leipold (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MECLIPSE-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=290320#comment-290320 ]
Benjamin Leipold commented on MECLIPSE-704:
-------------------------------------------
Solving this issue would be great since the snippet provided by Dmitry Katsubo is a recommended approach (see http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html).
> Request to merge when 'filtering' is not identical
> --------------------------------------------------
>
> Key: MECLIPSE-704
> URL: https://jira.codehaus.org/browse/MECLIPSE-704
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Affects Versions: 2.7, 2.8
> Reporter: Paul Mackinlay
> Attachments: parent_pom.txt
>
>
> mvn eclipse:eclipse fails with a "Request to merge when 'filtering' is not identical" message. There is a discussion about this on the internet and the accepted workaround is to user eclipse plugin 2.6 (see http://forums.atlassian.com/thread.jspa?threadID=34952)
> In my case it is happening with non standard maven directory structure. The parent pom has the config in the attached parent_pom.txt file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MECLIPSE-704) Request to merge when 'filtering' is not
identical
Posted by "Dmitry Katsubo (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MECLIPSE-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=290336#comment-290336 ]
Dmitry Katsubo commented on MECLIPSE-704:
-----------------------------------------
For me personally the following solution would be OK:
- If there is only one resource entry for the given directory, then map <includes>/<excludes> to corresponding settings in .classpath preserving the semantics.
- If there are several resource entries, then assume {noformat}**/*{noformat} mask for including and {noformat}**/*.java{noformat} for excluding (it's not trivial to compute the exact mask).
> Request to merge when 'filtering' is not identical
> --------------------------------------------------
>
> Key: MECLIPSE-704
> URL: https://jira.codehaus.org/browse/MECLIPSE-704
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Affects Versions: 2.7, 2.8
> Reporter: Paul Mackinlay
> Attachments: parent_pom.txt
>
>
> mvn eclipse:eclipse fails with a "Request to merge when 'filtering' is not identical" message. There is a discussion about this on the internet and the accepted workaround is to user eclipse plugin 2.6 (see http://forums.atlassian.com/thread.jspa?threadID=34952)
> In my case it is happening with non standard maven directory structure. The parent pom has the config in the attached parent_pom.txt file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira