Compare commits

...

19 Commits

Author SHA1 Message Date
alfresco-build
14cd4be39c [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.2.0-beta-1 2016-02-04 10:41:50 +00:00
Ole Hejlskov
f2f5698a3b Remove double activation tag from pull request #352 2016-02-04 11:00:46 +01:00
Ole Hejlskov
5b83b99549 Merge pull request #352 from michaeljmuller/master
change activation of enforce-sdk-rules so it's *really* on by default, as intended
2016-02-04 10:54:24 +01:00
Ole Hejlskov
181951ed99 Add MAVEN_OPTS that are compatible with JDK7 but comment out by default. See DEVPLAT-456 for more info 2016-02-04 10:50:21 +01:00
Ole Hejlskov
a4711142e6 Merge pull request #354 from michaeljmuller/chmod
make run.sh executable during the "validation" phase of the build
2016-02-04 10:39:06 +01:00
Michael Muller
78d1466220 make run.sh executable during the "validation" phase of the build 2016-02-03 12:00:13 -07:00
Michael Muller
d99539c9b0 change activation of enforce-sdk-rules so it's *really* on by default, as intended 2016-02-03 11:37:34 -07:00
Ole Hejlskov
30bfc14422 Fix escaping 2016-01-29 10:57:27 +01:00
Martin Bergljung
641aa6bb8e DEVPLAT-440 2016-01-25 14:37:57 +00:00
Ole Hejlskov
f031c76a41 Add JS to the nonFilteredFileExtension list. See #254 for more info 2016-01-22 16:12:30 +01:00
Ole Hejlskov
2ad03e3f5c Bump version to 2.2.0-SNAPSHOT 2016-01-22 16:05:37 +01:00
Martin Bergljung
7275ba32e8 DEVPLAT-452 2016-01-22 08:26:23 +00:00
Samuel Langlois
9bf50267dd Housekeeping: upgrading versions of dependencies and Maven plugins 2016-01-21 12:22:51 +00:00
Martin Bergljung
bbe3de2abb DEVPLAT-444 2016-01-21 11:26:15 +00:00
Samuel Langlois
5c01e8127c Change <id> of temporary Maven Repo hosting 5.1-EA, to fix CI 2016-01-21 11:20:35 +00:00
Martin Bergljung
9a1b97e64d DEVPLAT-442 2016-01-21 10:34:36 +00:00
Martin Bergljung
b3955a1b4f DEVPLAT-443 2016-01-20 10:41:06 +00:00
Martin Bergljung
2e546a1cae DEVPLAT-445 2016-01-20 10:18:04 +00:00
Martin Bergljung
9dd9f530bb DEVPLAT-333, DEVPLAT-435, DEVPLAT-436, DEVPLAT-437, DEVPLAT-438, DEVPLAT-439, DEVPLAT-447 2016-01-12 15:14:53 +00:00
42 changed files with 456 additions and 380 deletions

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.2-SNAPSHOT</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -12,7 +12,7 @@
<!-- Registration of new models -->
<bean id="${package}.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<bean id="${artifactId}.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/content-model.xml</value>

View File

@@ -22,13 +22,13 @@
<beans>
<!-- A simple class that is initialized by Spring -->
<bean id="${package}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<bean id="${artifactId}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<!-- A simple module component that will be executed once.
Note. this module component will only be executed once, and then there will be an entry for it in the Repo.
So doing for example $ mvn clean install -Prun twice will only execute this component the first time.
You need to remove /alf_data_dev for it to be executed again. -->
<bean id="${package}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<bean id="${artifactId}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<property name="moduleId" value="${artifactId}" /> <!-- See module.properties -->
<property name="name" value="exampleComponent" />
<property name="description" value="A demonstration component" />

View File

@@ -21,8 +21,11 @@
<beans>
<!-- This is filtered by Maven at build time, so that module name is single sourced. -->
<!-- Note. The bootstrap-context.xml file has to be loaded first.
Otherwise your custom models are not yet loaded when your service beans are instantiated and you
cannot for example register policies on them. -->
<import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/service-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/webscript-context.xml" />
</beans>

View File

@@ -23,7 +23,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.

View File

@@ -46,12 +46,13 @@
</dependency>
<!--===============================================================
The following dependencies are needed to be able to compile the
custom functional tests that are based on Page Objects (PO)
===============================================================-->
The following dependencies are needed to be able to compile the
custom functional tests that are based on Page Objects (PO)
===============================================================-->
<!-- Bring in the Share Page Objects (PO) used in our functional tests.
It contains page objects such as LoginPage -->
It contains page objects such as LoginPage and it also brings
in selenium-grid and selenium. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
@@ -67,8 +68,7 @@
<classifier>tests</classifier>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here -->
<!-- Exclude selenium as it is already brought in by share-po dependency above -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
@@ -80,13 +80,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- Bring in newer selenium version -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0-alfresco</version>
<scope>test</scope>
</dependency>
<!-- Test NG is defined with test scope in share-po, so need it here too -->
<!-- Alfresco code creates a wrapper around Test NG -->
<dependency>
@@ -101,7 +94,6 @@
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

View File

@@ -17,7 +17,7 @@
-->
<!-- Add module specific messages and labels -->
<bean id="${package}.${artifactId}.resources"
<bean id="${artifactId}.resources"
class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>

View File

@@ -24,7 +24,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.

View File

@@ -2,7 +2,7 @@
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/*
* Copyright (C) 2005-2015 Alfresco Software Limited.
* Copyright (C) 2005-2016 Alfresco Software Limited.
* This file is part of Alfresco
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,8 +18,8 @@
package ${package}.demoamp;
import ${package}.demoamp.po.DemoPage;
import org.alfresco.po.share.AbstractTest;
import org.alfresco.po.share.LoginPage;
import org.alfresco.po.AbstractTest;
import org.alfresco.po.share.PeopleFinderPage;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
@@ -41,18 +41,22 @@ public class DemoPageTestIT extends AbstractTest {
@BeforeClass(groups = {"alfresco-one"})
public void prepare() throws Exception {
// Navigate to share
drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page");
// Reuse Alfresco Share login page object from share-po lib.
LoginPage loginPage = new LoginPage(drone);
// Navigate to share, which will redirect to Login page
driver.navigate().to(shareUrl + "/page");
// Resolve/Bind current page to LoginPage object
LoginPage loginPage = resolvePage(driver).render();
loginPage.loginAs(username, password);
}
@BeforeMethod
public void loadPage() {
// Goto demo page
drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page");
page = new DemoPage(drone);
driver.navigate().to(shareUrl + "/page/hdp/ws/simple-page");
// We need to instantiate the page like this as it is not yet in
// the factory known list of pages
page = factoryPage.instantiatePage(driver, DemoPage.class);
}
@Test
@@ -86,7 +90,7 @@ public class DemoPageTestIT extends AbstractTest {
@Test
public void navigate() {
Assert.assertNotNull(page.getNav());
PeopleFinderPage peoppleFinderPage = page.getNav().selectPeople().render();
Assert.assertNotNull(peoppleFinderPage);
PeopleFinderPage peopleFinderPage = page.getNav().selectPeople().render();
Assert.assertNotNull(peopleFinderPage);
}
}

View File

@@ -2,7 +2,7 @@
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/*
* Copyright (C) 2005-2015 Alfresco Software Limited.
* Copyright (C) 2005-2016 Alfresco Software Limited.
* This file is part of Alfresco
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,10 +18,10 @@
package ${package}.demoamp.po;
import org.alfresco.po.share.SharePage;
import org.alfresco.webdrone.RenderTime;
import org.alfresco.webdrone.WebDrone;
import org.openqa.selenium.By;
import org.alfresco.po.RenderTime;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
/**
* Demo of simple share page object that encapsulates the demo of simple page.
@@ -30,22 +30,17 @@ import org.openqa.selenium.NoSuchElementException;
* @since 2.0.1
*/
public class DemoPage extends SharePage {
private By SIMPLE_DEMO_LOGO = By.id("DEMO_SIMPLE_LOGO");
private By SIMPLE_DEMO_MESSAGE = By.id("DEMO_SIMPLE_MSG");
@FindBy(id="DEMO_SIMPLE_LOGO")
WebElement logo;
public DemoPage(WebDrone drone) {
super(drone);
}
@SuppressWarnings("unchecked")
@Override
public DemoPage render() {
return render(new RenderTime(maxPageLoadingTime));
}
@FindBy(id="DEMO_SIMPLE_MSG")
WebElement msg;
@SuppressWarnings("unchecked")
@Override
public DemoPage render(RenderTime timer) {
// Wait for logo and message to display, then consider page rendered
while (true) {
timer.start();
try {
@@ -57,32 +52,19 @@ public class DemoPage extends SharePage {
timer.end();
}
}
return this;
}
@SuppressWarnings("unchecked")
@Override
public DemoPage render(long time) {
return render(new RenderTime(time));
}
public boolean isSimpleLogoDisplayed() {
try {
return drone.find(SIMPLE_DEMO_LOGO).isDisplayed();
} catch (NoSuchElementException se) {
}
return false;
return isDisplayed(logo);
}
public boolean isMessageDisplayed() {
try {
return drone.find(SIMPLE_DEMO_MESSAGE).isDisplayed();
} catch (NoSuchElementException se) {
}
return false;
return isDisplayed(msg);
}
public String getMessage() {
return drone.find(SIMPLE_DEMO_MESSAGE).getText();
return msg.getText();
}
}

View File

@@ -41,6 +41,24 @@
<share.client.url>http://localhost:8080/share</share.client.url>
</properties>
<dependencies>
<!-- If we are running tests then make the H2 Scripts available.
Note. tests are skipped when you are running -Prun -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<classifier>h2scripts</classifier>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<!-- Here we realize the connection with the Alfresco selected platform (e.g.version and edition) -->
<dependencyManagement>
<dependencies>
@@ -86,5 +104,35 @@
<maven.alfresco.includeWebResources>false</maven.alfresco.includeWebResources>
</properties>
</profile>
<!-- if we're on a unix machine, chmod run.sh to be executable -->
<profile>
<id>chmod</id>
<activation><os><family>unix</family></os></activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<inherited>false</inherited>
<executions>
<execution>
<id>chmod</id>
<phase>validate</phase>
<goals><goal>exec</goal></goals>
</execution>
</executions>
<configuration>
<executable>chmod</executable>
<arguments>
<argument>+x</argument>
<argument>${basedir}/run.sh</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -56,7 +56,7 @@
</dependency>
-->
<!-- Uncomment if you are using the RM (Records Management) module. -->
<!--
<!-- Set alfresco.rm.version in parent pom to appropriate version for 5.1
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm</artifactId>
@@ -173,6 +173,7 @@
</plugins>
</build>
<dependencies>
<!-- Include remote JUnit test lib to allow remote unit testing and start remote JUnit runner. -->
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>

View File

@@ -9,7 +9,11 @@ if not exist %springloadedfile% (
mvn validate -Psetup
)
set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
:: Use these settings if you're using JDK7
:: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G -XX:PermSize=300m
:: Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
:: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
set MAVEN_OPTS=-noverify -Xms256m -Xmx2G
mvn clean install -Prun -nsu
:: mvn install -Prun

View File

@@ -6,4 +6,10 @@ springloadedfile=~/.m2/repository/org/springframework/springloaded/@@springloade
if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn clean install -Prun
# Use these settings if you're using JDK7
# MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:PermSize=300m" mvn install -Prun
# Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
#MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn clean install -Prun
MAVEN_OPTS="-noverify -Xms256m -Xmx2G" mvn clean install -Prun

View File

@@ -12,6 +12,11 @@
<version>${version}</version>
</parent>
<properties>
<!-- Bring in newer Spring with support for annotations, used for Page Object tests -->
<spring.version>4.1.6.RELEASE</spring.version>
</properties>
<profiles>
<profile>
<id>run</id>
@@ -57,6 +62,29 @@
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<dependencies>
<!-- Bring in the H2 Database scripts needed when running embedded, they are now
available from the standard generated artifacts, no longer needed to be picked
up from the alfresco-rad project -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<classifier>h2scripts</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Explicitly bring in the Plexus Archiver so assembly goes quicker -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-wars</id>
@@ -206,28 +234,17 @@
</build>
<dependencies>
<!-- Bring in the Share Page Objects (PO) used in the regression tests -->
<!-- Bring in the Share Page Objects (PO) used in our functional tests.
It contains page objects such as LoginPage and it also brings
in selenium-grid and selenium. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Bring in the Share Page Object (PO) regression tests that comes with Alfresco.
These tests cover the Alfresco Share Web Application -->
<!-- Bring in the Share Page Object (PO) Tests that comes with Alfresco. It has
the org.alfresco.po.share.AbstractTest class that our custom tests extend. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
@@ -235,8 +252,7 @@
<classifier>tests</classifier>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<!-- Exclude selenium as it is already brought in by share-po dependency above -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
@@ -248,25 +264,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0-alfresco</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.45.0-alfresco</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Test NG is defined with test scope in share-po, so need it here too -->
<!-- Alfresco code creates a wrapper around Test NG -->
<dependency>
@@ -281,6 +278,43 @@
</exclusion>
</exclusions>
</dependency>
<!-- Bring in newer selenium version if required
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.48.0</version>
<scope>test</scope>
</dependency>
-->
<!-- Need to bring in a newer Spring that supports annotations, Alfresco brings in older one -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
</dependencies>
</profile>
@@ -337,30 +371,16 @@
<dependencies>
<!-- Bring in the Share Page Objects (PO) used in our functional tests.
Without it TestNG cannot load our test class when it uses page objects such as LoginPage -->
It contains page objects such as LoginPage and it also brings
in selenium-grid and selenium. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Bring in the Share Page Object (PO) Tests that comes with Alfresco. It has
the org.alfresco.po.share.AbstractTest class that our custom tests extend.
Without it TestNG cannot load our test class -->
the org.alfresco.po.share.AbstractTest class that our custom tests extend. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
@@ -368,8 +388,7 @@
<classifier>tests</classifier>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<!-- Exclude selenium as it is already brought in by share-po dependency above -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
@@ -381,25 +400,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0-alfresco</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.45.0-alfresco</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Test NG is defined with test scope in share-po, so need it here too -->
<!-- Alfresco code creates a wrapper around Test NG -->
<dependency>
@@ -414,6 +414,43 @@
</exclusion>
</exclusions>
</dependency>
<!-- Bring in newer selenium version if required
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.48.0</version>
<scope>test</scope>
</dependency>
-->
<!-- Need to bring in a newer Spring that supports annotations, Alfresco brings in older one -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
</dependencies>
</profile>

View File

@@ -38,13 +38,11 @@
<class name="org.alfresco.po.share.site.document.DocumentDetailsPageTest"/>
</classes>
</test>
<!-- TODO: fix this, currently does not work
<test name="DocumentLibraryPageTest">
<classes>
<class name="org.alfresco.po.share.site.document.DocumentLibraryPageTest"/>
</classes>
</test>
-->
<test name="FileDirectoryInfoTest">
<classes>
<class name="org.alfresco.po.share.site.document.FileDirectoryInfoTest">

View File

@@ -13,17 +13,17 @@
<Context docBase="${project.parent.basedir}/alfresco-war/target/${project.build.finalName}">
<!-- Pick up static resource files from AMPs and other directories (this should not include docBase) -->
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-repo-amp/target/${rootArtifactId}-repo-amp/web" />
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-repo-amp/target/amp/web" />
<!-- IMPORTANT! The extraResourcePaths string need to be on one continues line, so if we add another Repo AMP,
it would look something like this:
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/repo-amp/target/repo-amp/web,/=${project.parent.basedir}/component-a-repo/target/component-a-repo/web" />
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-repo-amp/target/amp/web,/=${project.parent.basedir}/component-a-repo/target/amp/web" />
-->
<!-- Configure where the Alfresco (alfresco.war) web application can load classes, test classes, and config files -->
<!-- Setup the virtual class path like this:
1) target/classes
2) target/${project.build.finalName}/config
2) target/amp/config
3) target/test-classes
This way mvn compile can be invoked and all changes will be picked up
@@ -31,7 +31,7 @@
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/${rootArtifactId}-repo-amp/target/classes;
${project.parent.basedir}/${rootArtifactId}-repo-amp/target/${rootArtifactId}-repo-amp/config;
${project.parent.basedir}/${rootArtifactId}-repo-amp/target/amp/config;
${project.parent.basedir}/${rootArtifactId}-repo-amp/target/test-classes" />
<!-- Load from all directories, not just when the META-INF directory is found in exploded JAR -->

