Commit b2192837 authored by mindthegab's avatar mindthegab
Browse files

added parent reference

git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@14 04253f4f-3451-0410-a141-5562f1e59037
parent 35cf51ef
Loading
Loading
Loading
Loading
+25 −31
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>alfresco-extension-archetype</name>
	<comment>This archetype developed within Sourcesense aims to provide a standardized approach to development, release and deployment of 			
	Alfresco extensions (as opposed to AMP builds, to be released as a different artifact ). 
    Using standard m2 lifecycle commands (mvn compile package deploy) and generally available 	
	plugins (cargo, release, assembly) we are able to cover a very high percentage of Alfresco lifecycle common use cases.
	It can be used both with Maven2 and Ant build systems, but it must be clear that *only* the Maven2 approach provides all the automation features we will 
	describe in this website. 
	In addition to that the m2 approach provides a zero-conf approach while ant requires (as usual) manual gathering and selection of required alfresco 
	libraries and webapp (please refer to README-ant.txt for further info about the Ant build). Last but not the least, m2 build is more likely to be maintained
	and improved (especially in the likely case Alfresco moves to maven2). 
	For more details on the m2 apprach please refer instead to README Section (or directly and to README-m2.txt of the generated project.</comment>
	<projects>
	</projects>
  <name>maven-alfresco-extension-archetype</name>
  <comment>This archetype developed within Sourcesense aims to provide a standardized approach to development, release and deployment of Alfresco extensions (as opposed to AMP builds, to be released as a different artifact ). 
		Using standard m2 lifecycle commands (mvn compile package deploy) and generally available plugins (cargo, release, assembly) 
		we are able to cover a very high percentage of Alfresco lifecycle common use cases. 
		It can be used both with Maven2 and Ant build systems, but it must be clear that *only* the Maven2 approach provides all the
		automation features we will describe in this website. 
		In addition to that the m2 approach provides a zero-conf approach while ant requires (as usual) manual gathering and 
		selection of required alfresco libraries and webapp (please refer to README-ant.txt for further info about the Ant
		build). 
		Last but not the least, m2 build is more likely to be maintained and improved (especially in the likely case Alfresco moves to
		maven2). For more details on the m2 apprach please refer instead to README Section (or directly and to README-m2.txt of the generated project).</comment>
  <projects/>
  <buildSpec>
    <buildCommand>
      <name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
    </buildCommand>
    <buildCommand>
      <name>org.maven.ide.eclipse.maven2Builder</name>
			<arguments>
			</arguments>
    </buildCommand>
  </buildSpec>
  <natures>
+5 −4
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@
	<packaging>maven-archetype</packaging>
	<name>Maven alfresco Extension archetype</name>
	<url>${site.url}</url>
	<parent>
		<groupId>com.sourcesense.alfresco</groupId>
		<artifactId>maven-alfresco-archetypes</artifactId>
		<version>1.0-SNAPSHOT</version>
	</parent>
	<issueManagement>
		<system>Jira</system>
		<url>https://dev.sourcesense.com/jira/secure/BrowseProject.jspa?id=10130</url>
@@ -114,10 +119,6 @@
				<artifactId>wagon-webdav</artifactId>
				<version>1.0-beta-3</version>
			</extension>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
			</extension>
		</extensions>
		<plugins>
		<!-- 
+0 −105
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor name="maven-alfresco-extension-archetype">
  <fileSets>
    <fileSet filtered="true" encoding="UTF-8">
      <directory>src/main/java</directory>
      <includes>
        <include>**/*.java</include>
      </includes>
    </fileSet>
    <fileSet filtered="true" encoding="UTF-8">
      <directory>src/main/properties</directory>
      <includes>
        <include>**/*.txt</include>
        <include>**/*.properties</include>
      </includes>
    </fileSet>
    <fileSet filtered="true" encoding="UTF-8">
      <directory>src/main/resources</directory>
      <includes>
        <include>**/*.xml</include>
        <include>**/*.properties</include>
      </includes>
    </fileSet>
    <fileSet encoding="UTF-8">
      <directory>src/main/resources</directory>
      <includes>
        <include>**/*.js</include>
        <include>**/*.ftl</include>
      </includes>
    </fileSet>
    <fileSet filtered="true" encoding="UTF-8">
      <directory>tools/export</directory>
      <includes>
        <include>**/*.txt</include>
      </includes>
    </fileSet>
    <fileSet filtered="true" encoding="UTF-8">
      <directory>tools/ant</directory>
      <includes>
        <include>**/*.txt</include>
        <include>**/*.html</include>
        <include>**/*.jsp</include>
        <include>**/*.xml</include>
        <include>**/*.properties</include>
      </includes>
    </fileSet>
    <fileSet encoding="UTF-8">
      <directory>tools/m2</directory>
      <includes>
        <include>**/*.sh</include>
      </includes>
    </fileSet>
    <fileSet encoding="UTF-8">
      <directory>tools/ant</directory>
      <includes>
        <include>**/*.access</include>
        <include>**/*.tld</include>
        <include>**/*.xsd</include>
        <include>**/*.sample</include>
        <include>**/*.gif</include>
        <include>**/*.ftl</include>
        <include>**/*.ico</include>
        <include>**/*.MF</include>
        <include>**/*.0-community/scripts/ajax/dojo/src/crypto/LICENSE</include>
        <include>**/*.as</include>
        <include>**/*.fla</include>
        <include>**/*.pdf</include>
        <include>**/*.0-community/scripts/ajax/dojo/src/i18n/calendar/nls/README</include>
        <include>**/*.0-community/scripts/ajax/dojo/src/i18n/currency/nls/README</include>
        <include>**/*.svg</include>
        <include>**/*.sql</include>
        <include>**/*.htm</include>
        <include>**/*.password</include>
        <include>**/*.exe</include>
        <include>**/*.jar</include>
        <include>**/*.js</include>
        <include>**/*.class</include>
        <include>**/*.dtd</include>
        <include>**/*.wsdd</include>
        <include>**/*.css</include>
        <include>**/*.png</include>
        <include>**/*.wsdl</include>
        <include>**/*.jpg</include>
        <include>**/*.smd</include>
        <include>**/*.acp</include>
      </includes>
    </fileSet>
    <fileSet encoding="UTF-8">
      <directory>.externalToolBuilders</directory>
      <includes>
        <include>**/*.launch</include>
      </includes>
    </fileSet>
    <fileSet filtered="true" encoding="UTF-8">
      <directory></directory>
      <includes>
        <include>.classpath</include>
        <include>.project</include>
        <include>build.xml</include>
        <include>maven-eclipse.xml</include>
        <include>README-ANT.txt</include>
        <include>README-m2.txt</include>
      </includes>
    </fileSet>
  </fileSets>
</archetype-descriptor>
 No newline at end of file
+0 −45
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
	<id>maven-alfresco-extension-archetype</id>
	<sources></sources>
	<resources>
		<resource>src/books/manual.xml</resource>
		<resource>src/site/site.xml</resource>
		<resource>src/site/apt/index.apt.vm</resource>
		<resource>src/site/apt/book-index.apt</resource>
		<resource>src/site/fml/faq.fml</resource>
		<resource>src/main/properties/local/application.properties</resource>
		<resource>src/main/properties/local/README-properties.txt</resource>
		<resource>src/main/resources/alfresco/extension/custom-model-context.xml</resource>
		<resource>src/main/resources/alfresco/extension/custom-model.xml</resource>
		<resource>src/main/resources/alfresco/extension/custom-repository-context.xml</resource>
		<resource>src/main/resources/alfresco/extension/restore-context.xml</resource>
		<resource>src/main/resources/alfresco/extension/web-client-config-custom.xml</resource>
		<resource>src/main/resources/alfresco/extension/webclient.properties</resource>
		<resource>tools/ant/tasks/tomcat-tasks.properties</resource>
		<resource>tools/ant/tasks/tomcat-tasks.xml</resource>
		<resource>tools/ant/ant-bootstrap.sh</resource>
		<resource>tools/m2/m2-bootstrap.sh</resource>
		<resource>README-ANT.txt</resource>
		<resource>README-m2.txt</resource>
		<resource>build.xml</resource>
		<resource>pom.xml</resource>
		<resource>src/main/resources/alfresco/extension/custom-model-context.xml</resource>
		<resource>src/main/resources/alfresco/extension/custom-model.xml</resource>
		<resource>src/main/resources/alfresco/extension/custom-repository-context.xml</resource>
		<resource>src/main/resources/alfresco/extension/file-servers-custom.xml</resource>
		<resource>src/main/resources/alfresco/extension/ldap-authentication-context.xml</resource>
		<resource>src/main/resources/alfresco/extension/ldap-synchronisation-context.xml</resource>
		<resource>src/main/resources/alfresco/extension/restore-context.xml</resource>
		<resource>src/main/resources/alfresco/extension/web-client-config-custom.xml</resource>
		<resource>src/main/resources/alfresco/extension/webclient.properties</resource>
		<resource>src/main/resources/log4j.properties</resource>
		<resource>src/main/webapp/WEB-INF/README-WEB-INF.txt</resource>
		<resource>src/main/webapp/WEB-INF/faces-config-custom.xml</resource>
		<resource>tools/ant/tasks/tomcat-tasks.properties</resource>
		<resource>tools/ant/tasks/tomcat-tasks.xml</resource>
		<resource>tools/export/testRestoreVersion/README-restore.txt</resource>
		<resource>tools/mysql/db_remove.sql</resource>
		<resource>tools/mysql/db_setup.sql</resource>
	</resources>
</archetype>
 No newline at end of file
+0 −78
Original line number Diff line number Diff line
#    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.

Sourcesense Alfresco Customization (Ant build):
------------------------------------------------

The project can be built by the means of two build systems:

- Ant (suggested for fast startup and offline building)
- Maven2 (suggested for structured team work and release)

Both build systems provide Alfresco customized build and deploy on tomcat.
WARNING: Make sure you run tomcat with appropriate JVM size (JAVA_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m")

Ant Build Prerequisites:
------------------------
In order the build to work properly and resolve alfresco jar and war dependencies, 
you have to download a version of alfresco in the folder

$PROJECT_HOME/tools/ant/deps/alfresco

or conveniently run the script:

$PROJECT_HOME/tools/ant/ant-boostrap.sh

which basically downloads a specified (Community) Alfresco distribution from Sourcesense public Maven repositories,
and unpacks it in the mentioned folder. The WEB-INF/lib jars is added to build classpath.


Alfresco ant WAR build:
-----------------------

- use build.xml in the root folder
- configure your BUILDTIME/RUNTIME properties in 
  src/main/properties/<yourEnv>/application.properties and build with -Denv=<yourEnv> 
  (you can either commit this file or add it to svn:ignore for local usage)

----
NB: Before you can actually use the build you have to specify where to find the alfresco war (this is not needed for maven build who retrieves dependencies from public sourcesense maven repo, in case of community artifacts, from private maven repo for enterprise artifacts). To do so please create a build.properties file on the project root and fill it with the property:

alfresco.dir

pointing to the exploded war directory of the alfresco instance you want to use 
---


Common usage tasks:
-------------------

ant clean package
ant install (in tomcat)
ant remove (from tomcat)

from the command line calls the default target (package) .

For fast one-shot deploy: ANT_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" ant [remove] install

FAQ:
----

WARNING: the ant tomcat plugin is pretty memory intensive so please use ant with appropriate JVM memory size (ANT_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m")


TODO:
----
- Support content restore
Loading