jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Eclipse Plugin
  • MECLIPSE-576

Merge resource dirs shall pass gracefully

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.7
  • Fix Version/s: 2.9
  • Component/s: Core : .project
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

.project generation is failing for folks in our team that have updated to the 2.7 release. It's due to EclipseSourceDir#merge() added in this version. The reason why it is failing at our end because we use resource filtering on resources appearing on the same path, i.e.

<resources>
	<resource>
		<directory>src/main/resources</directory>
		<includes>
			<include>**/*</include>
		</includes>
	</resource>
	<resource>
		<directory>src/main/resources</directory>
		<includes>
			<include>**/*.properties</include>
		</includes>
		<filtering>true</filtering>
	</resource>
</resources>

[INFO] Request to merge when 'filtering' is not identical. Original=resource src/main/resources: output=target/classes, include=[**/*], exclude=[**/*.java], test=false, filtering=false, merging with=resource src/main/resources: output=target/classes, include=[**/*.properties], exclude=[**/*.java], test=false, filtering=true

{noforrmat}

I don't think fixing the POM to fit the plugin is a feasible solution. We have Spring XML files and other documents that use ant style properties and we don't wish Maven to perform filtering for us on them (see first <resource> tag). It should just pass it like what it used to be in previous versions.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    DIFF.txt
    16/Jun/09 5:01 AM
    0.9 kB
    Yuen-Chi Lian

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MECLIPSE-621 mvn eclipse:eclipse fails or doesn't generate proper .classpath when specifying the same resource directory with different filtering rules

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is duplicated by

Bug - A problem which impairs or prevents the functions of the product. MECLIPSE-621 mvn eclipse:eclipse fails or doesn't generate proper .classpath when specifying the same resource directory with different filtering rules

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Yuen-Chi Lian added a comment - 16/Jun/09 11:21 PM

In case you are working for a workaround (or if you can't build from the patch I provided up there), you can fix your POM to use 2.6:

<plugin>
	<artifactId>maven-eclipse-plugin</artifactId>
	<version>2.6</version>
</plugin>
Show
Yuen-Chi Lian added a comment - 16/Jun/09 11:21 PM In case you are working for a workaround (or if you can't build from the patch I provided up there), you can fix your POM to use 2.6:
<plugin>
	<artifactId>maven-eclipse-plugin</artifactId>
	<version>2.6</version>
</plugin>
Hide
Permalink
Daniel Siegmann added a comment - 02/Jul/09 1:40 PM

I have encountered the same problem on a number of my projects. This will block us from using any version of this plugin newer than 2.6 until it is fixed.

Show
Daniel Siegmann added a comment - 02/Jul/09 1:40 PM I have encountered the same problem on a number of my projects. This will block us from using any version of this plugin newer than 2.6 until it is fixed.
Hide
Permalink
Oleksandr Maksymchuk added a comment - 10/Jul/09 6:30 AM

I did had some problems with filtered resourced in eclipse, but with 2.7 release they got resolved automatically. So whatever was done is needed.

Show
Oleksandr Maksymchuk added a comment - 10/Jul/09 6:30 AM I did had some problems with filtered resourced in eclipse, but with 2.7 release they got resolved automatically. So whatever was done is needed.
Hide
Permalink
Hoom added a comment - 21/Oct/09 5:44 AM

See also this entry on offitional maven's resources documentation (scroll to the end of page) which doesn't work anymore: http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html

=========================================================
Warning: Do not filter files with binary content like images! This will most likely result in corrupt output. If you have both text files and binary files as resources, you need to declare two mutually exclusive resource sets. The first resource set defines the files to be filtered and the other resource set defines the files to copy unaltered as illustrated below:

<project>
  ...
  <build>
    ...
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/*.xml</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>**/*.xml</exclude>
        </excludes>
      </resource>
      ...
    </resources>
    ...
  </build>
  ...
</project>

and the error:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Request to merge when 'filtering' is not identical. Original=resource src/main/resources: output=target/classes, include=[**/*.properties], 
exclude=[**/*.java], test=false, filtering=true, merging with=resource src/main/resources: output=target/classes, include=[], 
exclude=[**/*.properties|**/*.java], test=false, filtering=false
Show
Hoom added a comment - 21/Oct/09 5:44 AM See also this entry on offitional maven's resources documentation (scroll to the end of page) which doesn't work anymore: http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html ========================================================= Warning: Do not filter files with binary content like images! This will most likely result in corrupt output. If you have both text files and binary files as resources, you need to declare two mutually exclusive resource sets. The first resource set defines the files to be filtered and the other resource set defines the files to copy unaltered as illustrated below:
<project>
  ...
  <build>
    ...
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/*.xml</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>**/*.xml</exclude>
        </excludes>
      </resource>
      ...
    </resources>
    ...
  </build>
  ...
</project>
and the error:
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Request to merge when 'filtering' is not identical. Original=resource src/main/resources: output=target/classes, include=[**/*.properties], 
exclude=[**/*.java], test=false, filtering=true, merging with=resource src/main/resources: output=target/classes, include=[], 
exclude=[**/*.properties|**/*.java], test=false, filtering=false
Hide
Permalink
David Hoffer added a comment - 31/Mar/10 3:07 PM

I'm having the same problem with version 2.8, here is my pom:

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>*.properties</include>
<include>*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>*.properties</exclude>
<exclude>*.xml</exclude>
</excludes>
</resource>
</resources>
...

Backing down to version 2.6 seems to get past this point in the build.

Is there any planned fix?

Show
David Hoffer added a comment - 31/Mar/10 3:07 PM I'm having the same problem with version 2.8, here is my pom: <build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>*.properties</include> <include>*.xml</include> </includes> </resource> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> <excludes> <exclude>*.properties</exclude> <exclude>*.xml</exclude> </excludes> </resource> </resources> ... Backing down to version 2.6 seems to get past this point in the build. Is there any planned fix?
Hide
Permalink
fabrizio giustina added a comment - 06/Apr/10 3:56 PM

fixed in 2.9, same as MECLIPSE-621

Show
fabrizio giustina added a comment - 06/Apr/10 3:56 PM fixed in 2.9, same as MECLIPSE-621

People

  • Assignee:
    fabrizio giustina
    Reporter:
    Yuen-Chi Lian
Vote (11)
Watch (13)

Dates

  • Created:
    16/Jun/09 5:01 AM
    Updated:
    06/Apr/10 3:56 PM
    Resolved:
    06/Apr/10 3:56 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.