blob: 120b78300d935d2e27d8226ca382c0bae117389b [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.uima</groupId>
<artifactId>uimaj-parent</artifactId>
<version>3.4.1</version>
<relativePath>../uimaj-parent/pom.xml</relativePath>
</parent>
<artifactId>uimaj-core</artifactId>
<packaging>bundle</packaging>
<name>Apache UIMA Base: ${project.artifactId}</name>
<description>The core implementation of the UIMA Java Framework</description>
<url>${uimaWebsiteUrl}</url>
<properties>
<postNoticeText>${ibmNoticeText}</postNoticeText>
<maven.surefire.heap>650M</maven.surefire.heap>
</properties>
<dependencies>
<!-- Loggers -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId> <!-- core, not api, because need to set log level via api -->
<version>${log4j-version}</version>
<!-- "provided" fails in maven test - says cannot initialize class that makes ref to classes in this jar
"test" fails in maven compile - cannot compile -->
<scope>provided</scope>
</dependency>
<!-- dependency> moved to surefire configuration
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId--> <!-- core, not api, because need to set log level via api -->
<!-- version>${log4j-version}</version-->
<!-- "provided" fails in maven test - says cannot initialize class that makes ref to classes in this jar
"test" fails in maven compile - cannot compile -->
<!-- scope>test</scope>
</dependency-->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j-version}</version>
<!-- "provided" fails in maven test - says cannot initialize class that makes ref to classes in this jar
"test" fails in maven compile - cannot compile -->
<scope>provided</scope>
</dependency>
<!-- dependency> moved to surefire configuration
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j-version}</version>
<scope>test</scope>
</dependency-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- needed to convert slf4j markers into log4j markers
and for running the test -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j-version}</version>
<!-- scope provided: put in compile classpath, excluded from test classpath, not passed along -->
<scope>provided</scope>
</dependency>
<!-- dependency> moved to surefire configuration
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j-version}</version>
<scope>test</scope>
</dependency-->
<!-- causes build error: package org.apache.logging.slf4j does not exist
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j-version}</version>
<scope>test</scope>
</dependency>
-->
<dependency>
<groupId>org.apache.uima</groupId>
<artifactId>uimaj-test-util</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<scope>test</scope>
</dependency>
<!-- Uncomment one of these to add Saxon8 or 9 to the classpath for JUnit tests.
1 fails due to different formatting and a dropped xmlns attribute,
5 work when run separately or by mvn, but fail when running all tests from Eclipse:
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element '....'
-->
<!--
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.7.0-14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon</artifactId>
<version>8.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon-dom</artifactId>
<version>8.7</version>
<scope>test</scope>
</dependency>
-->
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Uncomment the next to run with -Xlint:unchecked -->
<!--plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin-->
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<executions>
<execution>
<id>default-cli</id>
<configuration>
<excludes combine.children="append">
<!-- test data -->
<exclude>src/test/resources/uima-v2-serialized-cas/README</exclude>
<exclude>src/test/resources/uima-v2-serialized-cas/*.xcas</exclude>
<exclude>src/test/resources/uima-v2-serialized-cas/*.xmi</exclude>
<exclude>src/test/resources/uima-v2-serialized-cas/*.bin*</exclude>
<exclude>src/test/resources/uima-v3-serialized-cas/README</exclude>
<exclude>src/test/resources/uima-v3-serialized-cas/*.xcas</exclude>
<exclude>src/test/resources/uima-v3-serialized-cas/*.xmi</exclude>
<exclude>src/test/resources/uima-v3-serialized-cas/*.bin*</exclude>
<exclude>src/test/resources/uima-v3-serialized-cas/*.bin*</exclude>
<exclude>src/test/resources/CASTests/verjuice.txt</exclude>
<exclude>src/test/resources/CASTests/CasTypeOrderTestRef.txt</exclude>
<exclude>src/test/resources/CASTests/english.txt</exclude>
<exclude>src/test/resources/XmiFileDataSuite/README.md</exclude>
<exclude>src/test/resources/XmiFileDataSuite/**/*.xmi</exclude>
<exclude>src/test/resources/XmiFileDataSuite/**/typesystem.xml</exclude>
<exclude>src/test/resources/ProgrammaticallyCreatedCasDataSuite/**/*</exclude>
<exclude>src/test/resources/CasSerializationDeserialization_*_Test/**/cas.*</exclude>
<exclude>src/test/resources/CasSerializationDeserialization_*_Test/**/data.*</exclude>
<exclude>src/test/resources/CasSerializationDeserialization_*_Test/**/typesystem.xml</exclude>
<exclude>src/test/resources/CasSerializationDeserialization_*_Test/**/debug.xmi</exclude>
<exclude>src/test/resources/CasSerializationDeserialization_*_Test/**/debug-typesystem.xml</exclude>
<exclude>src/test/resources/data/moby.txt</exclude>
<exclude>src/test/resources/org/apache/uima/resource/impl/ResourceInClasspath.txt</exclude>
<exclude>src/test/resources/pearTests/*.pear</exclude>
<exclude>src/test/resources/pearTests/encodingTests/*</exclude>
<exclude>src/test/resources/SequencerTest/*.txt</exclude>
<exclude>src/test/resources/SerDes*/SavedInts.binary</exclude>
<exclude>src/test/resources/META-INF/services/org.apache.uima.spi.JCasClassProvider</exclude>
<!-- jcas classes generated -->
<exclude>src/test/java/aa/*.java</exclude>
<exclude>src/test/java/org/apache/uima/cas/test/*.java</exclude>
<exclude>src/test/java/org/apache/uima/spi/SpiToken.java</exclude>
<exclude>src/test/java/org/apache/uima/spi/SpiSentence.java</exclude>
<exclude>src/test/java/org/apache/lang/LanguagePair.java</exclude>
<exclude>src/test/java/sofa/test/CrossAnnotation.java</exclude>
<exclude>src/test/java/x/y/z/*.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
<Import-Package>
!org.apache.uima,
!org.apache.uima.*,
!com.apple.eio,
org.slf4j.impl;resolution:=optional,
org.apache.logging.log4j.*;resolution:=optional,
org.apache.logging.slf4j.*;resolution:=optional,
*
</Import-Package>
<Export-Package>
org.apache.uima,
org.apache.uima.*
</Export-Package>
<Require-Capability>
osgi.extender;filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional,
osgi.serviceloader;filter:="(osgi.serviceloader=org.apache.uima.spi.JCasClassProvider)";cardinality:=multiple;resolution:=optional
</Require-Capability>
</instructions>
</configuration>
</plugin>
<!-- experiment with CLIRR
gets fatal error:
net.sf.clirr.core.CheckerException: Unable to find information in class org.apache.uima.cas.impl.AnnotationBaseImpl
referring back to nested class org.apache.uima.cas.impl.AnnotationBaseImpl$1
at net.sf.clirr.core.internal.bcel.BcelScopeHelper.getClassScope(BcelScopeHelper.java:127)
at net.sf.clirr.core.internal.bcel.BcelJavaType.getDeclaredScope(BcelJavaType.java:141)
at net.sf.clirr.core.internal.bcel.BcelJavaType.getEffectiveScope(BcelJavaType.java:145)
at net.sf.clirr.core.internal.checks.ClassScopeCheck.check(ClassScopeCheck.java:72)
at net.sf.clirr.core.Checker.runClassChecks(Checker.java:190)
at net.sf.clirr.core.Checker.reportDiffs(Checker.java:136)
at org.codehaus.mojo.clirr.AbstractClirrMojo.executeClirr(AbstractClirrMojo.java:236)
-->
<!--plugin>
<artifactId>clirr-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>2.2.3-SNAPSHOT</version>
</plugin-->
<!-- filter the template for the version java code
to insert the version from properties -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>setVersions</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>${project.build.directory}/generated-sources/releaseVersion</outputDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/versionJava</directory>
</resource>
</resources>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
<useDefaultDelimiters>false</useDefaultDelimiters>
</configuration>
</execution>
</executions>
</plugin>
<!-- add the generated sources to the compile sources -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>addVersionSrc</id>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/releaseVersion</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<uima.enable_strict_type_source_check>true</uima.enable_strict_type_source_check>
</systemProperties>
<!-- include dependencies that are for logging but specified as "provided" -->
<additionalClasspathElements>
<additionalClasspathElement>${settings.localRepository}/org/apache/logging/log4j/log4j-core/${log4j-version}/log4j-core-${log4j-version}.jar</additionalClasspathElement>
<additionalClasspathElement>${settings.localRepository}/org/apache/logging/log4j/log4j-api/${log4j-version}/log4j-api-${log4j-version}.jar</additionalClasspathElement>
<additionalClasspathElement>${settings.localRepository}/org/apache/logging/log4j/log4j-slf4j-impl/${log4j-version}/log4j-slf4j-impl-${log4j-version}.jar</additionalClasspathElement>
</additionalClasspathElements>
<!-- exclude log4j slf bridge for testing
<classpathDependencyExcludes>
<classpathDependencyExclude>org.apache.logging.log4j:log4j-slf4j-impl</classpathDependencyExclude>
</classpathDependencyExcludes>
-->
</configuration>
</plugin>
</plugins>
</build>
</project>