Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.7
    • Fix Version/s: None
    • Labels:
      None
    • Number of attachments :
      2

      Description

      Task MECLIPSE-156 wasn't correctly implemented and the proposed feature (namely, that the plugin should support setting file encoding) does not work. I think that only one of the proposed patches there were implemented (on IdeUtils.java) while the other (on EclipseUtils.java) one wasn't.

      1. MECLIPSE-636-withTests.patch
        20 kB
        Ramiro Pereira de Magalh„es
      2. patch-MECLIPSE-636.patch
        14 kB
        Ramiro Pereira de Magalh„es

        Issue Links

          Activity

          Hide
          Ramiro Pereira de Magalh„es added a comment -

          A suggetion: I guess you should allow people to reopen issues.

          Show
          Ramiro Pereira de Magalh„es added a comment - A suggetion: I guess you should allow people to reopen issues.
          Hide
          Ramiro Pereira de Magalh„es added a comment - - edited

          Just to be a little more clear: I think that this patch http://jira.codehaus.org/secure/attachment/34526/MECLIPSE-156-maven-eclipse-plugin.patch wasn't applied but should have been.

          I'd also like to add that I did not find any documentation about that property.

          Show
          Ramiro Pereira de Magalh„es added a comment - - edited Just to be a little more clear: I think that this patch http://jira.codehaus.org/secure/attachment/34526/MECLIPSE-156-maven-eclipse-plugin.patch wasn't applied but should have been. I'd also like to add that I did not find any documentation about that property.
          Hide
          Ramiro Pereira de Magalh„es added a comment - - edited

          Added a patch that solves this issue using patches and suggestions from MECLIPSE-156. Now, eclipse:eclipse uses the <encoding> text from the maven-compiler-plugin to set source code's and resources' encoding. It does not set the global encoding setting of an Eclipse project, so only the source and resource folders will have the encoding set. Also, fixed the eclipse:clean mojo, allowing it to properly exclude the .settings/org.eclipse.core.resources.prefs file which contains such preferences.

          Show
          Ramiro Pereira de Magalh„es added a comment - - edited Added a patch that solves this issue using patches and suggestions from MECLIPSE-156 . Now, eclipse:eclipse uses the <encoding> text from the maven-compiler-plugin to set source code's and resources' encoding. It does not set the global encoding setting of an Eclipse project, so only the source and resource folders will have the encoding set. Also, fixed the eclipse:clean mojo, allowing it to properly exclude the .settings/org.eclipse.core.resources.prefs file which contains such preferences.
          Hide
          Barrie Treloar added a comment -

          Issues shouldn't be re-opened since they are closed and marked fixed against a particular version. If they are not implemented correctly then a new issue (like you have raised) should be created and linked to the first issue.

          Show
          Barrie Treloar added a comment - Issues shouldn't be re-opened since they are closed and marked fixed against a particular version. If they are not implemented correctly then a new issue (like you have raised) should be created and linked to the first issue.
          Hide
          Ramiro Pereira de Magalh„es added a comment -

          I upload a new patch that fixes some small problems with the previous patch. This patch also includes a test case that ensures the correct preference file contains the needed configuration for a Eclipse's project source code and resource file encoding works properly.

          Show
          Ramiro Pereira de Magalh„es added a comment - I upload a new patch that fixes some small problems with the previous patch. This patch also includes a test case that ensures the correct preference file contains the needed configuration for a Eclipse's project source code and resource file encoding works properly.
          Hide
          Ramiro Pereira de Magalh„es added a comment -

          Hey, guys, I uploaded a patch that has a fix for this issue and the a test case that shows the problem is solved, but it has not been applied yet. Am I missing something? Is there anything else I can do to help you solve this issue?

          Show
          Ramiro Pereira de Magalh„es added a comment - Hey, guys, I uploaded a patch that has a fix for this issue and the a test case that shows the problem is solved, but it has not been applied yet. Am I missing something? Is there anything else I can do to help you solve this issue?
          Hide
          Diego Gomes added a comment -

          Hello, do we have any news about this issue? it's like a really important issue for people who use encoding.

          Show
          Diego Gomes added a comment - Hello, do we have any news about this issue? it's like a really important issue for people who use encoding.
          Hide
          Anthony O. added a comment -

          I've seen a similar bug report here : https://issues.sonatype.org/browse/MNGECLIPSE-1782

          I've used this workaround :

          <plugin>
          	<groupId>org.apache.maven.plugins</groupId>
          	<artifactId>maven-eclipse-plugin</artifactId>
          	<version>2.8</version>
          	<configuration>
          		<downloadSources>true</downloadSources>
          		<downloadJavadocs>true</downloadJavadocs>
          		<wtpmanifest>true</wtpmanifest>
          		<wtpapplicationxml>false</wtpapplicationxml>
          		<wtpversion>2.0</wtpversion>
          		<additionalConfig>
          			<file>
          				<name>.settings/org.eclipse.core.resources.prefs</name>
          				<content>
          <![CDATA[eclipse.preferences.version=1
          encoding/<project>=UTF-8]]>
          				</content>
          			</file>
          		</additionalConfig>
          	</configuration>
          </plugin>
          
          Show
          Anthony O. added a comment - I've seen a similar bug report here : https://issues.sonatype.org/browse/MNGECLIPSE-1782 I've used this workaround : <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>2.8</version> <configuration> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> <wtpmanifest>true</wtpmanifest> <wtpapplicationxml>false</wtpapplicationxml> <wtpversion>2.0</wtpversion> <additionalConfig> <file> <name>.settings/org.eclipse.core.resources.prefs</name> <content> <![CDATA[eclipse.preferences.version=1 encoding/<project>=UTF-8]]> </content> </file> </additionalConfig> </configuration> </plugin>
          Hide
          Michael Osipov added a comment -

          Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

          Assignee, if you think you can fix this bug anytime soon, please reopen and proceed appropriately.

          Show
          Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out. Assignee, if you think you can fix this bug anytime soon, please reopen and proceed appropriately.

            People

            • Assignee:
              fabrizio giustina
              Reporter:
              Ramiro Pereira de Magalh„es
            • Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: