ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Pei" <Pei.C...@childrens.harvard.edu>
Subject RE: Eclipse, Maven and JCasGen
Date Mon, 08 Oct 2012 01:06:25 GMT
I just tried a fresh download and install and wasn't able to recreate the odd behavior:
I think Steven Wu and Dima was in the process of trying it out as well; perhaps we could see
what their experience has been as well.

My Alt setup:
Mac OSX 10.7.4
  Eclipse SDK	4.2.1.M20120914-1800	org.eclipse.sdk.ide	null
  m2e - Maven Integration for Eclipse	org.eclipse.m2e.feature.feature.group
Eclipse.org - m2e
  m2e connector for build-helper-maven-plugin	org.sonatype.m2e.buildhelper.feature.feature.group
Sonatype, Inc.
  m2e connector for mavenarchiver pom properties	org.sonatype.m2e.mavenarchiver.feature.feature.group
Sonatype, Inc.
  Maven SCM Handler for Subversive	org.sonatype.m2e.subversive.feature.feature.group
Sonatype, Inc.
  Subversive SVN Connectors	3.0.0.I20120818-1700	org.polarion.eclipse.team.svn.connector.feature.group
Polarion Software
  Subversive SVN Team Provider	1.0.0.I20120818-1700	org.eclipse.team.svn.feature.group	Eclipse.org
  SVNKit 1.7.5.v1 Implementation (Optional)	3.0.0.I20120818-1700	org.polarion.eclipse.team.svn.connector.svnkit17.feature.group
Polarion Software
  UIMA Runtime	2.4.0	org.apache.uima.runtime.feature.group	Apache Software Foundation
  UIMA tools (includes Runtime)	2.4.0	org.apache.uima.tools.feature.group	Apache Software

From: Steven Bethard [steven.bethard@Colorado.EDU]
Sent: Saturday, October 06, 2012 10:54 PM
To: ctakes-dev@incubator.apache.org
Subject: Re: Eclipse, Maven and JCasGen

On Oct 6, 2012, at 8:15 PM, "Masanz, James J." <Masanz.James@mayo.edu> wrote:
> Does it behave that way if you turn "Build Automatically" off?  Would that be an OK work
around for now?

Yes, that works, but it's a pretty inconvenient workaround. Also, Eclipse will turn it off
for all projects, so I'd have to turn it on and off all the time (because I don't only work
on cTAKES, obviously).

> Otherwise perhaps a post to UIMA's Users forum?

I'm not sure what I'd ask.

What we're doing right now (using <execute/> in the lifecycle mapping for exec-maven-plugin)
is strongly discouraged by m2e:


And it's guaranteed to run JCasGen on all java executions:


So we know we're doing it wrong, and I'm getting exactly the behavior m2e promises when we
do that. ;-)

If people are opposed to doing it the way m2e suggests (writing a jcasgen-maven-plugin and
a connector, as is done in my patch), then I think the only alternative would be to use <ignore/>
instead of <execute/> so that JCasGen never runs in Eclipse.


> ________________________________________
> From: ctakes-dev-return-520-Masanz.James=mayo.edu@incubator.apache.org [ctakes-dev-return-520-Masanz.James=mayo.edu@incubator.apache.org]
on behalf of Steven Bethard [steven.bethard@Colorado.EDU]
> Sent: Friday, October 05, 2012 4:27 PM
> To: ctakes-dev@incubator.apache.org
> Subject: Re: Eclipse, Maven and JCasGen
> On Sep 28, 2012, at 9:58 AM, Steven Bethard <Steven.Bethard@Colorado.EDU> wrote:
>> I have Eclipse set to "Build Automatically" and I'm constantly seeing tasks running
in the background in my Progress view that look like:
>> Compiling ctakes-type-system/target/generated-sources/...
>> Refreshing ctakes-type-system/target/generated-sources/...
>> These tasks run, complete and then immediately start again, and as a result, my Eclipse
runs very slowly.
> So this is still pretty crippling for me. The only way I have found to work on cTAKES
right now is to apply the patch I proposed. But every time someone updates a pom.xml, I get
merge conflicts and have to spend a bunch of time updating the patch.
> Any suggestions of what I can do in the meantime?
> Or any progress on reviewing the patch in https://issues.apache.org/jira/browse/CTAKES-65?
> Steve
>> I think the solution is to create a real jcasgen-maven-plugin and a proper m2e connector
that only runs JCasGen when the type system has changed (or on project import, or if target/generated-sources/jcasgen
is missing, etc.).
>> What do you all think? Does this approach sound okay? I have a working plugin and
m2e connector, but I didn't want to just commit the change because if I do, everyone will
have to install the m2e connector in their Eclipse environment. So I figured we should discuss
it first.
>> Steve
>> P.S. For anyone was experiencing the same problem, could you try out the following
>> (1) Apply the attached patch to cTAKES trunk, which uses the jcasgen-maven-plugin
in the pom.xml files instead of the exec-maven-plugin and build-helper-maven-plugin:
>>   $ svn patch ctakes-jcasgen-maven-plugin.diff
>> (2) Open Eclipse, and refresh your cTAKES checkout. You should see a bunch of errors
in the Problems view that look like "Project configuration is not up-to-date with pom.xml.
Run Maven->Update Project or use Quick Fix."
>> (3) Update the Maven projects as suggested.
>> (4) You should now see some new errors that look like: "Plugin execution not covered
by lifecycle configuration: org.cleartk:jcasgen-maven-plugin:0.9.0:generate (execution: default,
phase: generate-sources)"
>> (5) Install the m2e connector for the jcasgen-maven-plugin. Go to Help -> Install
New Software…, add the update site http://cleartk.googlecode.com/git/jcasgen-m2e-connector/org.cleartk.plugin.jcasgen.m2e.repo/target/repository/
and install the "m2e connector for JCasGen Maven plugin". Eclipse will restart.
>> (6) Update the Maven projects again, as in step (3). The errors should all be gone
>> Some things to try to make sure the fix worked:
>> (1) Check that  JCasGen is no longer be constantly running in the background. Go
to the Progress view and make sure that eventually you see just "No operations to display
at this time."
>> (2) Modify a few non-type-system files and and make sure (in the Progress view again)
that JCasGen does not run.
>> (3) Modify a type system, and make sure that JCasGen *does* run. An easy way to check
this is to change an annotation or feature name and make sure you got some new compile errors.
>> <ctakes-jcasgen-maven-plugin.diff>

View raw message