mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-05-19 17:15:24 +00:00
#55 add h2 support (plus some cleanup)
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@326 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
parent
8dfffcd21a
commit
dd61aa7921
@ -23,10 +23,7 @@
|
|||||||
<name>Maven Alfresco Amp Archetype</name>
|
<name>Maven Alfresco Amp Archetype</name>
|
||||||
<description>
|
<description>
|
||||||
This archetype aims to provide a standardized approach to development, release and deployment of Alfresco AMPs (as opposed to Alfresco
|
This archetype aims to provide a standardized approach to development, release and deployment of Alfresco AMPs (as opposed to Alfresco
|
||||||
extensions, released as a different artifact ). Using standard m2 lifecycle commands (mvn compile package deploy) and generally available
|
extensions, released as a different artifact )
|
||||||
plugins (cargo, release, assembly) we are able to cover a very high percentage of Alfresco lifecycle common use cases. You are able within
|
|
||||||
minutes to have a compatible AMP module built and its lifecycle supported by Maven, in a fully transparent way also with open source available
|
|
||||||
AMPs.
|
|
||||||
</description>
|
</description>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.sourcesense.alfresco</groupId>
|
<groupId>com.sourcesense.alfresco</groupId>
|
||||||
@ -39,7 +36,7 @@
|
|||||||
<extension>
|
<extension>
|
||||||
<groupId>org.apache.maven.archetype</groupId>
|
<groupId>org.apache.maven.archetype</groupId>
|
||||||
<artifactId>archetype-packaging</artifactId>
|
<artifactId>archetype-packaging</artifactId>
|
||||||
<version>2.0-alpha-3</version>
|
<version>2.0</version>
|
||||||
</extension>
|
</extension>
|
||||||
</extensions>
|
</extensions>
|
||||||
</build>
|
</build>
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
class="org.mortbay.jetty.plus.naming.Resource">
|
class="org.mortbay.jetty.plus.naming.Resource">
|
||||||
<Arg>jdbc/dataSource</Arg>
|
<Arg>jdbc/dataSource</Arg>
|
||||||
<Arg>
|
<Arg>
|
||||||
<New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
|
<New class="org.h2.jdbcx.JdbcDataSource">
|
||||||
<Set name="Url">jdbc:mysql://${alfresco.db.url}/${alfresco.db.name}</Set>
|
<Set name="URL">jdbc:h2:${alfresco.data.location}/h2_data/${alfresco.db.name}</Set>
|
||||||
<Set name="User">${alfresco.db.username}</Set>
|
<Set name="User">${alfresco.db.username}</Set>
|
||||||
<Set name="Password">${alfresco.db.password}</Set>
|
<Set name="Password">${alfresco.db.password}</Set>
|
||||||
</New>
|
</New>
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
</pluginRepositories>
|
</pluginRepositories>
|
||||||
<properties>
|
<properties>
|
||||||
<!--
|
<!--
|
||||||
Default for which src/main/properties/<env>/application.properties is
|
Default for which src/main/properties/<env>/alfresco-global.properties is
|
||||||
loaded. NB: used only for the 'test' profile (e.g. '-P test' on the
|
loaded. NB: used only for the 'test' profile (e.g. '-P test' on the
|
||||||
mvn commandline) jetty run deployment, does not impact AMP behavior
|
mvn commandline) jetty run deployment, does not impact AMP behavior
|
||||||
which is typically environment independent
|
which is typically environment independent
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<!-- Webapp used to test/develop locally the AMP -->
|
<!-- Webapp used to test/develop locally the AMP -->
|
||||||
<webapp.name>${artifactId}-webapp</webapp.name>
|
<webapp.name>${artifactId}-webapp</webapp.name>
|
||||||
<!--
|
<!--
|
||||||
| | By default the src/test/properties/local/application.properties
|
| | By default the src/test/properties/local/alfresco-global.properties
|
||||||
uses the property "alfresco.data.location" to specify where |
|
uses the property "alfresco.data.location" to specify where |
|
||||||
alf_data gets created. | For local jetty:run deployment default
|
alf_data gets created. | For local jetty:run deployment default
|
||||||
creation dir is under project root folder (as location is specified
|
creation dir is under project root folder (as location is specified
|
||||||
@ -86,6 +86,7 @@
|
|||||||
slash, e.g. '/var/log/alfresco/' ) | | Jetty embedded run logs by
|
slash, e.g. '/var/log/alfresco/' ) | | Jetty embedded run logs by
|
||||||
default in target/alfresco.log
|
default in target/alfresco.log
|
||||||
-->
|
-->
|
||||||
|
<alfresco.version>3.4.a</alfresco.version>
|
||||||
<alfresco.data.location>./alf_data_jetty</alfresco.data.location>
|
<alfresco.data.location>./alf_data_jetty</alfresco.data.location>
|
||||||
<alfresco.db.name>alf_jetty</alfresco.db.name>
|
<alfresco.db.name>alf_jetty</alfresco.db.name>
|
||||||
<alfresco.db.username>alfresco</alfresco.db.username>
|
<alfresco.db.username>alfresco</alfresco.db.username>
|
||||||
@ -95,6 +96,7 @@
|
|||||||
<!-- End of testing webapp specific properties -->
|
<!-- End of testing webapp specific properties -->
|
||||||
<!-- Module specific build time properties -->
|
<!-- Module specific build time properties -->
|
||||||
<module.log.level>debug</module.log.level>
|
<module.log.level>debug</module.log.level>
|
||||||
|
<spring.version>3.0.0.RELEASE</spring.version>
|
||||||
</properties>
|
</properties>
|
||||||
<!--
|
<!--
|
||||||
need to list these as a provided so that Maven doesn't download them
|
need to list these as a provided so that Maven doesn't download them
|
||||||
@ -104,16 +106,22 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-repository</artifactId>
|
<artifactId>alfresco-repository</artifactId>
|
||||||
<version>3.2r</version>
|
<version>${alfresco.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<classifier>community</classifier>
|
<classifier>community</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring</artifactId>
|
<artifactId>spring-core</artifactId>
|
||||||
<version>2.0</version>
|
<version>${spring.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-beans</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<!--
|
<!--
|
||||||
Example Jar dependency: will be properly packed into the AMP /lib
|
Example Jar dependency: will be properly packed into the AMP /lib
|
||||||
directory <dependency> <groupId>rome</groupId>
|
directory <dependency> <groupId>rome</groupId>
|
||||||
@ -127,16 +135,6 @@
|
|||||||
<artifactId>recordsmanagement</artifactId> <version>2.1.0</version>
|
<artifactId>recordsmanagement</artifactId> <version>2.1.0</version>
|
||||||
<type>amp</type> </dependency>
|
<type>amp</type> </dependency>
|
||||||
-->
|
-->
|
||||||
<!--
|
|
||||||
By default archetype assumes mysql for test webapp. Change
|
|
||||||
src/test/properties/<env>/application.properties FIXME: support in
|
|
||||||
memory db for cleaner and safer test runs
|
|
||||||
-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
<version>5.0.3</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- Don't add here amp dependencies as it will break amp packaging -->
|
<!-- Don't add here amp dependencies as it will break amp packaging -->
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<!--
|
<!--
|
||||||
@ -145,7 +143,7 @@
|
|||||||
-->
|
-->
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:svn:http://domain.com/svn/trunk/</connection>
|
<connection>scm:svn:http://domain.com/svn/trunk/</connection>
|
||||||
<developerConnection>scm:svn:https://${maven.username}@domain.com/svn/trunk/</developerConnection>
|
<developerConnection>scm:svn:https://${user.name}@domain.com/svn/trunk/</developerConnection>
|
||||||
<url>http://domain.com/svn/trunk/</url>
|
<url>http://domain.com/svn/trunk/</url>
|
||||||
</scm>
|
</scm>
|
||||||
<build>
|
<build>
|
||||||
@ -185,8 +183,8 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.5</source>
|
<source>1.6</source>
|
||||||
<target>1.5</target>
|
<target>1.6</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -249,7 +247,7 @@
|
|||||||
<id>webapp</id>
|
<id>webapp</id>
|
||||||
<build>
|
<build>
|
||||||
<filters>
|
<filters>
|
||||||
<filter>src/test/properties/${env}/application.properties</filter>
|
<filter>src/test/properties/${env}/alfresco-global.properties</filter>
|
||||||
</filters>
|
</filters>
|
||||||
<defaultGoal>jetty:run-exploded</defaultGoal>
|
<defaultGoal>jetty:run-exploded</defaultGoal>
|
||||||
<plugins>
|
<plugins>
|
||||||
@ -265,7 +263,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<includeTypes>amp</includeTypes>
|
<includeTypes>amp</includeTypes>
|
||||||
<outputDirectory>${build.directory}/${webapp.name}</outputDirectory>
|
<outputDirectory>${project.build.directory}/${webapp.name}</outputDirectory>
|
||||||
<excludes>META*</excludes>
|
<excludes>META*</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -305,14 +303,14 @@
|
|||||||
Don't remove the following line otherwise WAR and AMP builds
|
Don't remove the following line otherwise WAR and AMP builds
|
||||||
will be done in the same folder, with unexpected results
|
will be done in the same folder, with unexpected results
|
||||||
-->
|
-->
|
||||||
<webappDirectory>${build.directory}/${webapp.name}</webappDirectory>
|
<webappDirectory>${project.build.directory}/${webapp.name}</webappDirectory>
|
||||||
<archive>
|
<archive>
|
||||||
<addMavenDescriptor>false</addMavenDescriptor>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
||||||
</archive>
|
</archive>
|
||||||
<warSourceExcludes>licenses/**</warSourceExcludes>
|
<warSourceExcludes>licenses/**</warSourceExcludes>
|
||||||
<webResources>
|
<webResources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>${build.testOutputDirectory}</directory>
|
<directory>${project.build.testOutputDirectory}</directory>
|
||||||
<targetPath>WEB-INF/classes</targetPath>
|
<targetPath>WEB-INF/classes</targetPath>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
<includes>
|
<includes>
|
||||||
@ -328,7 +326,7 @@
|
|||||||
</includes>
|
</includes>
|
||||||
<filtering>false</filtering>
|
<filtering>false</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>jetty</directory>
|
<directory>jetty</directory>
|
||||||
<targetPath>WEB-INF</targetPath>
|
<targetPath>WEB-INF</targetPath>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
@ -351,6 +349,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
<artifactId>maven-jetty-plugin</artifactId>
|
<artifactId>maven-jetty-plugin</artifactId>
|
||||||
|
<version>6.1.26</version>
|
||||||
<executions>
|
<executions>
|
||||||
<!-- Runs jetty when 'integration-test' phase is called -->
|
<!-- Runs jetty when 'integration-test' phase is called -->
|
||||||
<execution>
|
<execution>
|
||||||
@ -361,7 +360,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<contextPath>/${webapp.name}</contextPath>
|
<contextPath>/${webapp.name}</contextPath>
|
||||||
<webApp>${pom.build.directory}/${webapp.name}</webApp>
|
<webApp>${project.build.directory}/${webapp.name}</webApp>
|
||||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||||
@ -372,12 +371,19 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-dbcp</groupId>
|
||||||
|
<artifactId>commons-dbcp</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<!--
|
<!--
|
||||||
When invoking 'mvn integration-test', the following alf configs are
|
When invoking 'mvn integration-test', the following alf configs are
|
||||||
added to the test war in order to be able to run it seamlessly. NB:
|
added to the test war in order to be able to run it seamlessly. NB:
|
||||||
the application.properties file is filtered with alfresco.db.name
|
the alfresco-global.properties file is filtered with alfresco.db.name
|
||||||
and alf.data.location POM properties as default configuration
|
and alf.data.location POM properties as default configuration
|
||||||
-->
|
-->
|
||||||
<testResources>
|
<testResources>
|
||||||
@ -389,7 +395,6 @@
|
|||||||
<testResource>
|
<testResource>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
<directory>src/test/properties/${env}</directory>
|
<directory>src/test/properties/${env}</directory>
|
||||||
<targetPath>alfresco/extension</targetPath>
|
|
||||||
</testResource>
|
</testResource>
|
||||||
<!--
|
<!--
|
||||||
src/main/config/ is copied into ==>
|
src/main/config/ is copied into ==>
|
||||||
@ -422,10 +427,31 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco</artifactId>
|
<artifactId>alfresco</artifactId>
|
||||||
<version>3.2r</version>
|
<version>${alfresco.version}</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
<classifier>community</classifier>
|
<classifier>community</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<version>1.3.158</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate</artifactId>
|
||||||
|
<version>3.2.7.ga</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>net.sf.ehcache</groupId>
|
||||||
|
<artifactId>ehcache</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>it.sk.alfresco</groupId>
|
||||||
|
<artifactId>h2-support</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user