Tuning Up build process for dspace-solr, uses separate directories now for applying patches.

This commit is contained in:
Mark Diggory
2010-02-25 13:18:46 +00:00
parent 50468a1af7
commit d15ce96aa7
5 changed files with 203 additions and 125 deletions

View File

@@ -40,38 +40,56 @@
</developerConnection>
</scm>
<profiles>
<profile>
<id>patch</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-patch-plugin</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<patches>
<patch>common.patch</patch>
</patches>
<tasks>
<delete dir="{project.build.directory}/generated-sources"/>
<copy
todir="${project.build.directory}/generated-sources/main/java">
<fileset dir="src/main/external-java" />
</copy>
</tasks>
<sourceRoot>
${project.build.directory}/generated-sources/main/java
</sourceRoot>
<testSourceRoot>
${project.build.directory}/generated-sources/test/java
</testSourceRoot>
</configuration>
<executions>
<execution>
<id>patch</id>
<phase>process-sources</phase>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-patch-plugin</artifactId>
<configuration>
<patchFile>src/main/patches/common.patch</patchFile>
<targetDirectory>${project.build.directory}/generated-sources/main/java</targetDirectory>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Solr -->

View File

@@ -40,37 +40,58 @@
</developerConnection>
</scm>
<profiles>
<profile>
<id>patch</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-patch-plugin</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<patches>
<patch>core.patch</patch>
</patches>
<tasks>
<delete dir="{project.build.directory}/generated-sources"/>
<copy
todir="${project.build.directory}/generated-sources/main/java">
<fileset dir="src/main/external-java" />
</copy>
</tasks>
<sourceRoot>
${project.build.directory}/generated-sources/main/java
</sourceRoot>
<testSourceRoot>
${project.build.directory}/generated-sources/test/java
</testSourceRoot>
</configuration>
<executions>
<execution>
<id>patch</id>
<phase>process-sources</phase>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-patch-plugin</artifactId>
<configuration>
<patchFile>src/main/patches/core.patch</patchFile>
<targetDirectory>${project.build.directory}/generated-sources/main/java</targetDirectory>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Solr -->

View File

@@ -72,7 +72,7 @@
<id>maven.dspace.org-snapshot</id>
<name>DSpace Maven Repository</name>
<url>scp://maven.dspace.org/var/maven/snapshot</url>
<uniqueVersion>false</uniqueVersion>
<uniqueVersion>true</uniqueVersion>
</snapshotRepository>
</distributionManagement>
@@ -122,8 +122,12 @@
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>

View File

@@ -39,38 +39,6 @@
</developerConnection>
</scm>
<profiles>
<profile>
<id>patch</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-patch-plugin</artifactId>
<version>1.0</version>
<configuration>
<patches>
<patch>webapp.patch</patch>
</patches>
</configuration>
<executions>
<execution>
<id>patch</id>
<phase>process-sources</phase>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
@@ -82,6 +50,53 @@
<classesClassifier>classes</classesClassifier>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<tasks>
<delete dir="{project.build.directory}/generated-sources/main/java"/>
<copy
todir="${project.build.directory}/generated-sources/main/java">
<fileset dir="src/main/external-java" />
</copy>
</tasks>
<sourceRoot>
${project.build.directory}/generated-sources/main/java
</sourceRoot>
<testSourceRoot>
${project.build.directory}/generated-sources/test/java
</testSourceRoot>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-patch-plugin</artifactId>
<configuration>
<patchFile>src/main/patches/webapp.patch</patchFile>
<targetDirectory>${project.build.directory}/generated-sources/main/java</targetDirectory>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@@ -41,37 +41,57 @@
</developerConnection>
</scm>
<profiles>
<profile>
<id>patch</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-patch-plugin</artifactId>
<version>1.0</version>
<configuration>
<patches>
<patch>solrj.patch</patch>
</patches>
</configuration>
<executions>
<execution>
<id>patch</id>
<phase>process-sources</phase>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<tasks>
<delete dir="{project.build.directory}/generated-sources/main/java"/>
<copy
todir="${project.build.directory}/generated-sources/main/java">
<fileset dir="src/main/external-java" />
</copy>
</tasks>
<sourceRoot>
${project.build.directory}/generated-sources/main/java
</sourceRoot>
<testSourceRoot>
${project.build.directory}/generated-sources/test/java
</testSourceRoot>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-patch-plugin</artifactId>
<configuration>
<patchFile>src/main/patches/solrj.patch</patchFile>
<targetDirectory>${project.build.directory}/generated-sources/main/java</targetDirectory>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>