We do have some documentation at:
https://beam.apache.org/contribute/eclipse/

But it doesn’t really work anymore.   I submitted a PR:
https://github.com/apache/beam/pull/4502
to use as a starting point to try and get things running in Eclipse again, but 
it’s not completely there yet.     That said, I’m using Eclipse Oxygen, not 
Neon, which brings a completely new set of challenges.  :(

The PR will get the poms importing via m2e without error, apt running for the 
value types, javacc and it related things running for those things, and pretty 
much get all the generated code and the source directories and everything 
visible in eclipse so the compiler has a chance.      However, I still have 20 
errors related to generics that I may need help resolving.   I’ll try and look 
into it more early next week, I hope.  (Also need to copy 
~/.m2/repository/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar
 into your /Applications/Eclipse.app/Contents/Eclipse/plugins or equivalent 
directory)

The eclipse-jdt profile uses an older version of Tyco and the jdt it pulls in 
(0.26).   The PR does update Tyco to 1.0.0 which is closer to the newer eclipse 
compiler, but still not exact.   


The other thing that generates a TON of errors in Eclipse is Checkstyle.   The 
latest Checkstyle plugin in Eclipse is based on Checkstyle 8.7.   Beam uses 
Checkstyle 6.19.  The configurations are not compatible.   Longer term, we 
would need to update Beam to 8.x, but that may be a huge PR of mostly just 
formatting changes.   Checkstyle has become EXTREMELY picky about a few things. 
  It took quite a bit to get CXF updated to 8.x, touching most of the files.   
I’m not sure how much of an impact it would have on Beam.   I’ll probably 
investigate that next week as well, but that may require some discussions 
around what the code SHOULD look like in the areas where the old checkstyle 
didn’t care but the new one does.   We’ll see.   


Dan






> On Jan 23, 2018, at 5:14 AM, Ismaël Mejía <ieme...@gmail.com> wrote:
> 
> Hello again,
> 
> The current compiler configuration in maven should be ok. So you can
> test that the compilation works from outside of eclipse by running.
> 
>    mvn clean compile test-compile -Peclipse-jdt
> 
> The fix is more about making the compiler happy about some use of
> Java's generics and some other small code changes of this kind, for
> reference you can take a look at the fixes Dan Kulp did for this
> previously:
> 
> https://github.com/apache/beam/commit/a0ae04bef40149cdf54d0ab50909f18a444f3023
> https://github.com/apache/beam/commit/957c545eaa33c861b561418b1c7dadf4c31f92f3
> 
> Regards,
> Ismaël
> 
> On Tue, Jan 23, 2018 at 2:56 AM, zlgonzalez <zlgonza...@yahoo.com> wrote:
>> Thanks Ismael. I'll try and take a stab at it when I've read more about the
>> eclipse compiler.
>> 
>> In the meantime, do you have any pointers? Is it just about finding the
>> right Eclipse JDT compiler options?
>> 
>> Thanks,
>> Ron
>> 
>> 
>> 
>> Sent via the Samsung Galaxy S7 active, an AT&T 4G LTE smartphone
>> 
>> -------- Original message --------
>> From: Ismaël Mejía <ieme...@gmail.com>
>> Date: 1/22/18 1:29 AM (GMT-08:00)
>> To: dev@beam.apache.org
>> Subject: Re: Eclipse support
>> 
>> Hello,
>> 
>> Thanks for bringing this info, I tried to compile with the eclipse
>> compiler and I can confirm that it does not wok, Eclipse's JDT is more
>> annoying about generics so it could be related to this.
>> 
>> Filled https://issues.apache.org/jira/browse/BEAM-3508 to track it.
>> Feel free to contribute a fix if you feel like it.
>> 
>> Ismaël
>> 
>> 
>> On Sat, Jan 20, 2018 at 10:20 PM, Ron Gonzalez <zlgonza...@yahoo.com> wrote:
>>> Hello again,
>>>  Sorry to keep asking about this, but I can't seem to get Eclipse working
>>> for this project.
>>> 
>>>  I did mvn eclipse:clean eclipse:eclipse command and I've reduced the
>>> problem now down to the Java generics issues related to autovalue types. I
>>> had to run mvn generate-sources generate-test-sources in each of the
>>> sub-modules to make a lot of the errors in Eclipse go away since after
>>> running mvn -DskipTests clean install, the target/generated-sources and
>>> target/generated-test-sources are empty for some reason.
>>> 
>>>  Interestingly enough, if I run mvn -Peclipse-jdt -DskipTests clean
>>> install
>>> from the command line, I am able to reproduce the same errors that I see
>>> in
>>> my Eclipse installation. I am using Eclipse Neon.
>>> 
>>> 
>>>  One such error is:
>>> 
>>>    @Experimental(Kind.FILESYSTEM)
>>>    @Deprecated
>>>    public <NewDestinationT> TypedWrite<UserT, NewDestinationT, OutputT>
>>> to(
>>>        DynamicAvroDestinations<UserT, NewDestinationT, OutputT>
>>> dynamicDestinations) {
>>>      return toBuilder()
>>>          .setDynamicDestinations((DynamicAvroDestinations)
>>> dynamicDestinations)
>>>          .build();
>>>    }
>>> 
>>> gives the error of:
>>> 
>>> Description Resource Path Location Type
>>> Type mismatch: cannot convert from
>>> AvroIO.TypedWrite<UserT,DestinationT,OutputT> to
>>> AvroIO.TypedWrite<UserT,NewDestinationT,OutputT> AvroIO.java
>>> /beam-sdks-java-core/src/main/java/org/apache/beam/sdk/io line 1007 Java
>>> Problem
>>> 
>>> I have 48 errors left and most of these remaining errors are of this kind
>>> (related to Java generics of an auto-valued type). I enabled the Maven
>>> Annotation setting, per the Eclipse tips in the website.
>>> I double-checked the compiling JDK in Eclipse, and it's using my system
>>> JDK, which I assume is being used by the command line compilation, which
>>> is
>>> successful.
>>> Does anybody have Eclipse completely compiling for them without errors?
>>> Any
>>> tips?
>>> 
>>> Thanks,
>>> Ron
>>> 
>>> On Wednesday, January 17, 2018, 10:34:48 AM PST, Ted Yu
>>> <yuzhih...@gmail.com> wrote:
>>> 
>>> 
>>> Have you tried running 'mvn eclipse:eclipse' and importing from the root
>>> of
>>> workspace ?
>>> 
>>> On Wed, Jan 17, 2018 at 10:32 AM, Ron Gonzalez <zlgonza...@yahoo.com>
>>> wrote:
>>> 
>>> Hi,
>>>  I've been trying this for a couple of days now, but I can't seem to get
>>> a
>>> clean Eclipse import.
>>>  I refreshed to latest master, got a clean mvn -DskipTests clean install,
>>> ran through the Eclipse setup steps for m2e-apt installation.
>>>  I'm getting errors like below. Do you have any tips to get this going?
>>> 
>>> Thanks,
>>> Ron
>>> 
>>> Description Resource Path Location Type
>>> ACCUMULATING cannot be resolved to a variable
>>> WindowingStrategyTranslation.
>>> java /beam-runners-core- construction-java/src/main/
>>> java/org/apache/beam/runners/ core/construction line 56 Java Problem
>>> AFTER_ALL cannot be resolved to a variable TriggerStateMachines.java
>>> /beam-runners-core-java/src/ main/java/org/apache/beam/
>>> runners/core/triggers line 34 Java Problem
>>> AFTER_ALL cannot be resolved to a variable TriggerTranslation.java
>>> /beam-runners-core- construction-java/src/main/
>>> java/org/apache/beam/runners/ core/construction line 241 Java Problem
>>> AFTER_ANY cannot be resolved to a variable TriggerStateMachines.java
>>> /beam-runners-core-java/src/ main/java/org/apache/beam/
>>> runners/core/triggers line 37 Java Problem
>>> AFTER_ANY cannot be resolved to a variable TriggerTranslation.java
>>> /beam-runners-core- construction-java/src/main/
>>> java/org/apache/beam/runners/ core/construction line 243 Java Problem
>>> AFTER_EACH cannot be resolved to a variable TriggerStateMachines.java
>>> /beam-runners-core-java/src/ main/java/org/apache/beam/
>>> runners/core/triggers line 59 Java Problem
>>> AFTER_EACH cannot be resolved to a variable TriggerTranslation.java
>>> /beam-runners-core- construction-java/src/main/
>>> java/org/apache/beam/runners/ core/construction line 245 Java Problem
>>> AFTER_END_OF_WINDOW cannot be resolved to a variable
>>> TriggerStateMachines.java /beam-runners-core-java/src/
>>> main/java/org/apache/beam/ runners/core/triggers line 40 Java Problem
>>> AFTER_END_OF_WINDOW cannot be resolved to a variable
>>> TriggerTranslation.java
>>> /beam-runners-core- construction-java/src/main/
>>> java/org/apache/beam/runners/ core/construction line 248 Java Problem
>>> AFTER_PROCESSING_TIME cannot be resolved to a variable
>>> TriggerStateMachines.java /beam-runners-core-java/src/
>>> main/java/org/apache/beam/ runners/core/triggers line 62 Java Problem
>>> AFTER_PROCESSING_TIME cannot be resolved to a variable
>>> TriggerTranslation.java /beam-runners-core- construction-java/src/main/
>>> java/org/apache/beam/runners/ core/construction line 276 Java Problem
>>> AFTER_SYNCHRONIZED_PROCESSING_ TIME cannot be resolved to a variable
>>> TriggerStateMachines.java /beam-runners-core-java/src/
>>> main/java/org/apache/beam/ runners/core/triggers line 45 Java Problem
>>> AFTER_SYNCHRONIZED_PROCESSING_ TIME cannot be resolved to a variable
>>> TriggerTranslation.java /beam-runners-core- construction-java/src/main/
>>> java/org/apache/beam/runners/ core/construction line 302 Java Problem
>>> ALIGN_TO cannot be resolved to a variable TriggerStateMachines.java
>>> /beam-runners-core-java/src/ main/java/org/apache/beam/
>>> runners/core/triggers line 94 Java Problem
>>> ALIGN_TO cannot be resolved to a variable TriggerTranslation.java
>>> /beam-runners-core- construction-java/src/main/
>>> java/org/apache/beam/runners/ core/construction line 281 Java Problem
>>> ALWAYS cannot be resolved to a variable TriggerStateMachines.java
>>> /beam-runners-core-java/src/ main/java/org/apache/beam/
>>> runners/core/triggers line 51 Java Problem
>>> ALWAYS cannot be resolved to a variable TriggerTranslation.java
>>> /beam-runners-core- construction-java/src/main/
>>> java/org/apache/beam/runners/ core/construction line 304 Java Problem
>>> ApiServiceDescriptor cannot be resolved GrpcFnServer.java
>>> /beam-runners-java-fn- execution/src/main/java/org/ apache/beam/runners/
>>> fnexecution line 37 Java Problem
>>> 
>>> 
>>> 
>>> Thanks,
>>> Ron
>>> 
>>> 

-- 
Daniel Kulp
dk...@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to