You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2013/06/12 16:43:47 UTC
svn commit: r1492227 - in /uima/uimaj/trunk/jcasgen-maven-plugin/src:
it/m2e/pom.xml main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java
Author: schor
Date: Wed Jun 12 14:43:46 2013
New Revision: 1492227
URL: http://svn.apache.org/r1492227
Log:
[UIMA-2983] make import setLocation argument be a proper form for a URL to an absolute file location. Also, disable m2e integration test.
Modified:
uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml
uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java
Modified: uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml?rev=1492227&r1=1492226&r2=1492227&view=diff
==============================================================================
--- uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml (original)
+++ uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml Wed Jun 12 14:43:46 2013
@@ -24,7 +24,8 @@
<groupId>org.apache.uima</groupId>
<artifactId>org.apache.uima.tools.jcasgen.maven.tests.m2e</artifactId>
<version>0.9.2-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
+ <!-- this is disabled, to re-enable switch the packaging by uncommenting the next line -->
+<!-- <packaging>eclipse-test-plugin</packaging> -->
<name>JCasGen Maven plugin Eclipse tests</name>
<description>The tests for the JCasGen Maven plugin when used in Eclipse</description>
<repositories>
@@ -46,53 +47,54 @@
</properties>
<build>
<plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <resolver>p2</resolver>
- <ignoreTychoRepositories>true</ignoreTychoRepositories>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
- <executions>
- <execution>
- <id>copy-projects</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <inherited>false</inherited>
- <configuration>
- <target>
+ <!-- Note: This build is disabled. To enable, just reverse the comments (Eclipse has a control-shift-c to do this on multi-lines) -->
+<!-- <plugin> -->
+<!-- <groupId>org.eclipse.tycho</groupId> -->
+<!-- <artifactId>tycho-maven-plugin</artifactId> -->
+<!-- <version>${tycho-version}</version> -->
+<!-- <extensions>true</extensions> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <groupId>org.eclipse.tycho</groupId> -->
+<!-- <artifactId>target-platform-configuration</artifactId> -->
+<!-- <version>${tycho-version}</version> -->
+<!-- <configuration> -->
+<!-- <resolver>p2</resolver> -->
+<!-- <ignoreTychoRepositories>true</ignoreTychoRepositories> -->
+<!-- </configuration> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <groupId>org.apache.maven.plugins</groupId> -->
+<!-- <artifactId>maven-antrun-plugin</artifactId> -->
+<!-- <version>1.7</version> -->
+<!-- <executions> -->
+<!-- <execution> -->
+<!-- <id>copy-projects</id> -->
+<!-- <phase>generate-test-resources</phase> -->
+<!-- <goals> -->
+<!-- <goal>run</goal> -->
+<!-- </goals> -->
+<!-- <inherited>false</inherited> -->
+<!-- <configuration> -->
+<!-- <target> -->
<!-- Propagate the versions of the UIMA framework into the m2e tests -->
- <copy todir="${project.build.directory}/projects" verbose="yes" overwrite="yes">
- <fileset dir="projects" />
- <filterset>
- <filter token="project.version" value="${main.project.version}" />
- </filterset>
- </copy>
+<!-- <copy todir="${project.build.directory}/projects" verbose="yes" overwrite="yes"> -->
+<!-- <fileset dir="projects" /> -->
+<!-- <filterset> -->
+<!-- <filter token="project.version" value="${main.project.version}" /> -->
+<!-- </filterset> -->
+<!-- </copy> -->
<!-- Propagate the jcasgen-maven-plugin artifact being built into the m2e tests -->
- <copy file="settings-template.xml" tofile="${project.build.directory}/../settings.xml" verbose="yes" overwrite="yes">
- <filterset>
- <filter token="localRepositoryUrl" value="${main.localRepositoryUrl}" />
- </filterset>
- </copy>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
+<!-- <copy file="settings-template.xml" tofile="${project.build.directory}/../settings.xml" verbose="yes" overwrite="yes"> -->
+<!-- <filterset> -->
+<!-- <filter token="localRepositoryUrl" value="${main.localRepositoryUrl}" /> -->
+<!-- </filterset> -->
+<!-- </copy> -->
+<!-- </target> -->
+<!-- </configuration> -->
+<!-- </execution> -->
+<!-- </executions> -->
+<!-- </plugin> -->
</plugins>
<pluginManagement>
<plugins>
Modified: uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java?rev=1492227&r1=1492226&r2=1492227&view=diff
==============================================================================
--- uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java (original)
+++ uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java Wed Jun 12 14:43:46 2013
@@ -134,7 +134,14 @@ public class JCasGenMojo
boolean contextDelta = false;
for (String descriptorLocation : ds.getIncludedFiles()) {
Import imp = new Import_impl();
- imp.setLocation("file:///" + (new File(ds.getBasedir(), descriptorLocation)).getAbsolutePath());
+ // setLocation takes a string which must be a URL https://issues.apache.org/jira/browse/UIMA-2983
+ URL url;
+ try {
+ url = (new File(ds.getBasedir(), descriptorLocation)).toURI().toURL();
+ } catch (MalformedURLException e) {
+ throw new RuntimeException(e); // this should never happen for files
+ }
+ imp.setLocation(url.toString());
imports.add(imp);
contextDelta |= this.buildContext