View File

@@ -10,17 +10,17 @@
<!-- Pick up static resource files from any Share extensions, being it a JAR or an AMP
(this should not include docBase) -->
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/${rootArtifactId}-share-amp/web" />
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/amp/web" />
<!-- IMPORTANT! The extraResourcePaths string need to be on one continues line, so if we add another Share AMP,
it would look something like this:
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/${rootArtifactId}-share-amp/web,/=${project.parent.basedir}/component-a-share/target/component-a-share/web" />
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/amp/web,/=${project.parent.basedir}/component-a-share/target/amp/web" />
-->
<!-- Configure where the Share (share.war) web application can load classes, config, and test classes (in that order) -->
<!-- Setup the virtual class path like this:
1) ${rootArtifactId}-share-amp/target/classes
2) ${rootArtifactId}-share-amp/target/${project.build.finalName}/config
2) ${rootArtifactId}-share-amp/target/amp/config
3) ${rootArtifactId}-share-amp/target/test-classes
4) Add other AMP paths here....
5) share/target/test-classes (loads the share-config-custom.xml used during test runs)
@@ -30,7 +30,7 @@
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/${rootArtifactId}-share-amp/target/classes;
${project.parent.basedir}/${rootArtifactId}-share-amp/target/${rootArtifactId}-share-amp/config;
${project.parent.basedir}/${rootArtifactId}-share-amp/target/amp/config;
${project.parent.basedir}/${rootArtifactId}-share-amp/target/test-classes;
${project.parent.basedir}/share/target/test-classes" />

