Rewire the "installer" project to take a settings file rather than a profile activation
This commit is contained in:
parent
7f7c277da3
commit
c9cb8aebfd
8 changed files with 262 additions and 202 deletions
18
default-settings.xml
Normal file
18
default-settings.xml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>defaults</id>
|
||||||
|
<properties>
|
||||||
|
<app-name>vivo</app-name>
|
||||||
|
<vivo-dir>/usr/local/vivo/home</vivo-dir>
|
||||||
|
<tomcat-dir>/usr/local/tomcat</tomcat-dir>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
<activeProfiles>
|
||||||
|
<activeProfile>defaults</activeProfile>
|
||||||
|
</activeProfiles>
|
||||||
|
</settings>
|
|
@ -19,47 +19,60 @@
|
||||||
|
|
||||||
<name>VIVO Prepare Home</name>
|
<name>VIVO Prepare Home</name>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>install</id>
|
||||||
|
<activation>
|
||||||
|
<property><name>vivo-dir</name></property>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.5.5</version>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/home.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.7</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>install</id>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${vivo-dir}</outputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>${project.build.directory}/${project.build.finalName}</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<version>2.5.5</version>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>src/main/assembly/home.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
|
||||||
<version>2.7</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>install</id>
|
|
||||||
<phase>install</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-resources</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${home-dir}</outputDirectory>
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>${project.build.directory}/${project.build.finalName}</directory>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
<version>2.5.2</version>
|
<version>2.5.2</version>
|
||||||
|
|
|
@ -12,64 +12,8 @@
|
||||||
|
|
||||||
<name>VIVO Installer</name>
|
<name>VIVO Installer</name>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<app-name>vivo</app-name>
|
|
||||||
<home-dir>/usr/local/vivo/home</home-dir>
|
|
||||||
<tomcat-dir>/usr/local/tomcat</tomcat-dir>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- plugin>
|
|
||||||
<groupId>org.codehaus.cargo</groupId>
|
|
||||||
<artifactId>cargo-maven2-plugin</artifactId>
|
|
||||||
<version>1.4.16</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<version>2.10</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>unpack-home</id>
|
|
||||||
<phase>generate-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>unpack-dependencies</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<includeArtifactIds>vivo-home</includeArtifactIds>
|
|
||||||
<overWriteReleases>true</overWriteReleases>
|
|
||||||
<overWriteSnapshots>true</overWriteSnapshots>
|
|
||||||
<outputDirectory>target/home</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
|
||||||
<version>2.7</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>install-home</id>
|
|
||||||
<phase>process-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-resources</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>/usr/local/vitro/test</outputDirectory>
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>target/home</directory>
|
|
||||||
<filtering>false</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
<includeEmptyDirs>true</includeEmptyDirs>
|
|
||||||
<overwrite>true</overwrite>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin -->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
<version>2.5.2</version>
|
<version>2.5.2</version>
|
||||||
|
@ -85,4 +29,65 @@
|
||||||
<module>solr</module>
|
<module>solr</module>
|
||||||
<module>webapp</module>
|
<module>webapp</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>skip-install</id>
|
||||||
|
<activation>
|
||||||
|
<property><name>!vivo-dir</name></property>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-compile</id>
|
||||||
|
<phase />
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-testCompile</id>
|
||||||
|
<phase />
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-resources</id>
|
||||||
|
<phase />
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-testResources</id>
|
||||||
|
<phase />
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.12.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>test</id>
|
||||||
|
<phase/>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-war</id>
|
||||||
|
<phase/>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -19,59 +19,72 @@
|
||||||
|
|
||||||
<name>VIVO Prepare Solr App</name>
|
<name>VIVO Prepare Solr App</name>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>install</id>
|
||||||
|
<activation>
|
||||||
|
<property><name>vivo-dir</name></property>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
<archiveClasses>false</archiveClasses>
|
||||||
|
<overlays>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.vivoweb</groupId>
|
||||||
|
<artifactId>vitro-solr</artifactId>
|
||||||
|
<type>war</type>
|
||||||
|
</overlay>
|
||||||
|
</overlays>
|
||||||
|
<webResources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/webResources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</webResources>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>2.10</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>install</id>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>${project.artifactId}</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>war</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${tomcat-dir}/webapps/${app-name}solr</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
|
||||||
<version>2.6</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<addClasspath>true</addClasspath>
|
|
||||||
</manifest>
|
|
||||||
</archive>
|
|
||||||
<archiveClasses>false</archiveClasses>
|
|
||||||
<overlays>
|
|
||||||
<overlay>
|
|
||||||
<groupId>org.vivoweb</groupId>
|
|
||||||
<artifactId>vitro-solr</artifactId>
|
|
||||||
<type>war</type>
|
|
||||||
</overlay>
|
|
||||||
</overlays>
|
|
||||||
<webResources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/webResources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</webResources>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<version>2.10</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>install</id>
|
|
||||||
<phase>install</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>unpack</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<artifactItems>
|
|
||||||
<artifactItem>
|
|
||||||
<groupId>${project.groupId}</groupId>
|
|
||||||
<artifactId>${project.artifactId}</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<type>war</type>
|
|
||||||
<overWrite>true</overWrite>
|
|
||||||
<outputDirectory>${tomcat-dir}/webapps/${app-name}solr</outputDirectory>
|
|
||||||
</artifactItem>
|
|
||||||
</artifactItems>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
<version>2.5.2</version>
|
<version>2.5.2</version>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Environment
|
<Environment
|
||||||
type="java.lang.String"
|
type="java.lang.String"
|
||||||
name="solr/home"
|
name="solr/home"
|
||||||
value="${home-dir}/solr" override="true"/>
|
value="${vivo-dir}/solr" override="true"/>
|
||||||
|
|
||||||
<!-- Disable persist sessions on shut down.-->
|
<!-- Disable persist sessions on shut down.-->
|
||||||
<Manager pathname="" />
|
<Manager pathname="" />
|
||||||
|
|
|
@ -19,63 +19,73 @@
|
||||||
|
|
||||||
<name>VIVO Prepare Web App</name>
|
<name>VIVO Prepare Web App</name>
|
||||||
|
|
||||||
<build>
|
<profiles>
|
||||||
<!-- filters>
|
<profile>
|
||||||
<filter>${filters.file}</filter>
|
<id>install</id>
|
||||||
</filters -->
|
<activation>
|
||||||
<plugins>
|
<property><name>vivo-dir</name></property>
|
||||||
<plugin>
|
</activation>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<build>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<plugins>
|
||||||
<version>2.6</version>
|
<plugin>
|
||||||
<configuration>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<archive>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
<manifest>
|
<version>2.6</version>
|
||||||
<addClasspath>true</addClasspath>
|
|
||||||
</manifest>
|
|
||||||
</archive>
|
|
||||||
<archiveClasses>false</archiveClasses>
|
|
||||||
<overlays>
|
|
||||||
<overlay>
|
|
||||||
<groupId>org.vivoweb</groupId>
|
|
||||||
<artifactId>vivo-webapp</artifactId>
|
|
||||||
<type>war</type>
|
|
||||||
</overlay>
|
|
||||||
</overlays>
|
|
||||||
<webResources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/webResources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</webResources>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<version>2.10</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>install</id>
|
|
||||||
<phase>install</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>unpack</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<artifactItems>
|
<archive>
|
||||||
<artifactItem>
|
<manifest>
|
||||||
<groupId>${project.groupId}</groupId>
|
<addClasspath>true</addClasspath>
|
||||||
<artifactId>${project.artifactId}</artifactId>
|
</manifest>
|
||||||
<version>${project.version}</version>
|
</archive>
|
||||||
|
<archiveClasses>false</archiveClasses>
|
||||||
|
<overlays>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.vivoweb</groupId>
|
||||||
|
<artifactId>vivo-webapp</artifactId>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
<overWrite>true</overWrite>
|
</overlay>
|
||||||
<outputDirectory>${tomcat-dir}/webapps/${app-name}</outputDirectory>
|
</overlays>
|
||||||
</artifactItem>
|
<webResources>
|
||||||
</artifactItems>
|
<resource>
|
||||||
|
<directory>src/main/webResources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</webResources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</plugin>
|
||||||
</executions>
|
<plugin>
|
||||||
</plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>2.10</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>install</id>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>${project.artifactId}</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>war</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${tomcat-dir}/webapps/${app-name}</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
<version>2.5.2</version>
|
<version>2.5.2</version>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Environment
|
<Environment
|
||||||
type="java.lang.String"
|
type="java.lang.String"
|
||||||
name="vitro/home"
|
name="vitro/home"
|
||||||
value="${home-dir}" override="true"/>
|
value="${vivo-dir}" override="true"/>
|
||||||
|
|
||||||
<!-- Disable persist sessions on shut down.-->
|
<!-- Disable persist sessions on shut down.-->
|
||||||
<Manager pathname="" />
|
<Manager pathname="" />
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -22,6 +22,7 @@
|
||||||
<module>api</module>
|
<module>api</module>
|
||||||
<module>webapp</module>
|
<module>webapp</module>
|
||||||
<module>home</module>
|
<module>home</module>
|
||||||
|
<module>installer</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|
Loading…
Add table
Reference in a new issue