Skip to content

Commit

Permalink
Upgrade project to SDK 2.0.0 and Alfresco 5.0.d.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpotts committed Apr 13, 2015
1 parent 4ecfbe3 commit da610bc
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 95 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If you modify your site presets to add additional types of Share sites, you can

Installation
------------
Use `mvn install` to create the AMP. By default the POM is set to depend on the latest Alfresco Community Edition version which is 4.2.f.
Use `mvn install` to create the AMP. By default the POM is set to depend on the latest Alfresco Community Edition version which is 5.0.d.

You can then install the AMP as you normally would using the MMT.

Expand Down
118 changes: 37 additions & 81 deletions share-site-space-templates-repo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<name>share-site-space-templates-repo AMP project</name>
<packaging>amp</packaging>
<description>Manages the lifecycle of the share-site-space-templates-repo AMP (Alfresco Module Package)</description>

<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>1.1.1</version>
<version>2.0.0</version>
</parent>

<!--
Expand All @@ -21,22 +21,31 @@
| For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<!-- Defines the alfresco edition to compile against. Allowed values are [org.alfresco|org.alfresco.enterprise]-->
<alfresco.groupId>org.alfresco</alfresco.groupId>
<!-- Defines the alfresco version to compile against -->
<alfresco.version>4.2.f</alfresco.version>
<!--
| Defines the groupId for the Alfresco Artifacts to work against. As of 4.2 the only allowed value is: org.alfresco
| NOTE: See http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html for details
-->
<!-- <alfresco.groupId>org.alfresco</alfresco.groupId> -->
<!-- Defines the Alfresco version to work against.
Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0) -->
<alfresco.version>5.0.d</alfresco.version>
<app.log.root.level>WARN</app.log.root.level>
<alfresco.data.location>alf_data_dev</alfresco.data.location>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your foundation WAR -->
<alfresco.client.war>alfresco</alfresco.client.war>
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
. | Could be org.alfresco | org.alfresco.enterprise or your corporate groupId -->
<alfresco.client.war.groupId>org.alfresco</alfresco.client.war.groupId>
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
<alfresco.client.war.version>4.2.f</alfresco.client.war.version>
<!-- This controls which properties will be picked in src/test/properties for embedded run -->
<env>local</env>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war profile
| Defaults to a vanilla repository AMP, but could point to your foundation / aggregator WAR
. | Allowed values for Community: alfresco | share
| Allowed values for Enterprise: alfresco-enterprise | share-enterprise
<alfresco.client.war>${alfresco.repo.artifactId}</alfresco.client.war> -->
<!-- Context path to run alfresco on -->
<alfresco.client.contextPath>/alfresco</alfresco.client.contextPath>
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
. | Could be org.alfresco or your corporate groupId -->
<!-- <alfresco.client.war.groupId>${alfresco.groupId}</alfresco.client.war.groupId> -->

<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
<!-- <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version>-->
</properties>

<!-- Here we realize the connection with the Alfresco selected platform
Expand Down Expand Up @@ -64,72 +73,19 @@
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<!-- This repository is only needed to retrieve Alfresco parent POM.
NOTE: This can be removed when/if Alfresco will be on Maven Central
NOTE: The repository to be used for Alfresco Enterprise artifacts is
https://artifacts.alfresco.com/nexus/content/groups/private/. Please check
with Alfresco Support to get credentials to add to your ~/.m2/settings.xml
if you are a Enterprise customer or Partner
-->
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.alfresco.maven.plugin
</groupId>
<artifactId>
alfresco-maven-plugin
</artifactId>
<versionRange>
[1.1.1,)
</versionRange>
<goals>
<goal>set-version</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<!-- Enterprise profile, manually activated, automatically adds support for Enterprise edition development (dependencies) -->
<profile>
<id>enterprise</id>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-enterprise-repository</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
9 changes: 9 additions & 0 deletions share-site-space-templates-repo/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# Downloads the spring-loaded lib if not existing and runs repository AMP
springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.0.RELEASE/springloaded-1.2.0.RELEASE.jar

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

MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:PermSize=300m" mvn integration-test -Pamp-to-war
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@

# Sample custom content and index data location
# This will create alf_data Relative to appserver run folder
# In this default file we take the property from the POM (for compatbility with local jetty and jboss deployments) but it can also be edited here.
# In this default file we take the property from the POM (for compatibility with local tomcat and jboss deployments) but it can also be edited here.
dir.root=${alfresco.data.location}
# Allowed values are: NONE, AUTO, FULL
index.recovery.mode=NONE
# As we run embedded, we set Lucene
index.subsystem.name=lucene
# TODO: Find a better solution for indexing, as buildonly (embedded Lucene) is deprecated and going to be removed soon
#index.subsystem.name=noindex
#index.subsystem.name=solr
#index.subsystem.name=solr4
index.subsystem.name=buildonly


#dir.keystore=.
#keystore.password=storepassword
Expand All @@ -46,14 +51,8 @@ db.pool.max=100

# File servers related properties
# For local builds we disable CIFS and FTP. Edit the following property to reenable them
smb.server.enabled=false
smb.server.name=CFS_SHARE_LOCAL
smb.server.domain=mycompany.com
smb.server.bindto=127.0.0.1
smb.tcpip.port=1445
netbios.session.port=1139
netbios.name.port=1137
netbios.datagram.port=1138
ftp.server.enables=false
cifs.enabled=false

ftp.enabled=false
ftp.port=1121
ftp.authenticator=alfresco
ftp.authenticator=alfresco
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans>
<!-- This disables javascript compilation so that webscripts can be hot reloaded -->
<bean id="javaScriptProcessor" class="org.alfresco.repo.jscript.RhinoScriptProcessor" init-method="register">
<property name="name">
<value>javascript</value>
</property>
<property name="extension">
<value>js</value>
</property>
<!-- compile javascript and cache compiled scripts -->
<property name="compile">
<value>false</value>
</property>
<!-- allow sharing of sealed scopes for performance -->
<!-- disable to give each script it's own new scope which can be extended -->
<property name="shareSealedScopes">
<value>true</value>
</property>
<property name="scriptService">
<ref bean="scriptService"/>
</property>
<!-- Creates ScriptNodes which require the ServiceRegistry -->
<property name="serviceRegistry">
<ref bean="ServiceRegistry"/>
</property>
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
<property name="storePath">
<value>${spaces.company_home.childname}</value>
</property>
</bean>


</beans>
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,4 @@ log4j.logger.org.apache.pdfbox.pdmodel.font.PDCIDFont=fatal
# no index support
log4j.logger.org.alfresco.repo.search.impl.noindex.NoIndexIndexer=fatal
log4j.logger.org.alfresco.repo.search.impl.noindex.NoIndexSearchService=fatal
log4j.logger.com.ecmarchitect.test=DEBUG
log4j.logger.org.alfresco.demoamp.test=DEBUG
11 changes: 11 additions & 0 deletions share-site-space-templates-repo/tomcat/context.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${alfresco.client.war.folder}" path="${alfresco.client.contextPath}">


<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />


<Loader searchVirtualFirst="true" className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.testOutputDirectory};${project.build.directory}/${project.build.finalName}/config" />

<!--
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
<Environment override="false" type="java.lang.String" name="properties/dir.root" description="The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation."/>
Expand All @@ -8,4 +17,6 @@
<Environment override="false" type="java.lang.Boolean" name="properties/hibernate.jdbc.use_get_generated_keys" description="Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."/>
<Environment override="false" type="java.lang.String" name="properties/hibernate.default_schema" description="Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema."/>
-->


</Context>

0 comments on commit da610bc

Please sign in to comment.