Added incremental build tasks

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@78749 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-07-31 19:54:46 +00:00
parent 3be533889c
commit 4fb9a2ce7b
3 changed files with 128 additions and 136 deletions

View File

@@ -25,14 +25,14 @@
</target>
<target name="prepareEnv" depends="copyDBDriver, copyDevContextFile" description="" />
<target name="unitTest" depends="install">
<target name="unitTest">
<exec executable="${mvn.exec}" failonerror="true">
<arg value="test" />
<arg value="-Dtest=AllUnitTestSuite" />
</exec>
</target>
<target name="fetchSOLR">
<xmlproperty file="../pom.xml" keepRoot="false"/>
<exec executable="${mvn.exec}" failonerror="true">
@@ -43,62 +43,62 @@
<arg value="-Dpackaging=${solr.packaging}" />
<arg value="-Ddest=${solr.directory}/${solr.package}" />
</exec>
<unzip src="${solr.directory}/${solr.package}" dest="${solr.directory}"/>
<unzip src="${solr.directory}/${solr.package}" dest="${solr.directory}"/>
</target>
<target name="configure-solr" depends="fetchSOLR"
description="Configures Tomcat and the Alfresco repository to use SOLR">
<dirname property="temp.dir" file="${ant.file}"/>
<pathconvert property="base.dir" targetos="unix">
<path location="${temp.dir}"/>
</pathconvert>
<property name="data.root" value="${base.dir}/../../data" />
<property name="solr.root" value="${base.dir}/${solr.directory}" />
<mkdir dir="${data.root}/solr-index"/>
<!-- copy SOLR config files -->
<copy file="${solr.directory}/context.xml"
tofile="${app.tomcat.folder}/conf/Catalina/localhost/solr.xml" />
<replace file="${app.tomcat.folder}/conf/Catalina/localhost/solr.xml" summary="yes">
<replacefilter token="@@ALFRESCO_SOLR_DIR@@" value="${solr.root}" />
</replace>
<replace file="${solr.directory}/archive-SpacesStore/conf/solrcore.properties" summary="yes">
<replacefilter token="@@ALFRESCO_SOLR_DIR@@" value="${data.root}/solr-index" />
</replace>
<replace file="${solr.directory}/workspace-SpacesStore/conf/solrcore.properties" summary="yes">
<replacefilter token="@@ALFRESCO_SOLR_DIR@@" value="${data.root}/solr-index" />
</replace>
<!-- copy keystore files -->
<copy todir="${data.root}/keystore">
<fileset dir="${solr.directory}/alf_data/keystore" />
description="Configures Tomcat and the Alfresco repository to use SOLR">
<dirname property="temp.dir" file="${ant.file}"/>
<pathconvert property="base.dir" targetos="unix">
<path location="${temp.dir}"/>
</pathconvert>
<property name="data.root" value="${base.dir}/../../data" />
<property name="solr.root" value="${base.dir}/${solr.directory}" />
<mkdir dir="${data.root}/solr-index"/>
<!-- copy SOLR config files -->
<copy file="${solr.directory}/context.xml"
tofile="${app.tomcat.folder}/conf/Catalina/localhost/solr.xml" />
<replace file="${app.tomcat.folder}/conf/Catalina/localhost/solr.xml" summary="yes">
<replacefilter token="@@ALFRESCO_SOLR_DIR@@" value="${solr.root}" />
</replace>
<replace file="${solr.directory}/archive-SpacesStore/conf/solrcore.properties" summary="yes">
<replacefilter token="@@ALFRESCO_SOLR_DIR@@" value="${data.root}/solr-index" />
</replace>
<replace file="${solr.directory}/workspace-SpacesStore/conf/solrcore.properties" summary="yes">
<replacefilter token="@@ALFRESCO_SOLR_DIR@@" value="${data.root}/solr-index" />
</replace>
<!-- copy keystore files -->
<copy todir="${data.root}/keystore">
<fileset dir="${solr.directory}/alf_data/keystore" />
</copy>
<!-- setup Tomcat SSL connector -->
<!-- NOTE: indentation of the replacevalue below is intentional, it matches formatting in destination file -->
<replace file="${app.tomcat.folder}/conf/server.xml" summary="yes">
<replacetoken><![CDATA[<!-- Alfresco SSL Connector placeholder -->]]></replacetoken>
<replacevalue><![CDATA[
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"
maxThreads="150" scheme="https" keystoreFile="../../data/keystore/ssl.keystore"
keystorePass="kT9X6oe68t" keystoreType="JCEKS"
secure="true" connectionTimeout="240000"
truststoreFile="../../data/keystore/ssl.truststore"
truststorePass="kT9X6oe68t" truststoreType="JCEKS"
clientAuth="want" sslProtocol="TLS" allowUnsafeLegacyRenegotiation="true" maxHttpHeaderSize="32768" />]]></replacevalue>
<!-- setup Tomcat SSL connector -->
<!-- NOTE: indentation of the replacevalue below is intentional, it matches formatting in destination file -->
<replace file="${app.tomcat.folder}/conf/server.xml" summary="yes">
<replacetoken><![CDATA[<!-- Alfresco SSL Connector placeholder -->]]></replacetoken>
<replacevalue><![CDATA[
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"
maxThreads="150" scheme="https" keystoreFile="../../data/keystore/ssl.keystore"
keystorePass="kT9X6oe68t" keystoreType="JCEKS"
secure="true" connectionTimeout="240000"
truststoreFile="../../data/keystore/ssl.truststore"
truststorePass="kT9X6oe68t" truststoreType="JCEKS"
clientAuth="want" sslProtocol="TLS" allowUnsafeLegacyRenegotiation="true" maxHttpHeaderSize="32768" />]]></replacevalue>
</replace>
<!-- update project repository.properties file with SOLR properties -->
<propertyfile file="${data.root}/repository.properties">
<entry key="dir.keystore" value="${data.root}/keystore" />
<entry key="index.subsystem.name" value="solr" />
</propertyfile>
<!-- update project repository.properties file with SOLR properties -->
<propertyfile file="${data.root}/repository.properties">
<entry key="dir.keystore" value="${data.root}/keystore" />
<entry key="index.subsystem.name" value="solr" />
</propertyfile>
</target>
</project>