View File

@@ -34,7 +34,7 @@
<type>amp</type>
</dependency>
<!-- Uncomment if you are using RM (Records Management) module -->
<!--
<!-- Make sure to set the correct version for 5.1 with alfresco.rm.version property in parent POM
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm-share</artifactId>
@@ -46,9 +46,36 @@
<build>
<plugins>
<plugin>
<!-- Bring in the Maven Dependency plugin so we can unpack and store the MANIFEST.MF file.
It will be used in the custom Share WAR that is produced by the WAR plugin,
it otherwise gets overwritten by the overlay process. -->
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeTypes>war</includeTypes>
<includeGroupIds>org.alfresco</includeGroupIds>
<includeArtifactIds>share</includeArtifactIds>
<includes>META-INF/MANIFEST.MF</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- Bring in the MANIFEST.MF file from the original share.war, it contains version information
that is needed for it to operate properly -->
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestFile>${project.build.directory}/dependency/META-INF/MANIFEST.MF</manifestFile>
</archive>
<!-- Here is can control the order of overlay of your (WAR, AMP, etc.) dependencies
| NOTE: At least one WAR dependency must be uncompressed first
| NOTE: In order to have a dependency effectively added to the WAR you need to
@@ -56,7 +83,7 @@
| NOTE: First-win resource strategy is used by the WAR plugin
-->
<overlays>
<!-- The current project customizations -->
<!-- Current project customizations. This is normally empty, since customizations come from the AMPs -->
<overlay/>
<!-- The Share WAR -->
<overlay>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.2-SNAPSHOT</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -63,6 +63,22 @@
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
</dependency>
<!-- If we are running tests then make the H2 Scripts available
Note. tests are skipped when you are running -Pamp-to-war -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<classifier>h2scripts</classifier>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<profiles>
@@ -81,23 +97,5 @@
</dependency>
</dependencies>
</profile>
<!--
If the 'amp-to-war' profile is enabled then make sure to bring in the alfresco-rad module,
which has the H2 scripts and other RAD features.
TODO: TO INVESTIGATE: This dependency is already defined in the parent SDK pom in the 'amp-to-war' profile
but this does not work, it is not include...
<profile>
<id>amp-to-war</id>
<dependencies>
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${maven.alfresco.version}</version>
</dependency>
</dependencies>
</profile> -->
</profiles>
</project>

