mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2026-09-16 18:13:23 +00:00
fixed issue 129, fixed issue 148, fixed issue 149: - replaced Jetty with Tomcat7 in both AMP and all-in-one; -removed WQS references in AMP and all-in-one project; -removed version specific web.xml overlays (used for alfresco <-> solr https comms) and added use of maven-replacer-plugin to patch distro OOTB files; -updated docs; -tested tomcat running successfully both in amp and all-in-one archetypes; -small non blocker glitch on class loading in maven tracked in issue 150
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@707 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<artifactId>alfresco-allinone-archetype</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>All-in-One Archetype from Maven Alfresco SDK</name>
|
||||
<description>Sample multi-module project for All-in-One development on the Alfresco plaftorm. Includes modules for: Repository, AMP, Share, Solr, Web Quick Start and embedded Jetty run</description>
|
||||
<description>Sample multi-module project for All-in-One development on the Alfresco plaftorm. Includes modules for: Repository WAR overlay, Repository AMP, Share WAR overlay, Solr configuration, and embedded Tomcat runner</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.alfresco.maven</groupId>
|
||||
|
||||
+1
-9
@@ -44,7 +44,7 @@
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>jetty</directory>
|
||||
<directory>tomcat</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
@@ -119,14 +119,6 @@
|
||||
</fileSets>
|
||||
</module>
|
||||
<module id="runner" dir="runner" name="runner" filtered="false">
|
||||
<fileSets>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>jetty</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</module>
|
||||
</modules>
|
||||
</archetype-descriptor>
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
|
||||
<Configure id="Server" class="org.mortbay.jetty.Server">
|
||||
<New id="myDataSource"
|
||||
class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>jdbc/dataSource</Arg>
|
||||
<Arg>
|
||||
<New class="${alfresco.db.datasource.class}">
|
||||
<Set name="URL">${alfresco.db.url}</Set>
|
||||
<Set name="User">${alfresco.db.username}</Set>
|
||||
<Set name="Password">${alfresco.db.password}</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
</Configure>
|
||||
+8
-4
@@ -26,10 +26,14 @@
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<!-- This property allow to switch Repo AMP vs Share AMP.
|
||||
Set alfresco.client.war=share to run this AMP against Share
|
||||
-->
|
||||
<alfresco.client.war>alfresco</alfresco.client.war>
|
||||
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
|
||||
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your custom corporate Alfresco WAR -->
|
||||
<alfresco.client.war>${alfresco_target_amp_client_war}</alfresco.client.war>
|
||||
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
|
||||
. | Could be org.alfresco | org.alfresco.enterprise or your corporate groupId -->
|
||||
<!-- <alfresco.client.war.groupId>org.alfresco</alfresco.client.war.groupId> -->
|
||||
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
|
||||
<!-- <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version> -->
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context docBase="${alfresco.client.war.folder}" path="${alfresco.client.contextPath}">
|
||||
<!--
|
||||
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/dir.root" description="The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation."/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.dialect" description="The fully qualified name of a org.hibernate.dialect.Dialect subclass that allows Hibernate to generate SQL optimized for a particular relational database. Choose from org.hibernate.dialect.DerbyDialect, org.hibernate.dialect.MySQLInnoDBDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect, org.hibernate.dialect.PostgreSQLDialect"/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.query.substitutions" description="Mapping from tokens in Hibernate queries to SQL tokens. For PostgreSQL, set this to "true TRUE, false FALSE"."/>
|
||||
<Environment override="false" type="java.lang.Boolean" name="properties/hibernate.jdbc.use_get_generated_keys" description="Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.default_schema" description="Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema."/>
|
||||
-->
|
||||
</Context>
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
|
||||
<Configure id="Server" class="org.mortbay.jetty.Server">
|
||||
<New id="myDataSource" class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>jdbc/dataSource</Arg>
|
||||
<Arg>
|
||||
<New class="${alfresco.db.datasource.class}">
|
||||
<Set name="URL">${alfresco.db.url}</Set>
|
||||
<Set name="User">${alfresco.db.username}</Set>
|
||||
<Set name="Password">${alfresco.db.password}</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
<Call name="addConnector">
|
||||
<Arg>
|
||||
<New class="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||
<Set name="host">
|
||||
<Property name="jetty.host" default="${runner.host}" />
|
||||
</Set>
|
||||
<Set name="port">
|
||||
<Property name="jetty.port" default="${runner.port}" />
|
||||
</Set>
|
||||
<Set name="maxIdleTime">300000</Set>
|
||||
<Set name="Acceptors">2</Set>
|
||||
<Set name="statsOn">false</Set>
|
||||
<Set name="confidentialPort">8443</Set>
|
||||
<Set name="lowResourcesConnections">20000</Set>
|
||||
<Set name="lowResourcesMaxIdleTime">5000</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
</Configure>
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<!DOCTYPE web-app PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<web-app>
|
||||
<display-name>Alfresco Runner</display-name>
|
||||
<description>Alfresco Runner</description>
|
||||
</web-app>
|
||||
+30
-44
@@ -1,68 +1,54 @@
|
||||
<?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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<artifactId>runner</artifactId>
|
||||
<name>Alfresco and Share Runner</name>
|
||||
<packaging>pom</packaging>
|
||||
<description>Alfresco and Share Runner</description>
|
||||
|
||||
<parent>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${rootArtifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
<groupId>org.alfresco.demo</groupId>
|
||||
<artifactId>summit-2013-sdk-demo</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>run</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>run</name>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<alfresco.solr.dir>${project.basedir}/../solr/solr_home</alfresco.solr.dir>
|
||||
<runner.host>127.0.0.1</runner.host>
|
||||
<runner.port>8080</runner.port>
|
||||
<solr.project.dir>../solr</solr.project.dir>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>run</id>
|
||||
<goals><goal>run</goal></goals>
|
||||
<phase>integration-test</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<groupId>org.apache.tomcat.maven</groupId>
|
||||
<artifactId>tomcat7-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- Following 3 properties set an empty ROOT context,
|
||||
which is mandatory to run jetty:run plugin -->
|
||||
<contextPath>/</contextPath>
|
||||
<webAppSourceDirectory>.</webAppSourceDirectory>
|
||||
<webXml>jetty/root-web.xml</webXml>
|
||||
<contextHandlers>
|
||||
<contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
|
||||
<war>${project.basedir}/../alfresco/target/alfresco.war</war>
|
||||
<contextPath>/alfresco</contextPath>
|
||||
</contextHandler>
|
||||
<contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
|
||||
<war>${alfresco.solr.dir}/apache-solr-1.4.1-overlay.war</war>
|
||||
<contextPath>/solr</contextPath>
|
||||
</contextHandler>
|
||||
<contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
|
||||
<war>${project.basedir}/../share/target/share.war</war>
|
||||
<contextPath>/share</contextPath>
|
||||
</contextHandler>
|
||||
</contextHandlers>
|
||||
<!-- Runs Solr as the "fake" main webapp. This is useful due to the currently poor OOTB zip packaging of Alfresco Solr -->
|
||||
<warDirectory>${solr.project.dir}/target/solr-overlay</warDirectory>
|
||||
<path>/solr</path>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>solr.solr.home</name>
|
||||
<value>${alfresco.solr.dir}</value>
|
||||
</systemProperty>
|
||||
<solr.solr.home>${solr.project.dir}/solr_home</solr.solr.home>
|
||||
</systemProperties>
|
||||
<!-- Configures the custom Alfresco and Share to run as embedded webapps -->
|
||||
<webapps>
|
||||
<webapp>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>alfresco</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
<asWebapp>true</asWebapp>
|
||||
<contextPath>alfresco</contextPath>
|
||||
</webapp>
|
||||
<webapp>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>share</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
<asWebapp>true</asWebapp>
|
||||
<contextPath>share</contextPath>
|
||||
</webapp>
|
||||
</webapps>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<project
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${rootArtifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
</parent>
|
||||
<artifactId>wcmqs</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Alfresco Web Quick Start customization</name>
|
||||
<description>This project allows you to customize and overlay Alfresco Web Quick Start</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco-wcm-quickstart</artifactId>
|
||||
<version>${alfresco.version}</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<overlays>
|
||||
<!-- The current project customizations -->
|
||||
<overlay />
|
||||
<!-- The Alfresco WCMQS War -->
|
||||
<overlay>
|
||||
<artifactId>alfresco-wcm-quickstart</artifactId>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
</overlay>
|
||||
</overlays>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE log4j:configuration PUBLIC "-//LOGGER" "../dtd/log4j.dtd">
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
|
||||
<!-- Appenders -->
|
||||
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||
<param name="Target" value="System.out" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c] %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
<appender name="file" class="org.apache.log4j.DailyRollingFileAppender">
|
||||
<param name="File" value="${app.log.dir}webquickstart.log" />
|
||||
<param name="Append" value="true" />
|
||||
<param name="Encoding" value="UTF-8" />
|
||||
<param name="DatePattern" value="'.'yyyy-MM-dd" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c] %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Application Loggers -->
|
||||
<logger name="org.alfresco.samples.quickstart">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
|
||||
<!-- 3rdparty Loggers -->
|
||||
<logger name="org.springframework.core">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.beans">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.context">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.web">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.alfresco.wcm">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
|
||||
<!-- Root Logger -->
|
||||
<root>
|
||||
<priority value="${app.log.root.level}" />
|
||||
<appender-ref ref="console" />
|
||||
<appender-ref ref="file" />
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
||||
+1
-1
@@ -67,7 +67,7 @@
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>jetty</directory>
|
||||
<directory>tomcat</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
|
||||
<Configure id="Server" class="org.mortbay.jetty.Server">
|
||||
<New id="myDataSource"
|
||||
class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>jdbc/dataSource</Arg>
|
||||
<Arg>
|
||||
<New class="${alfresco.db.datasource.class}">
|
||||
<Set name="URL">${alfresco.db.url}</Set>
|
||||
<Set name="User">${alfresco.db.username}</Set>
|
||||
<Set name="Password">${alfresco.db.password}</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
</Configure>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context docBase="${alfresco.client.war.folder}" path="${alfresco.client.contextPath}">
|
||||
<!--
|
||||
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/dir.root" description="The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation."/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.dialect" description="The fully qualified name of a org.hibernate.dialect.Dialect subclass that allows Hibernate to generate SQL optimized for a particular relational database. Choose from org.hibernate.dialect.DerbyDialect, org.hibernate.dialect.MySQLInnoDBDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect, org.hibernate.dialect.PostgreSQLDialect"/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.query.substitutions" description="Mapping from tokens in Hibernate queries to SQL tokens. For PostgreSQL, set this to "true TRUE, false FALSE"."/>
|
||||
<Environment override="false" type="java.lang.Boolean" name="properties/hibernate.jdbc.use_get_generated_keys" description="Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.default_schema" description="Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema."/>
|
||||
-->
|
||||
</Context>
|
||||
@@ -61,10 +61,13 @@ Commands
|
||||
|
||||
* <<<mvn install -Dmaven.test.skip=true>>>: Like <<<mvn install>>> but skips unit tests
|
||||
|
||||
* <<<mvn package -Pamp-to-war>>>: Like <<<mvn package>>> but also installs the AMP onto an Alfresco WAR.
|
||||
* <<<mvn install -Pamp-to-war>>>: Like <<<mvn install>>> but also installs the AMP onto an Alfresco WAR.
|
||||
|
||||
* <<<mvn install -Pamp-to-war,run>>> Like <<<mvn package -Pamp-to-war>>>
|
||||
but also runs the resulting WAR+AMP in Tomcat + H2 embedded for integration testing.
|
||||
When you run this command then you can access in your browser <<< {{{http://localhost:8080/alfresco}}} >>> or <<< {{{http://localhost:8080/share}}} >>>
|
||||
depending on the value of the property <<<alfresco.client.war>>>
|
||||
|
||||
* <<<mvn integration-test -Pamp-to-war>>> Like <<<mvn package -Pamp-to-war>>>
|
||||
but also runs the resulting WAR+AMP in Jetty + H2 embedded for integration testing
|
||||
|
||||
* <<<mvn integration-test -Pamp-to-war -Dalfresco.client.war=share>>>: Like <<<mvn integration-test -Pamp-to-war>>> but installs the AMP and runs on the Share WAR in Jetty embedded.
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<alfresco.client.war>alfresco</alfresco.client.war>
|
||||
<alfresco.client.war.groupId>${alfresco.groupId}</alfresco.client.war.groupId>
|
||||
<alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version>
|
||||
<alfresco.client.contextPath>${project.build.finalName}</alfresco.client.contextPath>
|
||||
<alfresco.client.contextPath>/${alfresco.client.war}</alfresco.client.contextPath>
|
||||
|
||||
<!-- IMPORTANT! Override this only if you know what you're doing; it could break amp-to-war overlay -->
|
||||
<alfresco.client.war.folder>${project.build.directory}/${project.build.finalName}-war</alfresco.client.war.folder>
|
||||
@@ -108,7 +108,7 @@
|
||||
<maven.war.version>2.4</maven.war.version>
|
||||
<maven.release.version>2.4.1</maven.release.version>
|
||||
<maven.buildhelper.version>1.8</maven.buildhelper.version>
|
||||
<maven.jetty.version>6.1.26</maven.jetty.version>
|
||||
<maven.tomcat.version>2.1</maven.tomcat.version>
|
||||
<!-- This is used for the site deployment procedure (override in your POM as needed) -->
|
||||
<stagingDirectory>../../target/staging/poms/alfresco-sdk-parent</stagingDirectory>
|
||||
<!-- Alfresco Maven plugin in use throughout the SDK -->
|
||||
@@ -242,10 +242,33 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven.jar.version}</version>
|
||||
</plugin>
|
||||
<!-- Configures tomcat with proper deps and performance fixes -->
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>${maven.jetty.version}</version>
|
||||
<groupId>org.apache.tomcat.maven</groupId>
|
||||
<artifactId>tomcat7-maven-plugin</artifactId>
|
||||
<version>${maven.tomcat.version}</version>
|
||||
<configuration>
|
||||
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>tk.skuro.alfresco</groupId>
|
||||
<artifactId>h2-support</artifactId>
|
||||
<version>${h2-support.version}</version>
|
||||
</dependency>
|
||||
<!-- Major performance improvement,
|
||||
see http://mindthegab.com/2013/06/20/maven-is-not-so-evil-plexus-archives-2-3-is-a-life-saver-for-the-speed-of-your-war-development-with-maven/ -->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
@@ -357,59 +380,31 @@
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<!-- Enable jetty running embedded if the jetty/jetty.xml file exists in the project -->
|
||||
|
||||
<profile>
|
||||
<id>enable-jetty</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>jetty/jetty.xml</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>filter-jetty-conf</id>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<phase>process-resources</phase>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/jetty</directory>
|
||||
<filtering>${app.filtering.enabled}</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<configuration>
|
||||
<jettyConfig>${project.build.directory}/jetty.xml</jettyConfig>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>tk.skuro.alfresco</groupId>
|
||||
<artifactId>h2-support</artifactId>
|
||||
<version>${h2-support.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<id>run</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>run</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.tomcat.maven</groupId>
|
||||
<artifactId>tomcat7-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>run-wars</id>
|
||||
<goals>
|
||||
<goal>run-war-only</goal>
|
||||
</goals>
|
||||
<phase>integration-test</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- Enable AMP lifecycle if finds a module.properties, including unit testing support -->
|
||||
@@ -554,13 +549,14 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- When the AMP runs locally, src/test/webapp and src/test/resources will contain -->
|
||||
<!-- the location of the configuration files -->
|
||||
<!-- Configure tomcat context.xml included in the webapp with proper filtering -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<!-- When the AMP runs locally, src/test/webapp and src/test/resources will contain -->
|
||||
<!-- the location of the configuration files -->
|
||||
<execution>
|
||||
<id>copy-alfresco-test-resources</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals><goal>copy-resources</goal></goals>
|
||||
@@ -578,6 +574,26 @@
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-tomcat-context</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals><goal>copy-resources</goal></goals>
|
||||
<configuration>
|
||||
<outputDirectory>${alfresco.client.war.folder}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>tomcat</directory>
|
||||
<filtering>${app.filtering.enabled}</filtering>
|
||||
<targetPath>WEB-INF</targetPath>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/test/properties/${env}</directory>
|
||||
<filtering>${app.filtering.enabled}</filtering>
|
||||
<targetPath>WEB-INF/classes</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- The current AMP artifact is installed into the Alfresco
|
||||
@@ -595,27 +611,16 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- If the integration-test phase is called, the integrated WAR + AMP is actually ran in Jetty -->
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>run-amp-to-war</id>
|
||||
<goals>
|
||||
<goal>run-exploded</goal>
|
||||
</goals>
|
||||
<phase>pre-integration-test</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<webApp>${alfresco.client.war.folder}</webApp>
|
||||
<contextPath>${alfresco.client.contextPath}</contextPath>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- Configures tomcat to run against the overlaid WAR + AMP -->
|
||||
<properties>
|
||||
<maven.tomcat.contextFile>${alfresco.client.war.folder}/WEB-INF/context.xml</maven.tomcat.contextFile>
|
||||
<!-- To run a non WAR project -->
|
||||
<tomcat.ignorePackaging>true</tomcat.ignorePackaging>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<!-- Cleans Alfresco data folder, embedded DB and logs -->
|
||||
<profile>
|
||||
<id>purge</id>
|
||||
|
||||
Reference in New Issue
Block a user