komalsahedani / cleartk

Automatically exported from code.google.com/p/cleartk
0 stars 0 forks source link

use a real JCasGen Maven plugin #334

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Right now, we run JCasGen through a series of hacks involving 
exec-maven-plugin, build-helper-maven-plugin and a uimaFIT wrapper to Jg. One 
of the disadvantages of this approach is that JCasGen is run on *every* edit to 
*any* file in Eclipse.

Instead, we should use a real Maven plugin specifically dedicated to JCasGen. 
Then we can have an m2e connector that only runs JCasGen when the type system 
file has changed. I've put a first draft of this together here:

http://cleartk.googlecode.com/git/jcasgen-maven-plugin/
http://cleartk.googlecode.com/git/jcasgen-m2e-connector/

Attached is a patch that changes ClearTK to use this plugin. Instructions for 
use:

(1) Apply the patch to ClearTK 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 ClearTK 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.1: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.jcasg
en.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 now. 

Original issue reported on code.google.com by steven.b...@gmail.com on 2 Oct 2012 at 4:29

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by steven.b...@gmail.com on 2 Oct 2012 at 4:41

GoogleCodeExporter commented 9 years ago

Original comment by steven.b...@gmail.com on 4 Oct 2012 at 7:25

GoogleCodeExporter commented 9 years ago
I created a branch "use-jcasgen-plugin" which supersedes the patch. To try it, 
I believe you do something like:

$ git checkout -b test origin/use-jcasgen-plugin

Or from Eclipse, "Team -> Switch To -> use-jcasgen-plugin". You'll still need 
to install the m2e connector and run "Maven->Update Project" as described above.

Original comment by steven.b...@gmail.com on 10 Oct 2012 at 8:41

GoogleCodeExporter commented 9 years ago
With the latest jcasgen-maven-plugin, you no longer need the m2e connector. 
Updates are in the use-jcasgen-plugin branch.

Original comment by steven.b...@gmail.com on 21 Oct 2012 at 3:36

GoogleCodeExporter commented 9 years ago
Merged in a448ef08e49c482a42e329ad564785e1d80016c9.

Original comment by steven.b...@gmail.com on 31 Oct 2012 at 11:03