View File

@@ -13,7 +13,12 @@ if not exist %springloadedfile% (
mvn validate -Psetup
)
set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
:: Use these settings if you're using JDK7
:: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G -XX:PermSize=300m
:: Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
::set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
set MAVEN_OPTS=-noverify -Xms256m -Xmx2G
mvn integration-test -Pamp-to-war -nsu
:: mvn integration-test -Pamp-to-war

View File

@@ -8,4 +8,9 @@ if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn integration-test -Pamp-to-war
# Use these settings if you're using JDK7
# MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:PermSize=300m" mvn install -Prun
# Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
#MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn integration-test -Pamp-to-war
MAVEN_OPTS="-noverify -Xms256m -Xmx2G" mvn integration-test -Pamp-to-war

View File

@@ -12,7 +12,7 @@
<!-- Registration of new models -->
<bean id="${package}.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<bean id="${artifactId}.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/content-model.xml</value>

View File

@@ -22,13 +22,13 @@
<beans>
<!-- A simple class that is initialized by Spring -->
<bean id="${package}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<bean id="${artifactId}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<!-- A simple module component that will be executed once.
Note. this module component will only be executed once, and then there will be an entry for it in the Repo.
So doing for example $ mvn clean install -Pamp-to-war twice will only execute this component the first time.
You need to remove /alf_data_dev for it to be executed again. -->
<bean id="${package}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<bean id="${artifactId}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<property name="moduleId" value="${artifactId}" /> <!-- See module.properties -->
<property name="name" value="exampleComponent" />
<property name="description" value="A demonstration component" />

