mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-07-31 17:39:14 +00:00
- closes issue #251
- refactored h2 support to play nicely with IDEs and across the aio and amp archetype use cases - now moved the h2 support for the default alfresco version in the alfresco-rad project, as part of the rapid application development features - tested all cmd line and eclipse based scenarios - consolidated alfresco.community.default version and alfresco.enterprise.default version and made them parametric in the whole project
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<defaultValue>org.alfresco</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_version">
|
||||
<defaultValue>5.0.c</defaultValue>
|
||||
<defaultValue>@@alfresco.community.default.version@@</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="package">
|
||||
<defaultValue>(not used)</defaultValue>
|
||||
|
@@ -23,6 +23,7 @@
|
||||
<includes>
|
||||
<include>archetype-resources/pom.xml</include>
|
||||
<include>archetype-resources/run.sh</include>
|
||||
<include>META-INF/maven/archetype-metadata.xml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
@@ -31,6 +32,7 @@
|
||||
<excludes>
|
||||
<exclude>archetype-resources/pom.xml</exclude>
|
||||
<exclude>archetype-resources/run.sh</exclude>
|
||||
<exclude>META-INF/maven/archetype-metadata.xml</exclude>
|
||||
</excludes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<defaultValue>org.alfresco</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_version">
|
||||
<defaultValue>5.0.c</defaultValue>
|
||||
<defaultValue>@@alfresco.community.default.version@@</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="package">
|
||||
<defaultValue>(not used)</defaultValue>
|
||||
|
@@ -23,6 +23,7 @@
|
||||
<includes>
|
||||
<include>archetype-resources/pom.xml</include>
|
||||
<include>archetype-resources/run.sh</include>
|
||||
<include>META-INF/maven/archetype-metadata.xml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
@@ -31,6 +32,7 @@
|
||||
<excludes>
|
||||
<exclude>archetype-resources/pom.xml</exclude>
|
||||
<exclude>archetype-resources/run.sh</exclude>
|
||||
<exclude>META-INF/maven/archetype-metadata.xml</exclude>
|
||||
</excludes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<defaultValue>org.alfresco</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_version">
|
||||
<defaultValue>5.0.c</defaultValue>
|
||||
<defaultValue>@@alfresco.community.default.version@@</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="package">
|
||||
<defaultValue>(not used)</defaultValue>
|
||||
|
@@ -13,6 +13,9 @@
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<pgsql.dialect.folder>${project.build.directory}/pg-dialect-tmp</pgsql.dialect.folder>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- Enables JUnit remote testing (using JRebel) -->
|
||||
<dependency>
|
||||
@@ -36,4 +39,87 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Copied PostgreSQL dialect files to generate H2 dialect files on-the-fly -->
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>extract-postgres-dialect</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-repository</artifactId>
|
||||
<version>${alfresco.community.default.version}</version>
|
||||
<includes>alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect/*,alfresco/dbscripts/upgrade/*/org.hibernate.dialect.PostgreSQLDialect/*,alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect/*</includes>
|
||||
<outputDirectory>${pgsql.dialect.folder}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-h2-dialect</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${pgsql.dialect.folder}/alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/dbscripts/create/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${pgsql.dialect.folder}/alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/ibatis/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
<!-- Upgrade scripts -->
|
||||
<resource>
|
||||
<directory>${pgsql.dialect.folder}/alfresco/dbscripts/upgrade/4.1/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/dbscripts/upgrade/4.1/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${pgsql.dialect.folder}/alfresco/dbscripts/upgrade/4.2/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/dbscripts/upgrade/4.2/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${pgsql.dialect.folder}/alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
@@ -113,7 +113,7 @@
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-mmt</artifactId>
|
||||
<version>5.0.c</version>
|
||||
<version>${alfresco.community.default.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.alfrescolabs.alfresco-technical-validation</groupId>
|
||||
|
2
pom.xml
2
pom.xml
@@ -120,6 +120,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.archetype.version>2.2</maven.archetype.version>
|
||||
<alfresco.sdk.parent.version>${project.version}</alfresco.sdk.parent.version>
|
||||
<alfresco.community.default.version>5.0.c</alfresco.community.default.version>
|
||||
<alfresco.enterprise.default.version>5.0</alfresco.enterprise.default.version>
|
||||
<springloaded.version>1.2.0.RELEASE</springloaded.version>
|
||||
<scm.url.base>https://github.com/Alfresco/alfresco-sdk</scm.url.base>
|
||||
</properties>
|
||||
|
@@ -37,7 +37,7 @@
|
||||
| For available versions please search on https://artifacts.alfresco.com/nexus/index.html
|
||||
-->
|
||||
<alfresco.groupId>org.alfresco</alfresco.groupId>
|
||||
<alfresco.version>5.0.c</alfresco.version>
|
||||
<alfresco.version>${alfresco.community.default.version}</alfresco.version>
|
||||
<!-- By default uses community artifacts (alfresco|share). Overridden in the 'enterprise' profile, with 'alfresco-enterprise' and 'share-enterprise' -->
|
||||
<alfresco.repo.artifactId>alfresco</alfresco.repo.artifactId>
|
||||
<alfresco.share.artifactId>share</alfresco.share.artifactId>
|
||||
@@ -497,6 +497,25 @@
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>add-module-config-to-test-classpath</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${app.amp.folder}/config</directory>
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
<filtering>${app.filtering.enabled}</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
@@ -520,10 +539,6 @@
|
||||
<version>${maven.surefire.version}</version>
|
||||
<configuration>
|
||||
<argLine>${app.testing.jvm.args}</argLine>
|
||||
<additionalClasspathElements>
|
||||
<!-- Adds both the module config to test classpath -->
|
||||
<additionalClasspathElement>${project.build.directory}/${project.build.finalName}/config</additionalClasspathElement>
|
||||
</additionalClasspathElements>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
@@ -792,7 +807,7 @@
|
||||
<profile>
|
||||
<id>enterprise</id>
|
||||
<properties>
|
||||
<alfresco.version>5.0</alfresco.version>
|
||||
<alfresco.version>${alfresco.enterprise.default.version}</alfresco.version>
|
||||
<alfresco.repo.artifactId>alfresco-enterprise</alfresco.repo.artifactId>
|
||||
<alfresco.share.artifactId>share-enterprise</alfresco.share.artifactId>
|
||||
<!-- Not needed in the webapp for enterprise -->
|
||||
@@ -879,7 +894,6 @@
|
||||
</build>
|
||||
</profile>
|
||||
<!-- Configures automatic embedded H2 database support for repository amps (if a test alfresco-global.properties is found) -->
|
||||
<!-- TODO: Improve this, either by producing this dialect upstream or consolidating behavior in a parent pom (current only activation clause changes) -->
|
||||
<profile>
|
||||
<id>config-h2-support</id>
|
||||
<activation>
|
||||
@@ -887,87 +901,6 @@
|
||||
<exists>src/test/properties/local/alfresco-global.properties</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Copied PostgreSQL dialect files to generate H2 dialect files on-the-fly -->
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>extract-postgres-dialect</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco-repository</artifactId>
|
||||
<version>${alfresco.version}</version>
|
||||
<includes>alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect/*,alfresco/dbscripts/upgrade/*/org.hibernate.dialect.PostgreSQLDialect/*,alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect/*</includes>
|
||||
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-h2-dialect</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.build.testOutputDirectory}/alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/dbscripts/create/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.build.testOutputDirectory}/alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/ibatis/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
<!-- Upgrade scripts -->
|
||||
<resource>
|
||||
<directory>${project.build.testOutputDirectory}/alfresco/dbscripts/upgrade/4.1/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/dbscripts/upgrade/4.1/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.build.testOutputDirectory}/alfresco/dbscripts/upgrade/4.2/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/dbscripts/upgrade/4.2/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.build.testOutputDirectory}/alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.PostgreSQLDialect</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.H2Dialect</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<!-- h2 Dependency -->
|
||||
<dependency>
|
||||
|
Reference in New Issue
Block a user