Skip to content

Commit ed80e92

Browse files
author
Nathan McMinn
committed
Updated to SDK 2.2 / Alfresco 5.1
1 parent f7a205f commit ed80e92

File tree

13 files changed

+454
-171
lines changed

13 files changed

+454
-171
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ alf_data_dev/*
88
solr/solr_home
99
*.log.*
1010
*.log
11+
Users/*
12+
Users
1113

pdf-toolkit-repo/pom.xml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,18 @@
1111
<artifactId>pdf-toolkit</artifactId>
1212
<version>1.3-SNAPSHOT</version>
1313
</parent>
14-
14+
15+
<properties>
16+
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
17+
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your custom corporate Alfresco WAR -->
18+
<alfresco.client.war>alfresco</alfresco.client.war>
19+
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
20+
. | Could be org.alfresco | org.alfresco.enterprise or your corporate groupId -->
21+
<!-- <alfresco.client.war.groupId>org.alfresco</alfresco.client.war.groupId> -->
22+
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
23+
<!-- <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version> -->
24+
</properties>
25+
1526
<!--
1627
Following dependencies are needed for compiling Java code in src/main/java; <scope>provided</scope>
1728
is inherited for each of the following; for more info, please refer to alfresco-integration-parent
@@ -67,15 +78,30 @@
6778
</dependency>
6879
</dependencies>
6980

70-
<properties>
71-
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
72-
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your custom corporate Alfresco WAR -->
73-
<alfresco.client.war>alfresco</alfresco.client.war>
74-
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
75-
. | Could be org.alfresco | org.alfresco.enterprise or your corporate groupId -->
76-
<!-- <alfresco.client.war.groupId>org.alfresco</alfresco.client.war.groupId> -->
77-
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
78-
<!-- <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version> -->
79-
</properties>
81+
<profiles>
82+
83+
<!--
84+
Brings in the extra Enterprise specific repository classes,
85+
if the 'enterprise' profile has been activated, needs to be activated manually. -->
86+
<profile>
87+
<id>enterprise</id>
88+
<dependencies>
89+
<dependency>
90+
<groupId>${alfresco.groupId}</groupId>
91+
<artifactId>alfresco-enterprise-repository</artifactId>
92+
<version>${alfresco.version}</version>
93+
<scope>provided</scope>
94+
</dependency>
95+
</dependencies>
96+
</profile>
97+
98+
<!-- If we are running in embedded Tomcat skip unit tests -->
99+
<profile>
100+
<id>run</id>
101+
<properties>
102+
<skipTests>true</skipTests>
103+
</properties>
104+
</profile>
105+
</profiles>
80106

81107
</project>

pdf-toolkit-share/pom.xml

Lines changed: 69 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,79 @@
1212
<version>1.3-SNAPSHOT</version>
1313
</parent>
1414

15-
<!--
16-
Following dependencies are needed for compiling Java code in src/main/java; <scope>provided</scope>
17-
is inherited for each of the following; for more info, please refer to alfresco-integration-parent
18-
POM definition
19-
@TODO - document
20-
-->
15+
<properties>
16+
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
17+
Allowed values: alfresco | share. In this case it's configured to use OOTB share -->
18+
<app.amp.client.war.artifactId>share</app.amp.client.war.artifactId>
19+
20+
<!-- Defines the log level used in log4j.properties -->
21+
<app.log.root.level>WARN</app.log.root.level>
22+
</properties>
23+
2124
<dependencies>
2225
<dependency>
2326
<groupId>${alfresco.groupId}</groupId>
24-
<artifactId>alfresco-repository</artifactId>
27+
<artifactId>share</artifactId>
28+
<version>${alfresco.version}</version>
29+
<classifier>classes</classifier>
30+
<scope>provided</scope>
31+
</dependency>
32+
33+
<dependency>
34+
<groupId>org.springframework.extensions.surf</groupId>
35+
<artifactId>spring-surf-api</artifactId>
36+
<scope>provided</scope>
37+
</dependency>
38+
39+
<!--===============================================================
40+
The following dependencies are needed to be able to compile the
41+
custom functional tests that are based on Page Objects (PO)
42+
===============================================================-->
43+
44+
<!-- Bring in the Share Page Objects (PO) used in our functional tests.
45+
It contains page objects such as LoginPage and it also brings
46+
in selenium-grid and selenium. -->
47+
<dependency>
48+
<groupId>${alfresco.groupId}</groupId>
49+
<artifactId>share-po</artifactId>
50+
<version>${alfresco.version}</version>
51+
<scope>test</scope>
52+
</dependency>
53+
<!-- Bring in the Share Page Object (PO) Tests that comes with Alfresco. It has
54+
the org.alfresco.po.share.AbstractTest class that our custom tests extend. -->
55+
<dependency>
56+
<groupId>${alfresco.groupId}</groupId>
57+
<artifactId>share-po</artifactId>
58+
<version>${alfresco.version}</version>
59+
<classifier>tests</classifier>
60+
<scope>test</scope>
61+
62+
<!-- Exclude selenium as it is already brought in by share-po dependency above -->
63+
<exclusions>
64+
<exclusion>
65+
<groupId>org.seleniumhq.selenium</groupId>
66+
<artifactId>selenium-java</artifactId>
67+
</exclusion>
68+
<exclusion>
69+
<groupId>org.seleniumhq.selenium</groupId>
70+
<artifactId>selenium-server</artifactId>
71+
</exclusion>
72+
</exclusions>
73+
</dependency>
74+
<!-- Test NG is defined with test scope in share-po, so need it here too -->
75+
<!-- Alfresco code creates a wrapper around Test NG -->
76+
<dependency>
77+
<groupId>org.alfresco.test</groupId>
78+
<artifactId>alfresco-testng</artifactId>
79+
<version>1.1</version>
80+
<scope>test</scope>
81+
<exclusions>
82+
<exclusion>
83+
<groupId>org.hamcrest</groupId>
84+
<artifactId>hamcrest-core</artifactId>
85+
</exclusion>
86+
</exclusions>
2587
</dependency>
2688
</dependencies>
2789

28-
<properties>
29-
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
30-
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your custom corporate Alfresco WAR -->
31-
<alfresco.client.war>share</alfresco.client.war>
32-
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
33-
. | Could be org.alfresco | org.alfresco.enterprise or your corporate groupId -->
34-
<!-- <alfresco.client.war.groupId>org.alfresco</alfresco.client.war.groupId> -->
35-
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
36-
<!-- <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version> -->
37-
</properties>
38-
3990
</project>

pom.xml

Lines changed: 149 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,151 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
3-
<modelVersion>4.0.0</modelVersion>
4-
<groupId>org.alfresco.extension</groupId>
5-
<artifactId>pdf-toolkit</artifactId>
6-
<version>1.3-SNAPSHOT</version>
7-
<name>Quickstart of Alfresco and Share with DB and runner embedded</name>
8-
<description>This All-in-One project allows to manage all the components involved in Alfresco development (Repo, Share, Solr, AMPs) in one project</description>
9-
<packaging>pom</packaging>
10-
11-
<parent>
12-
<groupId>org.alfresco.maven</groupId>
13-
<artifactId>alfresco-sdk-parent</artifactId>
14-
<version>2.1.0</version>
15-
</parent>
16-
17-
<!--
18-
| SDK properties have sensible defaults in the SDK parent, but you can override the properties below to use another version.
19-
| For more available properties see the alfresco-sdk-parent POM.
20-
-->
21-
<properties>
22-
<!--
23-
| Defines the Alfresco GroupId \ Edition to work against. Allowed values are: org.alfresco | org.alfresco.enterprise
24-
| NOTE: Please Refer to Alfresco Support for access to Enterprise artifacts -->
25-
<alfresco.groupId>org.alfresco</alfresco.groupId>
26-
<!-- Defines the Alfresco version to work against. Allowed values are: org.alfresco | org.alfresco.enterprise -->
27-
<alfresco.version>5.0.d</alfresco.version>
28-
<!-- This control the root logging level for all apps -->
29-
<app.log.root.level>WARN</app.log.root.level>
30-
<!-- This controls the default data location for dir.root -->
31-
<alfresco.data.location>alf_data_dev</alfresco.data.location>
32-
<!-- This controls which properties will be picked in multi-enviromment build -->
33-
<env>local</env>
34-
</properties>
35-
36-
<!-- Here we realize the connection with the Alfresco selected platform (e.g.version and edition) -->
37-
<dependencyManagement>
38-
<dependencies>
39-
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco plaftorm
40-
(see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies)
41-
NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement.
42-
NOTE: It defaults to the latest version this SDK pom has been tested with, but alfresco version can/should be overridden in your project's pom
43-
-->
44-
<dependency>
45-
<groupId>${alfresco.groupId}</groupId>
46-
<artifactId>alfresco-platform-distribution</artifactId>
47-
<version>${alfresco.version}</version>
48-
<type>pom</type>
49-
<scope>import</scope>
50-
</dependency>
51-
</dependencies>
52-
</dependencyManagement>
53-
54-
55-
<modules>
56-
<module>pdf-toolkit-repo</module>
57-
<module>pdf-toolkit-share</module>
58-
<module>repo</module>
59-
<module>solr-config</module>
60-
<module>share</module>
61-
<module>runner</module>
62-
</modules>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>org.alfresco.extension</groupId>
6+
<artifactId>pdf-toolkit</artifactId>
7+
<version>1.3-SNAPSHOT</version>
8+
<name>Quickstart of Alfresco and Share with DB and runner embedded</name>
9+
<description>This All-in-One project allows to manage all the components involved in Alfresco development (Repo, Share, Solr, AMPs) in one project</description>
10+
<packaging>pom</packaging>
11+
12+
<parent>
13+
<groupId>org.alfresco.maven</groupId>
14+
<artifactId>alfresco-sdk-parent</artifactId>
15+
<version>2.2.0</version>
16+
</parent>
17+
18+
<!-- | SDK properties have sensible defaults in the SDK parent, but you
19+
can override the properties below to use another version. | For more available
20+
properties see the alfresco-sdk-parent POM. -->
21+
<properties>
22+
<!-- | Defines the Alfresco GroupId \ Edition to work against. Allowed
23+
values are: org.alfresco | org.alfresco.enterprise | NOTE: Please Refer to
24+
Alfresco Support for access to Enterprise artifacts -->
25+
<alfresco.groupId>org.alfresco</alfresco.groupId>
26+
<!-- Defines the Alfresco version to work against. Allowed values are:
27+
org.alfresco | org.alfresco.enterprise -->
28+
<alfresco.version>5.1.e</alfresco.version>
29+
<!-- This control the root logging level for all apps -->
30+
<app.log.root.level>WARN</app.log.root.level>
31+
<!-- This controls the default data location for dir.root -->
32+
<!--<alfresco.data.location>alf_data_dev</alfresco.data.location> -->
33+
34+
<!-- This controls which properties will be picked in multi-environment
35+
build -->
36+
<env>local</env>
37+
<share.client.url>http://localhost:8080/share</share.client.url>
38+
</properties>
39+
40+
<dependencies>
41+
<!-- If we are running tests then make the H2 Scripts available. Note.
42+
tests are skipped when you are running -Prun -->
43+
<dependency>
44+
<groupId>${alfresco.groupId}</groupId>
45+
<artifactId>alfresco-repository</artifactId>
46+
<version>${alfresco.version}</version>
47+
<classifier>h2scripts</classifier>
48+
<scope>test</scope>
49+
<exclusions>
50+
<exclusion>
51+
<groupId>*</groupId>
52+
<artifactId>*</artifactId>
53+
</exclusion>
54+
</exclusions>
55+
</dependency>
56+
</dependencies>
57+
58+
<!-- Here we realize the connection with the Alfresco selected platform
59+
(e.g.version and edition) -->
60+
<dependencyManagement>
61+
<dependencies>
62+
<!-- This will import the dependencyManagement for all artifacts in the
63+
selected Alfresco plaftorm (see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies)
64+
NOTE: You still need to define dependencies in your POM, but you can omit
65+
version as it's enforced by this dependencyManagement. NOTE: It defaults
66+
to the latest version this SDK pom has been tested with, but alfresco version
67+
can/should be overridden in your project's pom -->
68+
<dependency>
69+
<groupId>${alfresco.groupId}</groupId>
70+
<artifactId>alfresco-platform-distribution</artifactId>
71+
<version>${alfresco.version}</version>
72+
<type>pom</type>
73+
<scope>import</scope>
74+
</dependency>
75+
</dependencies>
76+
</dependencyManagement>
77+
78+
<build>
79+
<plugins>
80+
<!-- Compress JavaScript files and store as *-min.js -->
81+
<plugin>
82+
<groupId>net.alchim31.maven</groupId>
83+
<artifactId>yuicompressor-maven-plugin</artifactId>
84+
</plugin>
85+
<plugin>
86+
<groupId>org.alfresco.maven.plugin</groupId>
87+
<artifactId>alfresco-maven-plugin</artifactId>
88+
</plugin>
89+
</plugins>
90+
</build>
91+
92+
<profiles>
93+
<profile>
94+
<!-- Invoke your build with -Prun to run the multimodule project and enable
95+
rapid dev mode in your IDE. See 'run' profile in the sub modules pom.xml
96+
for further behavioral details. -->
97+
<id>run</id>
98+
<properties>
99+
<!-- While running in rapid dev mode with -Prun, we don't want amp web
100+
resources to be added to the war, so we can load them directly from the AMP
101+
project (see runner/tomcat/context-*.xml for more details) -->
102+
<maven.alfresco.includeWebResources>false</maven.alfresco.includeWebResources>
103+
</properties>
104+
</profile>
105+
106+
<!-- if we're on a unix machine, chmod run.sh to be executable -->
107+
<profile>
108+
<id>chmod</id>
109+
<activation>
110+
<os>
111+
<family>unix</family>
112+
</os>
113+
</activation>
114+
<build>
115+
<plugins>
116+
<plugin>
117+
<groupId>org.codehaus.mojo</groupId>
118+
<artifactId>exec-maven-plugin</artifactId>
119+
<version>1.2.1</version>
120+
<inherited>false</inherited>
121+
<executions>
122+
<execution>
123+
<id>chmod</id>
124+
<phase>validate</phase>
125+
<goals>
126+
<goal>exec</goal>
127+
</goals>
128+
</execution>
129+
</executions>
130+
<configuration>
131+
<executable>chmod</executable>
132+
<arguments>
133+
<argument>+x</argument>
134+
<argument>${basedir}/run.sh</argument>
135+
</arguments>
136+
</configuration>
137+
</plugin>
138+
</plugins>
139+
</build>
140+
</profile>
141+
</profiles>
142+
143+
<modules>
144+
<module>pdf-toolkit-repo</module>
145+
<module>pdf-toolkit-share</module>
146+
<module>repo</module>
147+
<module>solr-config</module>
148+
<module>share</module>
149+
<module>runner</module>
150+
</modules>
63151
</project>

0 commit comments

Comments
 (0)