View File

@@ -19,8 +19,11 @@
<beans>
<!-- This is filtered by Maven at build time, so that module name is single sourced. -->
<!-- Note. The bootstrap-context.xml file has to be loaded first.
Otherwise your custom models are not yet loaded when your service beans are instantiated and you
cannot for example register policies on them. -->
<import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/service-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/webscript-context.xml" />
</beans>

View File

@@ -24,7 +24,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.

View File

@@ -4,26 +4,33 @@
it is never released with the Alfresco.war
=================================================================================================================-->
<!-- Setup docBase to something like repo-amp/target/repo-amp-war
and path to /alfresco
The Alfresco.war 5.0 does not have a webapp (it used to have Alfresco Explorer but not anymore)
that we will access, so this docBase might not be needed
-->
<Context docBase="${app.amp.client.war.folder}" path="${alfresco.client.contextPath}">
<!-- Setup a virtual context for the /alfresco webapp by specifying this as path for Context.
The amp-to-war profile uses the tomcat7-maven-plugin to kick off the webapp.
This profile is used for both the repo and share AMP archetypes, and has no config for path or resources,
so we need to specify here both the context path and where the webapp resources can be found.
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
The webapp resources are located in the {repo-amp-dir}/target/amp-war directory, However, we
cannot just set this up as the docBase attribute for the Context as it would always be read
before any paths in the extraResourcePaths. So to allow for customizations to override
stuff in the alfresco.war webapp, such as the /images/logo/logo.png, we add the webapp resource
path last in the extraResourcePaths.
Note. Alfresco.war 5.0 does not have a webapp, just an index page, the Alfresco Explorer webapp is no longer available.
-->
<Context path="${alfresco.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/amp/web,${app.amp.client.war.folder}" />
<!-- Setup the virtual class path like this:
1) target/classes
2) target/${project.build.finalName}/config
2) target/amp/config
3) target/test-classes
This way mvn compile can be invoked and all changes will be picked up
-->
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/${project.build.finalName}/config;${project.build.testOutputDirectory}" />
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/amp/config;${project.build.testOutputDirectory}" />
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->

View File

@@ -14,7 +14,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.2-SNAPSHOT</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -89,22 +89,4 @@
</plugin>
</plugins>
</build>
<profiles>
<!--
Brings in the extra Enterprise specific share classes,
if the 'enterprise' profile has been activated, needs to be activated manually. -->
<profile>
<id>enterprise</id>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-enterprise</artifactId>
<version>${alfresco.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

View File

@@ -14,7 +14,8 @@ if not exist %springloadedfile% (
mvn validate -Psetup
)
set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify
:: Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
:: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify
set MAVEN_OPTS=-noverify
mvn integration-test -Pamp-to-war -nsu
:: mvn integration-test -Pamp-to-war

View File

@@ -7,4 +7,6 @@ if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify" mvn integration-test -Pamp-to-war
# Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
# MAVEN_OPTS="-javaagent:$springloadedfile -noverify" mvn integration-test -Pamp-to-war
MAVEN_OPTS="-noverify" mvn integration-test -Pamp-to-war

View File

@@ -17,7 +17,7 @@
-->
<!-- Add module specific messages and labels -->
<bean id="${package}.${artifactId}.resources"
<bean id="${artifactId}.resources"
class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>

View File

@@ -24,7 +24,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.

View File

@@ -4,24 +4,34 @@
it is never released with the Alfresco.war
=================================================================================================================-->
<!-- Setup docBase to something like share-amp/target/share-amp-war
and path to /share -->
<Context docBase="${app.amp.client.war.folder}" path="${share.client.contextPath}">
<!-- Setup a virtual context for the /share webapp by specifying this as path for Context.
The amp-to-war profile uses the tomcat7-maven-plugin to kick off the webapp.
This profile is used for both the repo and share AMP archetypes, and has no config for path or resources,
so we need to specify here both the context path and where the webapp resources can be found.
The webapp resources are located in the {share-amp-dir}/target/amp-war directory, However, we
cannot just set this up as the docBase attribute for the Context as it would always be read
before any paths in the extraResourcePaths. So to allow for customizations to override
stuff in the share.war webapp, such as the /favicon.ico, we add the webapp resource
path last in the extraResourcePaths.
Note. most of the UI customizations for Share are done via custom themes.
-->
<Context path="${share.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
extraResourcePaths="/=${project.build.directory}/amp/web,${app.amp.client.war.folder}" />
<!-- Configure where the Share (share.war) web application can load classes, test classes, and config -->
<!-- Setup the virtual class path like this:
1) target/classes
2) target/${project.build.finalName}/config
2) target/amp/config
3) target/test-classes
This way mvn compile can be invoked and all changes will be picked up
-->
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/${project.build.finalName}/config;${project.build.testOutputDirectory}" />
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/amp/config;${project.build.testOutputDirectory}" />
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->
<JarScanner scanAllDirectories="true" />