View File

@@ -27,63 +27,31 @@
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>amp</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Additional source folder to be added: source/compatibility -->
<!-- Additional source folder to be added: source/compatibility -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>source/compatibility</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>unit-test/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<id>add-source</id>
<goals>
<goal>run</goal>
<goal>add-source</goal>
</goals>
<configuration>
<tasks>
<delete file="${project.build.outputDirectory}/alfresco/extension/dev-context.xml"/>
<move todir="${project.build.directory}/${project.build.finalName}/config/alfresco">
<fileset dir="${project.build.outputDirectory}/alfresco"/>
</move>
<move file="${project.build.directory}/${project.build.finalName}/config/alfresco/module/org_alfresco_module_rm/module.properties"
todir="${project.build.directory}/${project.build.finalName}"/>
</tasks>
<sources>
<source>source/compatibility</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>unit-test/java</source>
</sources>
</configuration>
</execution>
</executions>
@@ -186,6 +154,45 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>fullBuild</id>
<build>
<plugins>
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>amp</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete file="${project.build.outputDirectory}/alfresco/extension/dev-context.xml"/>
<move todir="${project.build.directory}/${project.build.finalName}/config/alfresco">
<fileset dir="${project.build.outputDirectory}/alfresco"/>
</move>
<move file="${project.build.directory}/${project.build.finalName}/config/alfresco/module/org_alfresco_module_rm/module.properties"
todir="${project.build.directory}/${project.build.finalName}"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>