You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by al...@apache.org on 2017/11/16 22:23:42 UTC
svn commit: r1815519 - in /ctakes/trunk: ./
ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/
ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/util/
ctakes-dictionary-lookup/src/main/...
Author: alexz
Date: Thu Nov 16 22:23:41 2017
New Revision: 1815519
URL: http://svn.apache.org/viewvc?rev=1815519&view=rev
Log:
CTAKES-479: skip testCPE when UMLS credentials not exported as env vars
Modified:
ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserTester.java
ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/ThreadedUmlsDictionaryLookupAnnotator.java
ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java
ctakes/trunk/pom.xml
Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java?rev=1815519&r1=1815518&r2=1815519&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java (original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java Thu Nov 16 22:23:41 2017
@@ -18,6 +18,7 @@
*/
package org.apache.ctakes.dictionary.lookup2.util;
+import org.apache.ctakes.core.ae.UmlsEnvironmentConfiguration;
import org.apache.ctakes.core.util.DotLogger;
import org.apache.ctakes.utils.env.EnvironmentVariable;
import org.apache.log4j.Logger;
@@ -58,12 +59,6 @@ public enum UmlsUserApprover {
public final static String USER_PARAM = "umlsUser";
public final static String PASS_PARAM = "umlsPass";
- // environment, matches old
- private final static String UMLSADDR_PARAM = "ctakes.umlsaddr";
- private final static String UMLSVENDOR_PARAM = "ctakes.umlsvendor";
- final static String UMLSUSER_PARAM = "ctakes.umlsuser";
- final static String UMLSPW_PARAM = "ctakes.umlspw";
-
static final private Logger LOGGER = Logger.getLogger( "UmlsUserApprover" );
static final private String CHANGEME = "CHANGEME";
@@ -80,22 +75,22 @@ public enum UmlsUserApprover {
* @return true if the server at umlsaddr approves of the vendor, user, password combination
*/
public boolean isValidUMLSUser( final UimaContext uimaContext, final Properties properties ) {
- String umlsUrl = EnvironmentVariable.getEnv( UMLSADDR_PARAM, uimaContext );
+ String umlsUrl = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.URL.toString(), uimaContext );
if ( umlsUrl == null || umlsUrl.equals( EnvironmentVariable.NOT_PRESENT ) ) {
umlsUrl = properties.getProperty( URL_PARAM );
}
- String vendor = EnvironmentVariable.getEnv( UMLSVENDOR_PARAM, uimaContext );
+ String vendor = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.VENDOR.toString(), uimaContext );
if ( vendor == null || vendor.equals( EnvironmentVariable.NOT_PRESENT ) ) {
vendor = properties.getProperty( VENDOR_PARAM );
}
- String user = EnvironmentVariable.getEnv( UMLSUSER_PARAM, uimaContext );
+ String user = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.USER.toString(), uimaContext );
if ( user == null || user.equals( EnvironmentVariable.NOT_PRESENT ) || user.equals( CHANGEME ) || user.equals( CHANGE_ME ) ) {
user = EnvironmentVariable.getEnv( USER_PARAM, uimaContext );
if ( user == null || user.equals( EnvironmentVariable.NOT_PRESENT ) || user.equals( CHANGEME ) || user.equals( CHANGE_ME ) ) {
user = properties.getProperty( USER_PARAM );
}
}
- String pass = EnvironmentVariable.getEnv( UMLSPW_PARAM, uimaContext );
+ String pass = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.PASSWORD.toString(), uimaContext );
if ( pass == null || pass.equals( EnvironmentVariable.NOT_PRESENT ) || pass.equals( CHANGEME ) || pass.equals( CHANGE_ME ) ) {
pass = EnvironmentVariable.getEnv( PASS_PARAM, uimaContext );
if ( pass == null || pass.equals( EnvironmentVariable.NOT_PRESENT ) || pass.equals( CHANGEME ) || pass.equals( CHANGE_ME ) ) {
@@ -189,17 +184,16 @@ public enum UmlsUserApprover {
}
}
+ static private String createLogMessage(String cliOption, String property, UmlsEnvironmentConfiguration envConfig) {
+ return String.format(" Verify that you are setting command-line option %s, or ctakes property %s, or environment variable %s properly.",
+ cliOption, property, envConfig);
+ }
static private void logCheckUser() {
- LOGGER.error( " Verify that you are setting command-line option " + USER_CLI
- + " or ctakes property " + USER_PARAM
- + " or environment variable " + UMLSUSER_PARAM + " properly." );
+ LOGGER.error( createLogMessage(USER_CLI, USER_PARAM, UmlsEnvironmentConfiguration.USER) );
}
static private void logCheckPass() {
- LOGGER.error( " Verify that you are setting command-line option " + PASS_CLI
- + " or ctakes property " + PASS_PARAM
- + " or environment variable " + UMLSPW_PARAM + " properly." );
+ LOGGER.error( createLogMessage(PASS_CLI, PASS_PARAM, UmlsEnvironmentConfiguration.PASSWORD) );
}
-
}
Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserTester.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserTester.java?rev=1815519&r1=1815518&r2=1815519&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserTester.java (original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/test/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserTester.java Thu Nov 16 22:23:41 2017
@@ -1,11 +1,9 @@
package org.apache.ctakes.dictionary.lookup2.util;
+import org.apache.ctakes.core.ae.UmlsEnvironmentConfiguration;
import org.apache.ctakes.utils.env.EnvironmentVariable;
import org.apache.log4j.Logger;
-import static org.apache.ctakes.dictionary.lookup2.util.UmlsUserApprover.UMLSPW_PARAM;
-import static org.apache.ctakes.dictionary.lookup2.util.UmlsUserApprover.UMLSUSER_PARAM;
-
/**
* @author SPF , chip-nlp
* @version %I%
@@ -19,11 +17,11 @@ final public class UmlsUserTester {
}
static public boolean canTestUmlsUser() {
- String user = EnvironmentVariable.getEnv( UMLSUSER_PARAM, null );
+ String user = EnvironmentVariable.getEnv(UmlsEnvironmentConfiguration.USER.toString());
if ( user == null || user.equals( EnvironmentVariable.NOT_PRESENT ) ) {
return false;
}
- String pass = EnvironmentVariable.getEnv( UMLSPW_PARAM, null );
+ String pass = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.PASSWORD.toString());
return pass != null && !pass.equals( EnvironmentVariable.NOT_PRESENT );
}
Modified: ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/ThreadedUmlsDictionaryLookupAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/ThreadedUmlsDictionaryLookupAnnotator.java?rev=1815519&r1=1815518&r2=1815519&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/ThreadedUmlsDictionaryLookupAnnotator.java (original)
+++ ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/ThreadedUmlsDictionaryLookupAnnotator.java Thu Nov 16 22:23:41 2017
@@ -18,6 +18,7 @@
*/
package org.apache.ctakes.dictionary.lookup.ae;
+import org.apache.ctakes.core.ae.UmlsEnvironmentConfiguration;
import org.apache.ctakes.utils.env.EnvironmentVariable;
import org.apache.log4j.Logger;
import org.apache.uima.UimaContext;
@@ -37,23 +38,17 @@ import java.net.URLEncoder;
*/
public class ThreadedUmlsDictionaryLookupAnnotator extends ThreadedDictionaryLookupAnnotator {
- private final static String UMLSADDR_PARAM = "ctakes.umlsaddr";
- private final static String UMLSVENDOR_PARAM = "ctakes.umlsvendor";
- private final static String UMLSUSER_PARAM = "ctakes.umlsuser";
- private final static String UMLSPW_PARAM = "ctakes.umlspw";
- static final private Logger LOGGER = Logger.getLogger( "ThreadedUmlsDictionaryLookupAnnotator" );
-
- final private Logger _logger = Logger.getLogger( getClass().getName() );
-
+ // TODO: use consistent variable names (_logger vs LOGGER vs logger)
+ static final private Logger _logger = Logger.getLogger( ThreadedUmlsDictionaryLookupAnnotator.class );
@Override
public void initialize( final UimaContext aContext ) throws ResourceInitializationException {
super.initialize( aContext );
- final String umlsAddress = EnvironmentVariable.getEnv( UMLSADDR_PARAM, aContext );
- final String umlsVendor = EnvironmentVariable.getEnv( UMLSVENDOR_PARAM, aContext );
- final String umlsUser = EnvironmentVariable.getEnv( UMLSUSER_PARAM, aContext );
- final String umlsPassword = EnvironmentVariable.getEnv( UMLSPW_PARAM, aContext );
- _logger.info( "Using " + UMLSADDR_PARAM + ": " + umlsAddress + ": " + umlsUser );
+ final String umlsAddress = EnvironmentVariable.getEnv(UmlsEnvironmentConfiguration.URL.toString(), aContext );
+ final String umlsVendor = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.VENDOR.toString(), aContext );
+ final String umlsUser = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.USER.toString(), aContext );
+ final String umlsPassword = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.PASSWORD.toString(), aContext );
+ _logger.info( "Using " + UmlsEnvironmentConfiguration.URL + ": " + umlsAddress + ": " + umlsUser );
if ( !isValidUMLSUser( umlsAddress, umlsVendor, umlsUser, umlsPassword ) ) {
_logger.error( "Error: Invalid UMLS License. " +
"A UMLS License is required to use the UMLS dictionary lookup. \n" +
@@ -72,7 +67,7 @@ public class ThreadedUmlsDictionaryLooku
data += "&" + URLEncoder.encode( "user", "UTF-8" ) + "=" + URLEncoder.encode( username, "UTF-8" );
data += "&" + URLEncoder.encode( "password", "UTF-8" ) + "=" + URLEncoder.encode( password, "UTF-8" );
} catch ( UnsupportedEncodingException unseE ) {
- LOGGER.error( "Could not encode URL for " + username + " with vendor license " + vendor );
+ _logger.error( "Could not encode URL for " + username + " with vendor license " + vendor );
return false;
}
try {
@@ -99,7 +94,7 @@ public class ThreadedUmlsDictionaryLooku
return result;
}
} catch ( IOException ioE ) {
- LOGGER.error( ioE.getMessage() );
+ _logger.error( ioE.getMessage() );
return false;
}
}
Modified: ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java?rev=1815519&r1=1815518&r2=1815519&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java (original)
+++ ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java Thu Nov 16 22:23:41 2017
@@ -19,6 +19,7 @@
package org.apache.ctakes.dictionary.lookup.ae;
import org.apache.commons.io.FileUtils;
+import org.apache.ctakes.core.ae.UmlsEnvironmentConfiguration;
import org.apache.ctakes.core.pipeline.PipeBitInfo;
import org.apache.ctakes.core.resource.FileResourceImpl;
import org.apache.ctakes.core.resource.JdbcConnectionResourceImpl;
@@ -57,10 +58,6 @@ public class UmlsDictionaryLookupAnnotat
* Performs a check for user's UMLS licence at init time via their RESTful API
* User's will need to configure their UMLS username/password in their config
*/
- public final static String UMLSADDR_PARAM = "ctakes.umlsaddr";
- public final static String UMLSVENDOR_PARAM = "ctakes.umlsvendor";
- public final static String UMLSUSER_PARAM = "ctakes.umlsuser";
- public final static String UMLSPW_PARAM = "ctakes.umlspw";
private Logger iv_logger = Logger.getLogger( getClass().getName() );
@@ -75,12 +72,12 @@ public class UmlsDictionaryLookupAnnotat
super.initialize( aContext );
try {
- UMLSAddr = EnvironmentVariable.getEnv( UMLSADDR_PARAM, aContext );
- UMLSVendor = EnvironmentVariable.getEnv( UMLSVENDOR_PARAM, aContext );
- UMLSUser = EnvironmentVariable.getEnv( UMLSUSER_PARAM, aContext );
- UMLSPW = EnvironmentVariable.getEnv( UMLSPW_PARAM, aContext );
+ UMLSAddr = EnvironmentVariable.getEnv(UmlsEnvironmentConfiguration.URL.toString(), aContext );
+ UMLSVendor = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.VENDOR.toString(), aContext );
+ UMLSUser = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.USER.toString(), aContext );
+ UMLSPW = EnvironmentVariable.getEnv( UmlsEnvironmentConfiguration.PASSWORD.toString(), aContext );
- iv_logger.info( "Using " + UMLSADDR_PARAM + ": " + UMLSAddr + ": " + UMLSUser );
+ iv_logger.info( "Using " + UmlsEnvironmentConfiguration.URL + ": " + UMLSAddr + ": " + UMLSUser );
if ( !isValidUMLSUser( UMLSAddr, UMLSVendor, UMLSUser, UMLSPW ) ) {
iv_logger.error(
"Error: Invalid UMLS License. A UMLS License is required to use the UMLS dictionary lookup. \n" +
@@ -133,9 +130,9 @@ public class UmlsDictionaryLookupAnnotat
throw new RuntimeException("Error copying temporary InpuStream org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml to /tmp/LookupDesc_Db.xml.", e);
}
return AnalysisEngineFactory.createEngineDescription( UmlsDictionaryLookupAnnotator.class,
- UMLSADDR_PARAM,
+ UmlsEnvironmentConfiguration.URL,
"https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser",
- UMLSVENDOR_PARAM,
+ UmlsEnvironmentConfiguration.VENDOR,
"NLM-6515182895",
"LookupDescriptor",
ExternalResourceFactory.createExternalResourceDescription(
Modified: ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java?rev=1815519&r1=1815518&r2=1815519&view=diff
==============================================================================
--- ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java (original)
+++ ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java Thu Nov 16 22:23:41 2017
@@ -18,6 +18,9 @@
*/
package org.apache.ctakes.regression.test;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.ctakes.core.ae.UmlsEnvironmentConfiguration;
+import org.apache.ctakes.utils.env.EnvironmentVariable;
import org.apache.log4j.Logger;
import org.apache.uima.UIMAFramework;
import org.apache.uima.cas.CAS;
@@ -28,9 +31,7 @@ import org.apache.uima.collection.metada
import org.apache.uima.util.XMLInputSource;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.IgnoreTextAndAttributeValuesDifferenceListener;
-import org.custommonkey.xmlunit.XMLTestCase;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.*;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
@@ -44,48 +45,53 @@ import java.util.List;
/**
* Runs a full pipeline and compares the xml output to ensure all annotators
* work together in harmony.
- *
+ *
* This is designed to run all CPE's inside the
* desc/collection_processing_engine Directory. So any new pipeline added there
* will automatically be run and tested as long as they put the generated output
* to expectedoutput/{nameofcpe}
- *
+ *
* The Apache cTAKES Release Manager should ensure that at a min this test
* passes before releasing.
- *
+ *
* If there are new modules, be sure to add the desc here. If there are changes,
* after it's been manually reviewed, re-record the expected output and put them
* in output folder.
- *
+ *
* This also tests the UMLS annotator(s) so be sure to download the UMLS
* Resources per README and add the jvm params -Dctakes.umlsuser=
* -Dctakes.umlspw= parameters before running
- *
+ *
*/
-public class RegressionPipelineTest extends XMLTestCase {
+public class RegressionPipelineTest {
+ static Logger logger = Logger.getLogger(RegressionPipelineTest.class.getName());
+
+ // MAX timeout for the CPE
private static final int MAX_TIMEOUT_MS = 60 * 60 * 1000; // 60 mins
- // LOG4J logger based on class name
- Logger logger = Logger.getLogger(getClass().getName());
- private static final File CPEDIR = new File(
- "desc/collection_processing_engine");
- int num_cpe = 0;
+ // TODO: consider refactor
+ private int num_cpe = 0;
+
+ private static final Boolean hasUMLSCredentials() {
+ return EnvironmentVariable.getEnv(UmlsEnvironmentConfiguration.USER.toString()) != null;
+ }
+ @BeforeClass
+ public static void beforeClass() {
+ Assume.assumeTrue( hasUMLSCredentials() );
+ }
@Test
public void testCPE() throws Exception {
long started = System.currentTimeMillis();
- File[] listOfFiles = CPEDIR.listFiles();
+ File directoryCPE = new File("desc/collection_processing_engine");
+ File[] listOfFiles = directoryCPE.listFiles();
for (File file : listOfFiles) {
if (file.isFile()) {
num_cpe++;
- File generated = new File("testdata/generatedoutput/"
- + file.getName().substring(0,
- file.getName().indexOf(".")));
- File expected = new File("testdata/expectedoutput/"
- + file.getName().substring(0,
- file.getName().indexOf(".")));
+ File generated = new File(String.format("testdata/generatedoutput/%s", FilenameUtils.removeExtension(file.getName())));
+ File expected = new File(String.format("testdata/expectedoutput/%s", FilenameUtils.removeExtension(file.getName())));
logger.info("Creating directory: " + generated);
@@ -100,8 +106,7 @@ public class RegressionPipelineTest exte
CollectionProcessingEngine mCPE = UIMAFramework
.produceCollectionProcessingEngine(cpeDesc);
// Create and register a Status Callback Listener
- mCPE.addStatusCallbackListener(new StatusCallbackListenerImpl(
- expected, generated));
+ mCPE.addStatusCallbackListener(new RegressionPipelineTest.StatusCallbackListenerImpl(expected, generated));
mCPE.process();
}
}
@@ -109,8 +114,7 @@ public class RegressionPipelineTest exte
// Before comparing.
while (num_cpe > 0) {
if (System.currentTimeMillis() - started >= MAX_TIMEOUT_MS) {
- Assert.assertEquals("Timed out:", "Regression CPE test timed out after "
- + MAX_TIMEOUT_MS + " ms");
+ Assert.assertEquals("Timed out:", String.format("Regression CPE test timed out after %d ms", MAX_TIMEOUT_MS));
}
Thread.sleep(1000);
}
@@ -144,16 +148,15 @@ public class RegressionPipelineTest exte
// myDiff.overrideElementQualifier(new
// ElementNameAndAttributeQualifier("id"));
myDiff.overrideDifferenceListener(new IgnoreTextAndAttributeValuesDifferenceListener());
- assertTrue("Verifying Test Output: " + file.getName() + myDiff,
- myDiff.similar());
+ Assert.assertTrue(String.format("Verifying Test Output: %s%s", file.getName(), myDiff), myDiff.similar());
}
}
}
/**
* Callback Listener. Receives event notifications from CPE.
- *
- *
+ *
+ *
*/
class StatusCallbackListenerImpl implements StatusCallbackListener {
int entityCount = 0;
@@ -168,7 +171,7 @@ public class RegressionPipelineTest exte
/**
* Called when the initialization is completed.
- *
+ *
* @see org.apache.uima.collection.processing.StatusCallbackListener#initializationComplete()
*/
public void initializationComplete() {
@@ -177,9 +180,9 @@ public class RegressionPipelineTest exte
/**
* Called when the batchProcessing is completed.
- *
+ *
* @see org.apache.uima.collection.processing.StatusCallbackListener#batchProcessComplete()
- *
+ *
*/
public void batchProcessComplete() {
logger.info("Completed " + entityCount + " documents");
@@ -188,7 +191,7 @@ public class RegressionPipelineTest exte
/**
* Called when the collection processing is completed.
- *
+ *
* @see org.apache.uima.collection.processing.StatusCallbackListener#collectionProcessComplete()
*/
public void collectionProcessComplete() {
@@ -206,7 +209,7 @@ public class RegressionPipelineTest exte
/**
* Called when the CPM is paused.
- *
+ *
* @see org.apache.uima.collection.processing.StatusCallbackListener#paused()
*/
public void paused() {
@@ -215,7 +218,7 @@ public class RegressionPipelineTest exte
/**
* Called when the CPM is resumed after a pause.
- *
+ *
* @see org.apache.uima.collection.processing.StatusCallbackListener#resumed()
*/
public void resumed() {
@@ -224,7 +227,7 @@ public class RegressionPipelineTest exte
/**
* Called when the CPM is stopped abruptly due to errors.
- *
+ *
* @see org.apache.uima.collection.processing.StatusCallbackListener#aborted()
*/
public void aborted() {
@@ -234,7 +237,7 @@ public class RegressionPipelineTest exte
/**
* Called when the processing of a Document is completed. <br>
* The process status can be looked at and corresponding actions taken.
- *
+ *
* @param aCas
* CAS corresponding to the completed processing
* @param aStatus
Modified: ctakes/trunk/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/pom.xml?rev=1815519&r1=1815518&r2=1815519&view=diff
==============================================================================
--- ctakes/trunk/pom.xml (original)
+++ ctakes/trunk/pom.xml Thu Nov 16 22:23:41 2017
@@ -79,6 +79,7 @@
<ctakes.version>4.0.1-SNAPSHOT</ctakes.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
+ <maven-surefire-plugin.version>2.12.1</maven-surefire-plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
@@ -805,7 +806,7 @@
explicitly include files ending in "Tests" -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.12.1</version>
+ <version>${maven-surefire-plugin.version}</version>
<configuration>
<includes>
<include>**/Test*.java</include>
@@ -940,5 +941,25 @@
<additionalparam>-Xdoclint:none</additionalparam>
</properties>
</profile>
+ <!-- START SNIPPET: release-profile -->
+ <!-- !IMPORTANT: Overrides the official org.apache:apache (parent pom) -->
+ <profile>
+ <id>apache-release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${maven-surefire-plugin.version}</version>
+ <configuration>
+ <environmentVariables>
+ <ctakes.umlsuser>CHANGE_ME</ctakes.umlsuser>
+ </environmentVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <!-- END SNIPPET: release-profile -->
</profiles>
</project>