View File

@@ -5,17 +5,15 @@
<packaging>jar</packaging>
<name>Rapid Application Development Support</name>
<description>SDK module for Rapid Development support</description>
<description>SDK module for Rapid Development support - allows remote unit testing and starts remote JUnit runner</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.2-SNAPSHOT</version>
<version>2.2.0-beta-1</version>
<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>
@@ -30,97 +28,14 @@
</exclusion>
</exclusions>
</dependency>
<!-- Required to have annotation based remote testing working -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.0.6.RELEASE</version>
<version>3.2.14.RELEASE</version>
<type>jar</type>
</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 - does not seem to be picked up, so any changes you would make to them are not picked up...
<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>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.2-SNAPSHOT</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -17,7 +17,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.2</version>
<version>3.4</version>
<executions>
<execution>
<id>generated-helpmojo</id>
@@ -73,7 +73,7 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.2</version>
<version>3.4</version>
<!-- Annotations are not needed for plugin execution so you
can remove this dependency for execution by using provided scope. -->
<scope>provided</scope>
@@ -81,7 +81,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
<version>2.5</version>
<version>2.6</version>
<exclusions>
<exclusion>
<artifactId>maven-core</artifactId>
@@ -92,7 +92,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>2.3</version>
<version>2.10.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
@@ -107,17 +107,17 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3</version>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.3</version>
<version>3.4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.1</version>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
@@ -127,7 +127,7 @@
<dependency>
<groupId>org.alfrescolabs.alfresco-technical-validation</groupId>
<artifactId>org.alfrescolabs.alfresco-technical-validation</artifactId>
<version>0.4.0</version>
<version>0.6.0</version>
</dependency>
</dependencies>
@@ -136,7 +136,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.3</version>
<version>3.4</version>
</plugin>
</plugins>
</reporting>

View File

