mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-10-01 14:41:57 +00:00
-- improved documentation a lot
-- added release properties -- removed parent site generation git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk/maven-alfresco-archetypes/maven-alfresco-amp-archetype@45 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
14
pom.xml
14
pom.xml
@@ -51,6 +51,20 @@
|
|||||||
<version>2.0-alpha-3</version>
|
<version>2.0-alpha-3</version>
|
||||||
</extension>
|
</extension>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<version>2.0-beta-7</version>
|
||||||
|
<configuration>
|
||||||
|
<!-- useEditMode>true</useEditMode>-->
|
||||||
|
<!-- dryRun>true</dryRun-->
|
||||||
|
<preparationGoals>clean package</preparationGoals>
|
||||||
|
<goals>deploy site:depoy changes:announcement-mail</goals>
|
||||||
|
<tagBase>${svn.tags.url}</tagBase>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
|
@@ -64,20 +64,17 @@ all AMP and WAR dependencies specified) also with a sensible default 'alfresco/e
|
|||||||
default alfresco run. Find these test configuaration files in 'src/test/resources' and environment dependent properties in src/test/properties/<env>/application.properties
|
default alfresco run. Find these test configuaration files in 'src/test/resources' and environment dependent properties in src/test/properties/<env>/application.properties
|
||||||
|
|
||||||
|
|
||||||
SOON TO COME:
|
|
||||||
------------
|
|
||||||
|
|
||||||
- Shared configuration (site + release + plugin config) with maven-alfresco-extension-archetype via super POM
|
|
||||||
|
|
||||||
|
|
||||||
PROJECT LAYOUT
|
PROJECT LAYOUT
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
src --------------------------------------------------------> (source folder)
|
src --------------------------------------------------------> (source folder)
|
||||||
|
|
|
|
||||||
|__ main ___ __ resources --------------------------> mapped in the classpath (alfresco module config goes here, as well as other classpath resources)
|
|__ main ___ __ resources --------------------------> mapped in the classpath. Add here classpath resources
|
||||||
| | | NB: best practice groupId.artifactId=moduleId is used by the archetype and by the AMP unpacker
|
| |
|
||||||
| | |__ ex: alfresco/module/com.sourcesense.${artifactId} ---> Example Alfresco module config
|
| |__ config----- alfresco module config goes here.
|
||||||
|
| | | Get's copied (by best practice) by build into package alfresco/module/groupId.artifactId.
|
||||||
|
| | | This convention is used by the archetype and by the AMP unpacker.
|
||||||
|
| | |__ ex: alfresco/module/com.sourcesense.alfresco.mymodule ---> Example Alfresco module config
|
||||||
| |
|
| |
|
||||||
| |
|
| |
|
||||||
| |__ java -------------------------------> customization java classes
|
| |__ java -------------------------------> customization java classes
|
||||||
@@ -92,38 +89,7 @@ src --------------------------------------------------------> (source folder)
|
|||||||
| | |
|
| | |
|
||||||
| | |__ local -------------> default application.properties
|
| | |__ local -------------> default application.properties
|
||||||
| |
|
| |
|
||||||
|
|
|
||||||
target - Project build dir
|
target - Project build dir
|
||||||
|
|
||||||
|
|
||||||
FAQ:
|
|
||||||
----
|
|
||||||
--- Eclipse configuration
|
|
||||||
-Run ' mvn eclipse:eclipse '
|
|
||||||
-hit "Refresh" on your Eclipse project
|
|
||||||
|
|
||||||
--- Db access problems:
|
|
||||||
Remember to setup appropriate permissions for selected db / build profile.
|
|
||||||
You can either edit accordingly and then run: mysql -u root < tools/mysql/db_setup.sql
|
|
||||||
|
|
||||||
or if you use POM property 'alfresco.db.name' you have sql files already filtered (after process-resources phase) in
|
|
||||||
|
|
||||||
mysql -u root -p < target/classes/tools/[db_setup,db_remove].sql
|
|
||||||
|
|
||||||
--- Out of memory errors:
|
|
||||||
Run your build with :
|
|
||||||
MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn ... ...
|
|
||||||
|
|
||||||
--- Content integrity errors on restore running with jetty embedded
|
|
||||||
Did you remove also alf_data_jetty apart from the alf_jetty db ?
|
|
||||||
|
|
||||||
--- Release Problems with LC_ALL
|
|
||||||
If underlying svn complains about LC_ALL variable please consider running your release prepending:
|
|
||||||
LC_ALL="C" (macosx environments, see http://svn.haxx.se/users/archive-2006-07/0320.shtml)
|
|
||||||
|
|
||||||
-- Deploy a generally available AMP into a maven repo for dependency usage
|
|
||||||
|
|
||||||
mvn deploy:deploy-file -DrepositoryId=repo
|
|
||||||
-Dfile=/Users/youruser/projectz/alfresco/alfresco-recordsmanagement-2.1.0.amp
|
|
||||||
-DgroupId=org.alfresco.community -DartifactId=recordsmanagement -Dversion=2.1.0
|
|
||||||
-Dpackaging=amp -Durl=scp://...
|
|
43
src/site/apt/layout.apt.vm
Normal file
43
src/site/apt/layout.apt.vm
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
-----
|
||||||
|
Archetype Project Generated Layout
|
||||||
|
-----
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
What do I have when I created the project?
|
||||||
|
|
||||||
|
You will encounter an AMP project structure, filtered with values you provided in creation phase,
|
||||||
|
which has the following layout:
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
src --------------------------------------------------------> (source folder)
|
||||||
|
|
|
||||||
|
|__ main ___ __ resources --------------------------> mapped in the classpath. Add here classpath resources
|
||||||
|
| |
|
||||||
|
| |__ config----- alfresco module config goes here.
|
||||||
|
| | | Get's copied (by best practice) by build into package alfresco/module/groupId.artifactId.
|
||||||
|
| | | This convention is used by the archetype and by the AMP unpacker.
|
||||||
|
| | |__ ex: alfresco/module/com.sourcesense.alfresco.mymodule ---> Example Alfresco module config
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |__ java -------------------------------> customization java classes
|
||||||
|
| |
|
||||||
|
| |__ webapp -----------------------------> AMP overlay folder - this folder is overlayed (so may overwrite other dependent AMPs)
|
||||||
|
|
||||||
|
|
|
||||||
|
|__ test __ __ resources _
|
||||||
|
| | |
|
||||||
|
| | |__ alfresco/extension ---> alfresco overriding Spring contexts
|
||||||
|
| |
|
||||||
|
| |__ properties -------------------------> environment aware application properties files
|
||||||
|
| | |
|
||||||
|
| | |__ local -------------> default application.properties
|
||||||
|
| |
|
||||||
|
|
|
||||||
|
target - Project build dir
|
||||||
|
|
||||||
|
------------------------------------------------------------------
|
||||||
|
|
@@ -0,0 +1,56 @@
|
|||||||
|
-----
|
||||||
|
Alfresco maven2 AMP lifecycle
|
||||||
|
-----
|
||||||
|
|
||||||
|
|
||||||
|
What an AMP is?
|
||||||
|
|
||||||
|
Alfresco Module packages are software modules to be added on top of the Alfresco ECM
|
||||||
|
platform. \
|
||||||
|
As opposed to Alfresco Extensions (which can be generated with {{{http://repository.sourcesense.com/maven2-sites/maven-alfresco-extension-archetype} maven-alfresco-extension-archetype }})
|
||||||
|
which are meant to mainly produce a single customized build of Alfresco, an AMP is a small
|
||||||
|
ZIP file primary product of the build lifecyle defined by the
|
||||||
|
|
||||||
|
|
||||||
|
---------
|
||||||
|
<packaging>amp</packaging>
|
||||||
|
---------
|
||||||
|
|
||||||
|
POM property. Use this build to create and modules which then can be used as dependencies
|
||||||
|
by a maven-alfresco-extension generated project (e.g. enterprise Alfresco WAR customization).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
One command quickstart
|
||||||
|
|
||||||
|
|
||||||
|
-------------
|
||||||
|
$ MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn clean integration-test -P webapp
|
||||||
|
----------------
|
||||||
|
|
||||||
|
|
||||||
|
will runns the jetty embedded with overlayed the currently developed AMP
|
||||||
|
|
||||||
|
|
||||||
|
FEATURES:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AMP archetype + plugin features:
|
||||||
|
|
||||||
|
* AMP customized build : <<<mvn clean package>>>
|
||||||
|
|
||||||
|
* Alfresco webapp integrationt test via war creation and embedded run <<<mvn clean integration-test -P webapp>>>
|
||||||
|
|
||||||
|
* Install/deployment of Alfresco compatible AMPs on a m2 repo <<< mvn install / deploy [ params ] >>>
|
||||||
|
|
||||||
|
* using the {{{http://repository.sourcesense.com/maven2-sites/maven-amp-plugin} maven-amp-plugin}} WAR can depend on AMP artifacts and have them overlayed within the maven lifecycle, avoiding the boring MMT run.
|
||||||
|
|
||||||
|
* AMP dependencies management: <<<mvn clean package>>> can take care of overlay AMP deps
|
||||||
|
|
||||||
|
* Error safe single sourcing of POM properties <<<groupId>>> and <<<artifactId>>> used to copy config in the proper package and to ensure consistency
|
||||||
|
|
||||||
|
|
||||||
|
Specific dependencies and different Alfresco versions can be specified in 'webapp' profile dependecies. Alfresco test webapp is overlayed (apart with
|
||||||
|
all AMP and WAR dependencies specified) also with a sensible default 'alfresco/extension' folder to have a clean safe reproduceable and portable
|
||||||
|
default alfresco run. Find these test configuaration files in 'src/test/resources' and environment dependent properties in src/test/properties/<env>/application.properties
|
||||||
|
@@ -5,9 +5,10 @@
|
|||||||
<faq id="build">
|
<faq id="build">
|
||||||
<question>How do I build an AMP?</question>
|
<question>How do I build an AMP?</question>
|
||||||
<answer>
|
<answer>
|
||||||
<p>
|
<p>
|
||||||
Just Run <verbatim> mvn clean package </verbatim>
|
Just Run
|
||||||
</p>
|
<source>mvn clean package</source>
|
||||||
|
</p>
|
||||||
</answer>
|
</answer>
|
||||||
</faq>
|
</faq>
|
||||||
<faq id="test">
|
<faq id="test">
|
||||||
@@ -15,7 +16,7 @@
|
|||||||
<answer>
|
<answer>
|
||||||
<p>
|
<p>
|
||||||
You can run Jetty embedded in maven by typing
|
You can run Jetty embedded in maven by typing
|
||||||
<verbatim>mvn clean integration-test -P webapp</verbatim>
|
<source>mvn clean integration-test -P webapp</source>
|
||||||
</p>
|
</p>
|
||||||
</answer>
|
</answer>
|
||||||
</faq>
|
</faq>
|
||||||
@@ -23,11 +24,9 @@
|
|||||||
<question>Are AMP transitive dependencies supported?</question>
|
<question>Are AMP transitive dependencies supported?</question>
|
||||||
<answer>
|
<answer>
|
||||||
<p>
|
<p>
|
||||||
Yes, they are, both from AMP and WAR packaging projects.
|
Yes, they are, both from AMP and WAR packaging projects. For AMP projects this will turn out into having a final built AMP which
|
||||||
For AMP projects this will turn out into having a final built AMP
|
contains all the chain of AMPs the current AMP is depending upon. For WAR projects all AMPs will be unpacked in the proper
|
||||||
which contains all the chain of AMPs the current AMP is depending upon.
|
position same as the MMT would do.
|
||||||
For WAR projects all AMPs will be unpacked in the proper position
|
|
||||||
same as the MMT would do.
|
|
||||||
</p>
|
</p>
|
||||||
</answer>
|
</answer>
|
||||||
</faq>
|
</faq>
|
||||||
@@ -35,12 +34,39 @@
|
|||||||
<question>Is MMT needed with maven?</question>
|
<question>Is MMT needed with maven?</question>
|
||||||
<answer>
|
<answer>
|
||||||
<p>
|
<p>
|
||||||
No, it is not. The whole point of it is getting rid of the annoying
|
No, it is not. The whole point of it is getting rid of the annoying non integrated in the lifecycle MMT run. We created the
|
||||||
non integrated in the lifecycle MMT run.
|
<a href="https://forge.alfresco.com/projects/maven4alfresco" target="_blank">maven-amp-plugin</a>
|
||||||
We created the <a href="https://forge.alfresco.com/projects/maven4alfresco" target="_blank" >maven-amp-plugin</a> for
|
for managing and processing AMP lifecycle, making MMT obsolete.
|
||||||
managing and processing AMP lifecycle, making MMT obsolete.
|
|
||||||
</p>
|
</p>
|
||||||
</answer>
|
</answer>
|
||||||
</faq>
|
</faq>
|
||||||
</part>
|
</part>
|
||||||
|
<part id="Developer">
|
||||||
|
<title>Developer questions</title>
|
||||||
|
<faq id="Eclipse">
|
||||||
|
<question>How do I configure Eclipse?</question>
|
||||||
|
<answer>
|
||||||
|
<ul>
|
||||||
|
<li>Run <source> mvn eclipse:eclipse </source></li>
|
||||||
|
<li>hit "Refresh" on your Eclipse project</li>
|
||||||
|
</ul>
|
||||||
|
</answer>
|
||||||
|
</faq>
|
||||||
|
<faq id="Memory">
|
||||||
|
<question>Why I get PermGen or HeapSpace errors</question>
|
||||||
|
<answer>
|
||||||
|
<p>Run your build with : <source>MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn ...</source> </p>
|
||||||
|
</answer>
|
||||||
|
</faq>
|
||||||
|
<faq id="AMPs">
|
||||||
|
<question>How do I deploy a generally available AMP into a maven repo for dependency usage</question>
|
||||||
|
<answer>
|
||||||
|
<source>
|
||||||
|
mvn deploy:deploy-file -DrepositoryId=repo -Dfile=/Users/youruser/projectz/alfresco/alfresco-recordsmanagement-2.1.0.amp
|
||||||
|
-DgroupId=org.alfresco.community -DartifactId=recordsmanagement -Dversion=2.1.0 -Dpackaging=amp -Durl=scp://...
|
||||||
|
</source>
|
||||||
|
</answer>
|
||||||
|
</faq>
|
||||||
|
</part>
|
||||||
|
|
||||||
</faqs>
|
</faqs>
|
@@ -23,10 +23,17 @@
|
|||||||
<menu name="M2 Alfresco AMP Archetype">
|
<menu name="M2 Alfresco AMP Archetype">
|
||||||
<item name="Introduction" href="/index.html"/>
|
<item name="Introduction" href="/index.html"/>
|
||||||
<item name="README" href="/readme.html"/>
|
<item name="README" href="/readme.html"/>
|
||||||
<item name="How to" href="http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven"/>
|
<item name="Generated Project Layout " href="layout.html"/>
|
||||||
<item name="Roadmap" href="http://forge.alfresco.com/docman/view.php/90/1645/ROADMAP.txt"/>
|
|
||||||
<item name="FAQ" href="faq.html"/>
|
<item name="FAQ" href="faq.html"/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
|
<menu name="See also">
|
||||||
|
<item name="Maven Alfresco Extension Archetype" href="http://repository.sourcesense.com/maven2-sites/maven-alfresco-extension-archetype"/>
|
||||||
|
<item name="Maven AMP Plugin" href="http://repository.sourcesense.com/maven2-sites/maven-amp-plugin"/>
|
||||||
|
<item name="Alfresco AMP files" href="http://wiki.alfresco.com/wiki/AMP_Files" />
|
||||||
|
</menu>
|
||||||
|
|
||||||
|
<menu ref="reports" />
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</project>
|
</project>
|
||||||
|
Reference in New Issue
Block a user