Skip to content

Commit

Permalink
Port to SDK 2.2.0 and Alfresco 5.1.e
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglas C. R. Paes committed Mar 16, 2016
1 parent 4d4084b commit 2ba31e6
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 10 deletions.
88 changes: 78 additions & 10 deletions surf/pom.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.softwareloop</groupId>
<artifactId>uploader-plus-surf</artifactId>
<version>1.0-SNAPSHOT</version>
<name>uploader-plus-surf</name>
<packaging>amp</packaging>
<description>uploader-plus AMP using the Surf framework for Share 4.2.x and
5.0.x
</description>
<url>http://softwareloop.com/</url>

<description>uploader-plus AMP using the Surf framework for Share 5.1.x</description>
<url>http://softwareloop.com/</url>

<parent>
<groupId>com.softwareloop</groupId>
<artifactId>uploader-plus</artifactId>
<version>1.3-SNAPSHOT</version>
<version>1.4-SNAPSHOT</version>
</parent>

<!--
SDK properties have sensible defaults in the SDK parent,
but you can override the properties below to use another version.
For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<alfresco.client.war>share</alfresco.client.war>
<alfresco.client.contextPath>/share</alfresco.client.contextPath>
<!-- The following are default values for data location and Alfresco version.
Uncomment if you need to change
<alfresco.version>${alfresco.community.default.version}</alfresco.version> -->

<!-- This control the root logging level for all apps uncomment and change, defaults to WARN
<app.log.root.level>WARN</app.log.root.level>
-->

<!-- Set the enviroment to use, this controls which properties will be picked in src/test/properties
for embedded run, defaults to the 'local' environment. See SDK Parent POM for more info.
<env>other environment name</env>
-->

<!-- The Maven artifact ID to use when loading the Share.WAR that the AMP should be applied to,
defaults to the alfresco.war artifact ID, so we need to override here. -->
<app.amp.client.war.artifactId>${alfresco.share.artifactId}</app.amp.client.war.artifactId>

<!-- Since Alfresco.WAR (i.e. the Repository) is already running on port 8080, we run Share.WAR on port 8081 -->
<maven.tomcat.port>8081</maven.tomcat.port>

<!-- Used in share-config-custom.xml. By default points to local installation of Alfresco Repo -->
<alfresco.repo.url>http://localhost:8080/alfresco</alfresco.repo.url>

</properties>

</project>
<!-- Here we realize the connection with the Alfresco selected platform
(e.g.version and edition) -->
<dependencyManagement>
<dependencies>
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco version/edition
(see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies)
NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement. 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 -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-platform-distribution</artifactId>
<version>${alfresco.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<!-- Following dependencies are needed for compiling Java code in src/main/java; -->
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<version>${alfresco.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-surf-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- Compress JavaScript files and store as *-min.js -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
3 changes: 3 additions & 0 deletions surf/run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@ECHO OFF

mvn clean install -Pamp-to-war
19 changes: 19 additions & 0 deletions surf/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# Note. This script requires Alfresco.war to be running in another Tomcat on port 8080

if [[ -z ${MAVEN_OPTS} ]]; then
echo "The environment variable 'MAVEN_OPTS' is not set, setting it for you";

# Downloads the spring-loaded lib if not existing and runs the Share AMP applied to Share WAR
springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.5.RELEASE/springloaded-1.2.5.RELEASE.jar

if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi

# Spring loaded can be used with the Share AMP project in 5.1
# (i.e. it does not have the same problem as Repo AMP and AIO)
MAVEN_OPTS="-javaagent:$springloadedfile -noverify"
fi
echo "MAVEN_OPTS is set to '$MAVEN_OPTS'";
mvn clean install -Pamp-to-war

0 comments on commit 2ba31e6

Please sign in to comment.