From 7f03759d3603f4357918fb5592cb8086102b5d9d Mon Sep 17 00:00:00 2001 From: Thorsten Vitt <thorsten.vitt@uni-wuerzburg.de> Date: Thu, 4 Apr 2013 10:46:11 +0000 Subject: [PATCH] Added base url for WADL. Configured using a property & profiles. git-svn-id: https://develop.sub.uni-goettingen.de/repos/textgrid/trunk/services/aggregator@13896 7c539038-3410-0410-b1ec-0f2a7bf1c452 --- pom.xml | 777 +++++++++++++++--------------- src/main/webapp/WEB-INF/beans.xml | 2 +- 2 files changed, 400 insertions(+), 379 deletions(-) diff --git a/pom.xml b/pom.xml index cc76ebf..ee4c889 100644 --- a/pom.xml +++ b/pom.xml @@ -1,398 +1,419 @@ <?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>info.textgrid.services</groupId> - <artifactId>aggregator</artifactId> - <version>1.2-SNAPSHOT</version> - <packaging>war</packaging> - <name>TextGrid Aggregator Service</name> +<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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>info.textgrid.services</groupId> + <artifactId>aggregator</artifactId> + <version>1.2-SNAPSHOT</version> + <packaging>war</packaging> + <name>TextGrid Aggregator Service</name> - <developers> - <developer> - <id>vitt</id> - <name>Thorsten Vitt</name> - <email>thorsten.vitt@uni-wuerzburg.de</email> - <url>http://www.thorstenvitt.de/</url> - <organization>Universität Würzburg</organization> - <organizationUrl>http://www.germanistik.uni-wuerzburg.de/lehrstuehle/computerphilologie</organizationUrl> - <roles> - </roles> - </developer> - </developers> + <developers> + <developer> + <id>vitt</id> + <name>Thorsten Vitt</name> + <email>thorsten.vitt@uni-wuerzburg.de</email> + <url>http://www.thorstenvitt.de/</url> + <organization>Universität Würzburg</organization> + <organizationUrl>http://www.germanistik.uni-wuerzburg.de/lehrstuehle/computerphilologie</organizationUrl> + <roles> </roles> + </developer> + </developers> - <properties> - <commons-io-version>2.4</commons-io-version> - <link-rewriter-version>0.0.4-SNAPSHOT</link-rewriter-version> - <saxon-version>9.4</saxon-version> - <cxf-version>2.7.3</cxf-version> - <confclient-version>1.0-SNAPSHOT</confclient-version> - <tgsearch-version>2.1.0-SNAPSHOT</tgsearch-version> - <tgcrud-version>2.4.0-SNAPSHOT</tgcrud-version> - <guava-version>13.0.1</guava-version> - <junit-version>4.10</junit-version> - <spring-version>3.2.2.RELEASE</spring-version> - <tei-xsl-version>6.17</tei-xsl-version> - </properties> + <properties> + <commons-io-version>2.4</commons-io-version> + <link-rewriter-version>0.0.4-SNAPSHOT</link-rewriter-version> + <saxon-version>9.4</saxon-version> + <cxf-version>2.7.3</cxf-version> + <confclient-version>1.0-SNAPSHOT</confclient-version> + <tgsearch-version>2.1.0-SNAPSHOT</tgsearch-version> + <tgcrud-version>2.4.0-SNAPSHOT</tgcrud-version> + <guava-version>13.0.1</guava-version> + <junit-version>4.10</junit-version> + <spring-version>3.2.2.RELEASE</spring-version> + <tei-xsl-version>6.17</tei-xsl-version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <aggregator.endpoint.published>http://localhost:13000/aggregator</aggregator.endpoint.published> + </properties> - <repositories> - <repository> - <id>bibforge.internal.http</id> - <name>Bibforge Managed Internal Repository</name> - <url>http://repository.bibforge.org/archiva/repository/internal</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>bibforge.snapshots.http</id> - <name>Bibforge Managed Snapshot Repository</name> - <url>http://repository.bibforge.org/archiva/repository/snapshots</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - - <repository> - <id>dh.nexus.releases</id> - <name>Cophi Nexus Releases</name> - <url>http://dev.digital-humanities.de/nexus/content/repositories/releases</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>dh.nexus.snapshots</id> - <name>Cophi Nexus snapshots</name> - <url>http://dev.digital-humanities.de/nexus/content/repositories/snapshots</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - - </repositories> + <repositories> + <repository> + <id>bibforge.internal.http</id> + <name>Bibforge Managed Internal Repository</name> + <url>http://repository.bibforge.org/archiva/repository/internal</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>bibforge.snapshots.http</id> + <name>Bibforge Managed Snapshot Repository</name> + <url>http://repository.bibforge.org/archiva/repository/snapshots</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + <repository> + <id>dh.nexus.releases</id> + <name>Cophi Nexus Releases</name> + <url>http://dev.digital-humanities.de/nexus/content/repositories/releases</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>dh.nexus.snapshots</id> + <name>Cophi Nexus snapshots</name> + <url>http://dev.digital-humanities.de/nexus/content/repositories/snapshots</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junit-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>${guava-version}</version> - </dependency> - <dependency> - <groupId>info.textgrid.middleware</groupId> - <artifactId>tgcrud-client</artifactId> - <version>${tgcrud-version}</version> - </dependency> - <dependency> - <groupId>info.textgrid.middleware</groupId> - <artifactId>tgsearch-client</artifactId> - <version>${tgsearch-version}</version> - </dependency> - <dependency> - <groupId>info.textgrid.middleware</groupId> - <artifactId>confclient</artifactId> - <version>${confclient-version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxrs</artifactId> - <version>${cxf-version}</version> - </dependency> - <dependency> - <groupId>net.sf.saxon</groupId> - <artifactId>Saxon-HE</artifactId> - <version>${saxon-version}</version> - </dependency> - <dependency> - <groupId>info.textgrid.utils</groupId> - <artifactId>link-rewriter-core</artifactId> - <version>${link-rewriter-version}</version> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>${commons-io-version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-transports-http</artifactId> - <version>${cxf-version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${spring-version}</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - </dependency> - </dependencies> - - - <build> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>tomcat-maven-plugin</artifactId> - <version>1.1</version> - <executions> - <execution> - <id>default-cli</id> - <goals> - <goal>run</goal> - </goals> - <configuration> - <port>13000</port> - <path>/aggregator</path> - <useSeparateTomcatClassLoader>false</useSeparateTomcatClassLoader> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-eclipse-plugin</artifactId> - <configuration> - <projectNameTemplate>[artifactId]-[version]</projectNameTemplate> - <wtpmanifest>true</wtpmanifest> - <wtpapplicationxml>true</wtpapplicationxml> - <wtpversion>2.0</wtpversion> - </configuration> - </plugin> - <!--This plugin's configuration is used to store Eclipse m2e settings + </repositories> + + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>${junit-version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>${guava-version}</version> + </dependency> + <dependency> + <groupId>info.textgrid.middleware</groupId> + <artifactId>tgcrud-client</artifactId> + <version>${tgcrud-version}</version> + </dependency> + <dependency> + <groupId>info.textgrid.middleware</groupId> + <artifactId>tgsearch-client</artifactId> + <version>${tgsearch-version}</version> + </dependency> + <dependency> + <groupId>info.textgrid.middleware</groupId> + <artifactId>confclient</artifactId> + <version>${confclient-version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-frontend-jaxrs</artifactId> + <version>${cxf-version}</version> + </dependency> + <dependency> + <groupId>net.sf.saxon</groupId> + <artifactId>Saxon-HE</artifactId> + <version>${saxon-version}</version> + </dependency> + <dependency> + <groupId>info.textgrid.utils</groupId> + <artifactId>link-rewriter-core</artifactId> + <version>${link-rewriter-version}</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>${commons-io-version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-transports-http</artifactId> + <version>${cxf-version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>${spring-version}</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> + </dependency> + </dependencies> + + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>tomcat-maven-plugin</artifactId> + <version>1.1</version> + <executions> + <execution> + <id>default-cli</id> + <goals> + <goal>run</goal> + </goals> + <configuration> + <port>13000</port> + <path>/aggregator</path> + <useSeparateTomcatClassLoader>false</useSeparateTomcatClassLoader> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <configuration> + <projectNameTemplate>[artifactId]-[version]</projectNameTemplate> + <wtpmanifest>true</wtpmanifest> + <wtpapplicationxml>true</wtpapplicationxml> + <wtpversion>2.0</wtpversion> + </configuration> + </plugin> + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId> org.codehaus.mojo </groupId> - <artifactId> + <artifactId> build-helper-maven-plugin </artifactId> - <versionRange> - [1.5,) - </versionRange> - <goals> - <goal> + <versionRange> [1.5,) </versionRange> + <goals> + <goal> reserve-network-port </goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore/> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.1</version> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.5</version> - <executions> - <execution> - <id>reserve-network-port</id> - <goals> - <goal>reserve-network-port</goal> - </goals> - <phase>process-test-resources</phase> - <configuration> - <portNames> - <portName>test.server.port</portName> - </portNames> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>tomcat-maven-plugin</artifactId> - <executions> - <execution> - <id>start-tomcat</id> - <goals> - <goal>run-war</goal> - </goals> - <phase>pre-integration-test</phase> - <configuration> - <port>${test.server.port}</port> - <path>/aggregator</path> - <fork>true</fork> - <useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader> - </configuration> - </execution> - <execution> - <id>stop-tomcat</id> - <goals> - <goal>shutdown</goal> - </goals> - <phase>post-integration-test</phase> - <configuration> - <path>/aggregator</path> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <version>2.8.1</version> - <executions> - <execution> - <id>integration-test</id> - <goals> - <goal>integration-test</goal> - </goals> - <configuration> - <systemPropertyVariables> - <service.url>http://localhost:${test.server.port}/aggregator</service.url> - </systemPropertyVariables> - </configuration> - </execution> - <execution> - <id>verify</id> - <goals> - <goal>verify</goal> - </goals> - </execution> - </executions> - </plugin> - - - - <!-- Following two executions are used to download the specified version + </goals> + </pluginExecutionFilter> + <action> + <ignore/> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.3.1</version> + <configuration> + <source>1.6</source> + <target>1.6</target> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.5</version> + <executions> + <execution> + <id>reserve-network-port</id> + <goals> + <goal>reserve-network-port</goal> + </goals> + <phase>process-test-resources</phase> + <configuration> + <portNames> + <portName>test.server.port</portName> + </portNames> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>tomcat-maven-plugin</artifactId> + <executions> + <execution> + <id>start-tomcat</id> + <goals> + <goal>run-war</goal> + </goals> + <phase>pre-integration-test</phase> + <configuration> + <port>${test.server.port}</port> + <path>/aggregator</path> + <fork>true</fork> + <useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader> + </configuration> + </execution> + <execution> + <id>stop-tomcat</id> + <goals> + <goal>shutdown</goal> + </goals> + <phase>post-integration-test</phase> + <configuration> + <path>/aggregator</path> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <version>2.8.1</version> + <executions> + <execution> + <id>integration-test</id> + <goals> + <goal>integration-test</goal> + </goals> + <configuration> + <systemPropertyVariables> + <service.url>http://localhost:${test.server.port}/aggregator</service.url> + </systemPropertyVariables> + </configuration> + </execution> + <execution> + <id>verify</id> + <goals> + <goal>verify</goal> + </goals> + </execution> + </executions> + </plugin> + + + + <!-- Following two executions are used to download the specified version of the TEI stylesheets and unzip them to the WEB-INF folder of the target WAR --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>wagon-maven-plugin</artifactId> - <version>1.0-beta-4</version> - - <executions> - <execution> - <id>download-tei-stylesheets</id> - <goals> - <goal>download-single</goal> - </goals> - <phase>generate-resources</phase> - <configuration> - <url>http://downloads.sourceforge.net/project/tei/Stylesheets/</url> - <fromFile>tei-xsl-${tei-xsl-version}.zip</fromFile> - <toDir>${project.build.directory}</toDir> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>truezip-maven-plugin</artifactId> - <version>1.1</version> - <executions> - <execution> - <id>extract-tei-stylesheets</id> - <goals> - <goal>copy</goal> - </goals> - <phase>generate-resources</phase> - </execution> - </executions> - <configuration> - <fileset> - <directory>${project.build.directory}/tei-xsl-${tei-xsl-version}.zip/xml</directory> - <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileset> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.14</version> - <configuration> - <systemPropertyVariables> - <webapp.directory>${project.build.directory}/${project.artifactId}-${project.version}</webapp.directory> - </systemPropertyVariables> - </configuration> - </plugin> - - </plugins> - </build> - <profiles> - <profile> - <id>wue</id> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>tomcat-maven-plugin</artifactId> - <configuration> - <url>http://wrzh075.rzhousing.uni-wuerzburg.de:8180/manager</url> - <server>wrzh075</server> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> - <organization> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>wagon-maven-plugin</artifactId> + <version>1.0-beta-4</version> + + <executions> + <execution> + <id>download-tei-stylesheets</id> + <goals> + <goal>download-single</goal> + </goals> + <phase>generate-resources</phase> + <configuration> + <url>http://downloads.sourceforge.net/project/tei/Stylesheets/</url> + <fromFile>tei-xsl-${tei-xsl-version}.zip</fromFile> + <toDir>${project.build.directory}</toDir> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>truezip-maven-plugin</artifactId> + <version>1.1</version> + <executions> + <execution> + <id>extract-tei-stylesheets</id> + <goals> + <goal>copy</goal> + </goals> + <phase>generate-resources</phase> + </execution> + </executions> + <configuration> + <fileset> + <directory>${project.build.directory}/tei-xsl-${tei-xsl-version}.zip/xml</directory> + <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF</outputDirectory> + <includes> + <include>**/*</include> + </includes> + </fileset> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.14</version> + <configuration> + <systemPropertyVariables> + <webapp.directory>${project.build.directory}/${project.artifactId}-${project.version}</webapp.directory> + </systemPropertyVariables> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>2.3</version> + <configuration> + <webResources> + <resource> + <directory>${basedir}/src/main/webapp/WEB-INF</directory> + <filtering>true</filtering> + <targetPath>WEB-INF</targetPath> + <includes> + <include>**/beans.xml</include> + </includes> + </resource> + </webResources> + </configuration> + </plugin> + + </plugins> + </build> + <profiles> + <profile> + <id>wue</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>tomcat-maven-plugin</artifactId> + <configuration> + <url>http://wrzh075.rzhousing.uni-wuerzburg.de:8180/manager</url> + <server>wrzh075</server> + </configuration> + </plugin> + </plugins> + </build> + <properties> + <aggregator.endpoint.published>http://test1.digital-humanities.de/aggregator</aggregator.endpoint.published> + </properties> + </profile> + </profiles> + <organization> <name>TextGrid</name> <url>http://www.textgrid.de/</url> </organization> - <description>The TextGrid Aggregator is an experimental service that can walk aggregations (including editions and collections) and export the objects therein to various formats, e.g., TEI corpus, EPUB, and (experimentally) PDF.</description> - <inceptionYear>2012</inceptionYear> + <description>The TextGrid Aggregator is an experimental service that can walk aggregations (including editions and collections) and export the objects therein to various formats, e.g., TEI corpus, EPUB, and (experimentally) PDF.</description> + <inceptionYear>2012</inceptionYear> </project> diff --git a/src/main/webapp/WEB-INF/beans.xml b/src/main/webapp/WEB-INF/beans.xml index bf15c89..b6d3fc4 100644 --- a/src/main/webapp/WEB-INF/beans.xml +++ b/src/main/webapp/WEB-INF/beans.xml @@ -26,7 +26,7 @@ http://cxf.apache.org/schemas/jaxrs.xsd"> </bean> - <jaxrs:server id="services" address="/"> + <jaxrs:server id="services" address="/" publishedEndpointUrl="${aggregator.endpoint.published}"> <jaxrs:serviceBeans> <!-- bean class="info.textgrid.services.aggregator.HelloWorld" /--> <bean class="info.textgrid.services.aggregator.teicorpus.TEICorpus" scope="singleton"> -- GitLab