@@ -49,7 +49,7 @@ public class AmpMojo extends AbstractMojo {
/**
* Target folder used to aggregate content then packaged into the AMP
*
* @parameter property="maven.alfresco.ampBuildDirectory" default-value="${project.build.directory}/${project.build.finalName}"
* @parameter property="maven.alfresco.ampBuildDirectory" default-value="${app.amp.output.folder}"
* @required
*
*/

View File

@@ -29,7 +29,7 @@ public class InstallMojo extends AbstractMojo {
/**
* The location of the AMP file(s) to be installed. If this location is a
* folder all AMPs contained in the folder are installed, if it's a file it
* get direclty installed on the ${warLocation}
* get directly installed on the ${warLocation}
*
* @parameter property="maven.alfresco.ampLocation" default-value="${project.build.directory}/${project.build.finalName}.amp"
*/
@@ -37,9 +37,9 @@ public class InstallMojo extends AbstractMojo {
/**
* The WAR file or exploded dir to install the AMPs in. If specified
* Defaults to <code>"${project.build.directory}/${project.build.finalName}-war</code>
*
* @parameter property="maven.alfresco.warLocation" default-value="${project.build.directory}/${project.build.finalName}-war"
* Defaults to <code>"${app.amp.client.war.folder}</code>
*
* @parameter property="maven.alfresco.warLocation" default-value="${app.amp.client.war.folder}"
*/
private File warLocation;

View File

@@ -18,7 +18,7 @@ Introduction
*{{{./install-mojo.html}alfresco:install}} Installs one or multiple AMPs into an Alfresco WAR / exploded WAR folder embedding {{{http://wiki.alfresco.com/wiki/Module_Management_Tool} Alfresco MMT}}
*{{{./set-version-mojo.html}alfresco:version}} Parses ${project.version} removing literals (for AMP compatibility) and making the <<<$\{noSnapshotVersion\}>>> property available in the POM
*{{{./set-version-mojo.html}alfresco:version}} Parses <<<$\{project.version\}>>> removing literals (for AMP compatibility) and making the <<<$\{noSnapshotVersion\}>>> property available in the POM
Full information is available at the {{{./plugin-info.html}goals page}}.

22
pom.xml
View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.2-SNAPSHOT</version>
<version>2.2.0-beta-1</version>
<name>Alfresco SDK</name>
<description>This aggregator Project builds all modules required for the Alfresco SDK</description>
<packaging>pom</packaging>
@@ -30,7 +30,7 @@
<connection>scm:git:${scm.url.base}.git</connection>
<developerConnection>scm:git:${scm.url.base}</developerConnection>
<url>${scm.url.base}</url>
<tag>alfresco-sdk-aggregator-2.1.0-beta-1</tag>
<tag>alfresco-sdk-aggregator-2.2.0-beta-1</tag>
</scm>
<developers>
@@ -133,13 +133,13 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.archetype.version>2.2</maven.archetype.version>
<maven.archetype.version>2.4</maven.archetype.version>
<alfresco.sdk.parent.version>${project.version}</alfresco.sdk.parent.version>
<alfresco.sdk.tests.exclude>*/*-enterprise/*</alfresco.sdk.tests.exclude>
<alfresco.community.default.version>5.0.d</alfresco.community.default.version>
<alfresco.enterprise.default.version>5.0.1</alfresco.enterprise.default.version>
<alfresco.community.default.version>5.1.d-EA</alfresco.community.default.version>
<alfresco.enterprise.default.version>5.1-EA-3</alfresco.enterprise.default.version>
<alfresco.rm.version>2.3</alfresco.rm.version>
<springloaded.version>1.2.3.RELEASE</springloaded.version>
<springloaded.version>1.2.5.RELEASE</springloaded.version>
<scm.url.base>https://github.com/Alfresco/alfresco-sdk</scm.url.base>
</properties>
@@ -165,7 +165,7 @@
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>2.2</version>
<version>2.10</version>
</extension>
</extensions>
</build>
@@ -217,10 +217,10 @@
<id>sdk-release</id>
<properties>
<maven.site.url>https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/latest</maven.site.url>
<maven.release.version>2.5.2</maven.release.version>
<maven.release.version>2.5.3</maven.release.version>
<maven.release.goals>deploy site-deploy</maven.release.goals>
<maven.site.version>3.4</maven.site.version>
<maven.changes.version>2.10</maven.changes.version>
<maven.changes.version>2.11</maven.changes.version>
</properties>
<build>
<plugins>
@@ -240,7 +240,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<version>2.10.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
@@ -258,7 +258,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>

View File

@@ -6,7 +6,7 @@
<description>
The Maven Alfresco SDK Parent POM exposes the developer features of the Maven Alfresco SDK.
Declare this POM as parent for your project and select the Alfresco version/edition by defining
the alfresco.groupId and alfresco.version in your POM.
the alfresco.groupId, alfresco.version, and share.version in your POM.
</description>
<packaging>pom</packaging>
@@ -14,12 +14,12 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.2-SNAPSHOT</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<!-- This defines the version of the SDK in terms of features -->
<version>2.1.2-SNAPSHOT</version>
<version>2.2.0-beta-1</version>
<properties>
@@ -66,10 +66,14 @@
<!--
Alfresco Module Packages (AMP) settings
-->
<app.amp.folder>src/main/amp</app.amp.folder> <!-- To know which resource folder to filter for AMP extension projects -->
<app.amp.output.folder>../${project.build.finalName}</app.amp.output.folder> <!-- To know which folder filtered AMP resources should end up in -->
<app.amp.overlay.excludes /> <!-- AMP excludes when installing into a WAR, by default empty (i.e. everything is included) -->
<app.amp.excludes /> <!-- Empty AMP source excludes by default, see the amp-to-war profile for usage example -->
<!-- To know which resource folder to filter for AMP extension projects -->
<app.amp.folder>src/main/amp</app.amp.folder>
<!-- To know which folder filtered AMP resources should end up in under /target -->
<app.amp.output.folder>${project.build.directory}/amp</app.amp.output.folder>
<!-- AMP excludes when installing into a WAR, by default empty (i.e. everything is included) -->
<app.amp.overlay.excludes />
<!-- Empty AMP source excludes by default, see the amp-to-war profile for usage example -->
<app.amp.excludes />
<!--
Settings related to the stand-alone AMP extension projects.
@@ -81,7 +85,7 @@
my-repo-amp/target/my-repo-amp-war (Alfresco.war extension)
my-share-amp/target/my-share-amp-war (Share.war extension)
-->
<app.amp.client.war.folder>${project.build.directory}/${project.build.finalName}-war</app.amp.client.war.folder>
<app.amp.client.war.folder>${project.build.directory}/amp-war</app.amp.client.war.folder>
<!-- The Maven artifact ID to use when loading the WAR that the AMP should be applied to,
defaults to the alfresco.war artifact ID, overriding this in the share-amp project. -->
<app.amp.client.war.artifactId>${alfresco.repo.artifactId}</app.amp.client.war.artifactId>
@@ -121,25 +125,25 @@
<!-- Needed for community to avoid weird logging exceptions -->
<app.slf4j.scope>runtime</app.slf4j.scope>
<app.slf4j.version>1.5.11</app.slf4j.version>
<app.slf4j.version>1.7.13</app.slf4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Maven Plugins Versions used by the SDK -->
<maven.compiler.version>3.2</maven.compiler.version>
<maven.compiler.version>3.5</maven.compiler.version>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.clean.version>2.6.1</maven.clean.version>
<maven.dependency.version>2.9</maven.dependency.version>
<maven.enforcer.plugin>1.4</maven.enforcer.plugin>
<maven.clean.version>3.0.0</maven.clean.version>
<maven.dependency.version>2.10</maven.dependency.version>
<maven.enforcer.plugin>1.4.1</maven.enforcer.plugin>
<maven.resources.version>2.7</maven.resources.version>
<maven.surefire.version>2.18</maven.surefire.version>
<maven.surefire.version>2.19.1</maven.surefire.version>
<maven.install.version>2.5.2</maven.install.version>
<maven.jar.version>2.5</maven.jar.version>
<maven.war.version>2.5</maven.war.version>
<maven.antrun.version>1.7</maven.antrun.version>
<maven.release.version>2.5.1</maven.release.version>
<maven.buildhelper.version>1.9.1</maven.buildhelper.version>
<maven.jar.version>2.6</maven.jar.version>
<maven.war.version>2.6</maven.war.version>
<maven.antrun.version>1.8</maven.antrun.version>
<maven.release.version>2.5.3</maven.release.version>
<maven.buildhelper.version>1.10</maven.buildhelper.version>
<maven.replacer.version>1.5.3</maven.replacer.version>
<maven.tomcat.version>2.2</maven.tomcat.version>
@@ -148,17 +152,16 @@
<!-- This is used to set the version for the following Alfresco artifacts:
- Maven Alfresco plugin that enables Maven to handle AMP files (alfresco-maven-plugin)
- Alfresco Rapid Application Development module (alfresco-rad)
- Alfresco Rapid Application Development module that starts remote JUnit runner and enables remote unit testing alfresco-rad)
-->
<maven.alfresco.version>2.1.2-SNAPSHOT</maven.alfresco.version>
<maven.alfresco.version>2.2.0-beta-1</maven.alfresco.version>
<!-- Setup the default Embedded Tomcat port for use by the tomcat7-maven-plugin so
it can be accessed from the Groovy scripts and other places -->
<maven.tomcat.port>8080</maven.tomcat.port>
<!-- Sets the H2 Database version to use.
Note. Upgrading to 1.4.186 did not work, on second start (after initial db creation etc) it will not connect... -->
<h2.version>1.4.185</h2.version>
<!-- Sets the H2 Database version to use. -->
<h2.version>1.4.190</h2.version>
<!-- Give the JVM some more memory so it can load the alfresco.war,share.war,and solr4.war -->
<argLine>-Xms256m -Xmx1524m -XX:MaxPermSize=256m -Duser.language=en</argLine>
@@ -222,7 +225,7 @@
</pluginRepositories>
<build>
<finalName>${project.artifactId}</finalName>
<finalName>${project.artifactId}-${project.version}</finalName>
<pluginManagement>
<plugins>
<plugin>
@@ -272,6 +275,7 @@
<nonFilteredFileExtension>css</nonFilteredFileExtension>
<nonFilteredFileExtension>ico</nonFilteredFileExtension>
<nonFilteredFileExtension>psd</nonFilteredFileExtension>
<nonFilteredFileExtension>js</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
@@ -398,7 +402,10 @@
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
</excludes>
<warSourceDirectory>src/main/resources/META-INF</warSourceDirectory>
<sourceDirectory>src/main/amp</sourceDirectory>
<outputDirectory>${project.build.directory}/amp</outputDirectory>
<!-- Exclude resources so we don't get an extra dir structure with -min.js files -->
<excludeResources>true</excludeResources>
<jswarn>false</jswarn>
</configuration>
</execution>
@@ -480,7 +487,10 @@
<properties>
<alfresco.version>${alfresco.enterprise.default.version}</alfresco.version>
<alfresco.repo.artifactId>alfresco-enterprise</alfresco.repo.artifactId>
<alfresco.share.artifactId>share-enterprise</alfresco.share.artifactId>
<!-- In 5.1 there is only one release of Share that works with both the Community and the Enterprise version of the product.
i.e. there is no more a share-enterprise artifact...
-->
<alfresco.share.artifactId>share</alfresco.share.artifactId>
<!-- Not needed in the webapp for enterprise -->
<app.slf4j.scope>provided</app.slf4j.scope>
</properties>
@@ -489,7 +499,22 @@
<id>alfresco-private-repository</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</repository>
<!-- TODO: Remove when 5.1 Enterprise has been released, this is just for early access. -->
<repository>
<id>alfresco-internal-releases</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/5.1-EA</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-internal-releases</id>
<name>Alfresco Early Access Enterprise</name>
<url>https://artifacts.alfresco.com/nexus/content/repositories/5.1-EA/</url>
</pluginRepository>
</pluginRepositories>
</profile>
<!--
@@ -564,6 +589,35 @@
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<dependencies>
<!-- Bring in the H2 Database scripts needed when running embedded, they are now
available from the standard generated artifacts, no longer needed to be picked
up from the alfresco-rad project -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<classifier>h2scripts</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Explicitly bring in the Plexus Archiver so assembly goes quicker -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>2.3</version>
</dependency>
<!-- Include remote Junit testing lib and start remote JUnit runner -->
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${maven.alfresco.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-embedded</id>
@@ -583,14 +637,6 @@
</configuration>
</execution>
</executions>
<dependencies>
<!-- Include H2 scripts and lib -->
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${maven.alfresco.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
@@ -696,8 +742,8 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- Add RAD capabilities for remote JUnit test running. Scope=test so the custom JUnit remote runner
is found in the Maven test classpath -->
<!-- Add RAD capabilities for remote JUnit test running and start remote JUnit runner.
Scope=test so the custom JUnit remote runner is found in the Maven test classpath -->
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
@@ -820,7 +866,7 @@
<profile>
<id>enforce-sdk-rules</id>
<activation>
<activeByDefault>true</activeByDefault>
<file><missing>does-not-exist.tmp</missing></file><!-- turn on this profile (by triggering on a file that is not expected to exist) -->
</activation>
<build>
<plugins>
@@ -839,10 +885,10 @@
<!-- Test for Alfresco version -->
<requireProperty>
<property>alfresco.version</property>
<message>The SDK 2.1.x is supported only for Alfresco 5.0.d Community and above or
Alfresco Enterprise 5.0.1 and above
<message>The SDK 2.2.x is supported only for Alfresco 5.1.x Community and above or
Alfresco Enterprise 5.1 and above
</message>
<regex>^(5\.(0\.[d-z1-9]|[1-9])|6\.).*$</regex>
<regex>^(5\.(1\.[a-z1-9]|[1-9])|6\.).*$</regex>
</requireProperty>
<!-- Test for Maven version -->