On Oct 17, 2012, at 10:39 AM, "Wu, Stephen T., Ph.D." <[email protected]>
wrote:
> Do we need to run mvn install (or mvn compile as steve suggests) before a
> CVD/CPE, every time we change code? If so, maven gurus, how do we change
> that?
You certainly need to compile after every time you change the code. Otherwise
you won't see your changes.
To avoid having to run `mvn install` before you run the CVD/CPE, you could
change the ctakes-clinical-pipeline/pom.xml to include something like:
<profile>
<id>runCPE</id>
<activation>
<property>
<name>runCPE</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<!-- depends on
other modules being on classpath -->
<phase>compile</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.apache.uima.tools.cpm.CpmFrame</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</profile>
That's different from what's in there now. In particular, it uses exec:java,
not exec:exec, and it links the CpmFrame to the compile phase whenever the
runCPE profile is active. You can then run this, from the root of the cTAKES
checkout as:
$ mvn -PrunCPE compile
That will only recompile anything that has changed in any of the cTAKES
projects, and then run the CPE. No need to install - Maven will collect the
classpath automatically from the target/classes directories in the various
projects.
Depending on what you load in the CPE, you may need more memory. In that case,
you'll want to set your MAVEN_OPTS environment variable before you run the
command above. In bash, you could do something like:
$ MAVEN_OPTS="-Xmx1g" mvn -PrunCPE compile
Steve