As suggested by others, drop source filtering.

/Anders (mobile)
Den 3 jul 2012 16.42 skrev "Markus Karg" <[email protected]>:

> Igor, for me it makes no difference. Not being able to Refactor, Format,
> Organize Import make use of Eclipse ridiculous. So I either have to drop
> Maven, or source filtering.
>
> -----Ursprüngliche Nachricht-----
> Von: Igor Fedorenko [mailto:[email protected]]
> Gesendet: Dienstag, 3. Juli 2012 14:06
> An: Markus Karg
> Cc: Maven Integration for Eclipse users mailing list
> Betreff: Re: AW: [m2e-users] Cannot edit filtered source files
>
> Let me put it differently -- filtered java sources are not fully
> supported. You will still get your classes compiled and the code will most
> likely run, but you won't get full ide functionality. Definitely avoid
> filtered java sources if you can, but it will still kinda work if you
> absolutely must use them.
>
> --
> Regards,
> Igor
>
> On 12-07-03 8:00 AM, Markus Karg wrote:
> > To sum it up in shorter words: "m2e is definitively not able to deal
> with filtering of Java source files by intention."
> >
> > Right?
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Igor Fedorenko [mailto:[email protected]]
> > Gesendet: Dienstag, 3. Juli 2012 13:55
> > An: Maven Integration for Eclipse users mailing list
> > Cc: Markus Karg
> > Betreff: Re: [m2e-users] Cannot edit filtered source files
> >
> > You are explicitly telling Maven and therefor m2e and jdt NOT to look at
> original java sources but use filtered sources instead. The behaviour you
> see is fully expected and it is not currently possible to enable full JDT
> support for original java sources while compiling filtered sources.
> >
> > --
> > Regards,
> > Igor
> >
> > On 12-07-03 7:49 AM, Markus Karg wrote:
> >> Yes but my question was not if there is a more common solution but how
> m2e is intended to work when using filtered sources (or whether one must
> not use filtered sources definitively).
> >>
> >> -----Ursprüngliche Nachricht-----
> >> Von: [email protected]
> >> [mailto:[email protected]] Im Auftrag von Igor Fedorenko
> >> Gesendet: Dienstag, 3. Juli 2012 13:46
> >> An: [email protected]
> >> Betreff: Re: [m2e-users] Cannot edit filtered source files
> >>
> >> I think it is more common to use filtered properties file to access
> project version and other attributes at runtime.
> >>
> >> --
> >> Regards,
> >> Igor
> >>
> >> On 12-07-03 6:32 AM, Markus Karg wrote:
> >>> What I actually want to achieve is:
> >>>
> >>> * I can edit a Java file in Eclipse using JDT.
> >>> * When Maven is compiling it (mvn compile) it shall replace
> ${project.version} placeholders found in the java source (those are needed
> e. g. to display the current version in the splash screen and about dialog
> of my application).
> >>>
> >>> Isn't the solution I implemented the correct way to do this in mvn /
> m2e?
> >>>
> >>> Thanks!
> >>> Markus
> >>>
> >>> -----Ursprüngliche Nachricht-----
> >>> Von: [email protected]
> >>> [mailto:[email protected]] Im Auftrag von Rafal Krzewski
> >>> Gesendet: Dienstag, 3. Juli 2012 12:17
> >>> An: Maven Integration for Eclipse users mailing list
> >>> Betreff: Re: [m2e-users] Cannot edit filtered source files
> >>>
> >>> Well, you are asking for the raw (unfiltered) source files to be on
> the classpath (so that JDT can work on them) and NOT be on the classpath at
> the same time, so that they don't clash with the filtering output.
> >>> Obviously this cannot work. Why are you trying to filter the sources
> in the first place?
> >>>
> >>> regards,
> >>> Rafał
> >>>
> >>> On Tue 03 Jul 2012 08:49:18 AM CEST, Markus Karg wrote:
> >>>> Hello m2e Community,
> >>>>
> >>>> I have a problem with filtered source files and I hope you know how
> >>>> to fix it.
> >>>>
> >>>> I am editing a simple Java project in Eclipse which worked rather
> >>>> well until I enabled to filter resources by the following POM entry:
> >>>>
> >>>> <sourceDirectory>target/filtered-sources/java</sourceDirectory>
> >>>>
> >>>> <resources>
> >>>>
> >>>>           <resource>
> >>>>
> >>>>                 <directory>src/main/resources</directory>
> >>>>
> >>>>           </resource>
> >>>>
> >>>>           <resource>
> >>>>
> >>>>                 <directory>src/main/java</directory>
> >>>>
> >>>>                 <filtering>true</filtering>
> >>>>
> >>>>                 <targetPath>../filtered-sources/java</targetPath>
> >>>>
> >>>> </resource>
> >>>>
> >>>> </resources>
> >>>>
> >>>> After “Maven > Update Project…” the situation in Eclipse is:
> >>>>
> >>>> ·/target/filtered-sources/java is correctly treated as a derived
> >>>> source file, i. e. Eclipse warns that all changes are lost as the
> >>>> file gets recreated automatically by the filtering. I think this is
> >>>> OK and wanted.
> >>>>
> >>>> ·But: /src/main/java’s content is shown with a different (shallow) “J”
> >>>> icon, and Eclipse cannot apply neither “Organize Import” nor
> >>>> “Source
> >>>>> Format” operations. For example, when trying “Organize Import”,
> >>>> Eclipse Indigo says “The resource is not on the build path of a
> >>>> Java project.”. Well, in fact, it actually IS on the build path,
> >>>> but it is EXCLUDED by “**” by m2e (at least the package explorer
> tells me).
> >>>> This means, all the nice JDT gimmicks are switched off!
> >>>>
> >>>> So editing the original source is rather impossible now! I do not
> >>>> believe that it is wanted by m2e that I cannot use any of the JDT
> >>>> gimmicks?
> >>>>
> >>>> What am I doing wrong?
> >>>>
> >>>> Thanks!
> >>>>
> >>>> Markus
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> m2e-users mailing list
> >>>> [email protected]
> >>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
> >>>
> >>>
> >>> _______________________________________________
> >>> m2e-users mailing list
> >>> [email protected]
> >>> https://dev.eclipse.org/mailman/listinfo/m2e-users
> >>> _______________________________________________
> >>> m2e-users mailing list
> >>> [email protected]
> >>> https://dev.eclipse.org/mailman/listinfo/m2e-users
> >>>
> >>
> >> _______________________________________________
> >> m2e-users mailing list
> >> [email protected]
> >> https://dev.eclipse.org/mailman/listinfo/m2e-users
> >> _______________________________________________
> >> m2e-users mailing list
> >> [email protected]
> >> https://dev.eclipse.org/mailman/listinfo/m2e-users
> >>
> _______________________________________________
> m2e-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/m2e-users
>
_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to