Skip to content

Commit

Permalink
Merged HEAD-BUG-FIX (5.1/Cloud) to trunk (5.1/Cloud)
Browse files Browse the repository at this point in the history
   104612: Merge RA-SPRINT4 to HEAD-BUG-FIX (5.1)
      103843: RA-213: fix run profile for web-apps/Share alfresco project.


git-svn-id: https://svn.alfresco.com/repos/alfresco-open-mirror/web-apps/Share/trunk@104676 7033f55c-6c29-4ad8-afba-765cb616e738
  • Loading branch information
adavis committed May 20, 2015
1 parent 6b5186b commit dd4f0c4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 230 deletions.
191 changes: 8 additions & 183 deletions alfresco/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
</parent>

<properties>
<runtime.data.folder>${basedir}/runtime</runtime.data.folder>
<solr.config.folder>${runtime.data.folder}/solr4-instance</solr.config.folder>
<!-- Filter solrcore.properties -->
<ALFRESCO_SOLR4_DATA_DIR>${solr.config.folder}/data</ALFRESCO_SOLR4_DATA_DIR>
<!-- Developer's runtime environment configuration -->
<runtime.parent.folder>${basedir}/..</runtime.parent.folder>
</properties>

<dependencies>
Expand Down Expand Up @@ -182,14 +180,14 @@
<solr.port.ssl></solr.port.ssl>
<solr.backup.alfresco.numberToKeep>0</solr.backup.alfresco.numberToKeep>
<solr.backup.archive.numberToKeep>0</solr.backup.archive.numberToKeep>
<solr.solr.home>${solr.config.folder}</solr.solr.home>
<solr.solr.model.dir>${solr.config.folder}/alfrescoModels</solr.solr.model.dir>
<solr.solr.content.dir>${solr.config.folder}/content</solr.solr.content.dir>
<solr.solr.home>${runtime.solr.folder}</solr.solr.home>
<solr.solr.model.dir>${runtime.solr.folder}/alfrescoModels</solr.solr.model.dir>
<solr.solr.content.dir>${runtime.solr.folder}/content</solr.solr.content.dir>
</systemProperties>
<delegate>false</delegate>
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
<contextFile>${basedir}/tomcat/alfresco-context.xml</contextFile>
<tomcatUsers>${basedir}/tomcat/tomcat-users.xml</tomcatUsers>
<contextFile>${runtime.tomcat.conf.folder}/alfresco-context.xml</contextFile>
<tomcatUsers>${runtime.tomcat.conf.folder}/tomcat-users.xml</tomcatUsers>
<webapps>
<!-- Run solr4 alongside the repo -->
<webapp>
Expand All @@ -199,7 +197,7 @@
<contextPath>/solr4</contextPath>
<type>war</type>
<asWebapp>true</asWebapp>
<contextFile>${basedir}/tomcat/solr-context.xml</contextFile>
<contextFile>${runtime.tomcat.conf.folder}/solr-context.xml</contextFile>
</webapp>
</webapps>
</configuration>
Expand Down Expand Up @@ -245,179 +243,6 @@
</plugins>
</build>
</profile>

<profile>
<id>run</id>
<build>
<plugins>
<!-- Create tomcat/shared/classes/alfresco-global.properties -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>create-alfresco-global-properties</id>
<goals>
<goal>run</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<target>
<mkdir dir="${basedir}/tomcat/shared/classes"/>
<copy file="${basedir}/tomcat/alfresco-global.properties.template"
tofile="${basedir}/tomcat/shared/classes/alfresco-global.properties" />
</target>
</configuration>
</execution>
</executions>
</plugin>

<!-- Download and unpack the solr4 config zip file -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-solr4-config</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/solr4</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-solr4</artifactId>
<version>${project.version}</version>
<classifier>config</classifier>
<overWrite>true</overWrite>
<type>zip</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>filter-copy-solr4-config</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${solr.config.folder}</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/solr4</directory>
<excludes>
<exclude>workspace-SpacesStore/conf/solrcore.properties</exclude>
<exclude>archive-SpacesStore/conf/solrcore.properties</exclude>
</excludes>
<filtering>false</filtering>
</resource>
<resource>
<directory>${project.build.directory}/solr4</directory>
<includes>
<include>workspace-SpacesStore/conf/solrcore.properties</include>
<include>archive-SpacesStore/conf/solrcore.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>@@</delimiter>
</delimiters>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<executions>
<execution>
<id>run-exploded-webapp</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!--
Use "mvn initialize -Ppurge" to drop repo, solr and DB data, then re-create an empty DB.
Or use with a later phase to build and start a fresh repo all in one go, e.g.
"mvn [clean] install -Ppurge,run"
-->
<profile>
<id>purge</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>delete-runtime-folders</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${runtime.data.folder}</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<executions>
<execution>
<id>drop-db</id>
<phase>initialize</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<skip>false</skip><!-- always run -->
<sqlCommand>${db.drop.command}</sqlCommand>
</configuration>
</execution>
<execution>
<id>create-db</id>
<phase>initialize</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<skip>false</skip><!-- always run -->
<sqlCommand>${db.create.command}</sqlCommand>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

</profiles>

</project>
5 changes: 0 additions & 5 deletions alfresco/tomcat/alfresco-context.xml

This file was deleted.

11 changes: 0 additions & 11 deletions alfresco/tomcat/alfresco-global.properties.template

This file was deleted.

10 changes: 0 additions & 10 deletions alfresco/tomcat/solr-context.xml

This file was deleted.

21 changes: 0 additions & 21 deletions alfresco/tomcat/tomcat-users.xml

This file was deleted.

0 comments on commit dd4f0c4

Please sign in to comment.