mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-05-26 17:25:11 +00:00
-- improved documentation a lot
-- added release properties -- removed parent site generation git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@45 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
parent
a7b2906f8f
commit
42468dd08a
@ -51,6 +51,20 @@
|
||||
<version>2.0-alpha-3</version>
|
||||
</extension>
|
||||
</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>
|
||||
<distributionManagement>
|
||||
<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
|
||||
|
||||
|
||||
SOON TO COME:
|
||||
------------
|
||||
|
||||
- Shared configuration (site + release + plugin config) with maven-alfresco-extension-archetype via super POM
|
||||
|
||||
|
||||
PROJECT LAYOUT
|
||||
--------------
|
||||
|
||||
src --------------------------------------------------------> (source folder)
|
||||
|
|
||||
|__ main ___ __ resources --------------------------> mapped in the classpath (alfresco module config goes here, as well as other 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
|
||||
|__ 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
|
||||
@ -92,38 +89,7 @@ src --------------------------------------------------------> (source folder)
|
||||
| | |
|
||||
| | |__ local -------------> default application.properties
|
||||
| |
|
||||
|
||||
|
|
||||
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://...
|
@ -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
|
@ -6,7 +6,8 @@
|
||||
<question>How do I build an AMP?</question>
|
||||
<answer>
|
||||
<p>
|
||||
Just Run <verbatim> mvn clean package </verbatim>
|
||||
Just Run
|
||||
<source>mvn clean package</source>
|
||||
</p>
|
||||
</answer>
|
||||
</faq>
|
||||
@ -15,7 +16,7 @@
|
||||
<answer>
|
||||
<p>
|
||||
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>
|
||||
</answer>
|
||||
</faq>
|
||||
@ -23,11 +24,9 @@
|
||||
<question>Are AMP transitive dependencies supported?</question>
|
||||
<answer>
|
||||
<p>
|
||||
Yes, they are, both from AMP and WAR packaging projects.
|
||||
For AMP projects this will turn out into having a final built AMP
|
||||
which contains all the chain of AMPs the current AMP is depending upon.
|
||||
For WAR projects all AMPs will be unpacked in the proper position
|
||||
same as the MMT would do.
|
||||
Yes, they are, both from AMP and WAR packaging projects. For AMP projects this will turn out into having a final built AMP which
|
||||
contains all the chain of AMPs the current AMP is depending upon. For WAR projects all AMPs will be unpacked in the proper
|
||||
position same as the MMT would do.
|
||||
</p>
|
||||
</answer>
|
||||
</faq>
|
||||
@ -35,12 +34,39 @@
|
||||
<question>Is MMT needed with maven?</question>
|
||||
<answer>
|
||||
<p>
|
||||
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 <a href="https://forge.alfresco.com/projects/maven4alfresco" target="_blank" >maven-amp-plugin</a> for
|
||||
managing and processing AMP lifecycle, making MMT obsolete.
|
||||
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
|
||||
<a href="https://forge.alfresco.com/projects/maven4alfresco" target="_blank">maven-amp-plugin</a>
|
||||
for managing and processing AMP lifecycle, making MMT obsolete.
|
||||
</p>
|
||||
</answer>
|
||||
</faq>
|
||||
</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>
|
@ -23,10 +23,17 @@
|
||||
<menu name="M2 Alfresco AMP Archetype">
|
||||
<item name="Introduction" href="/index.html"/>
|
||||
<item name="README" href="/readme.html"/>
|
||||
<item name="How to" href="http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven"/>
|
||||
<item name="Roadmap" href="http://forge.alfresco.com/docman/view.php/90/1645/ROADMAP.txt"/>
|
||||
<item name="Generated Project Layout " href="layout.html"/>
|
||||
<item name="FAQ" href="faq.html"/>
|
||||
</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>
|
||||
</project>
|
||||
|
@ -60,6 +60,20 @@
|
||||
-->
|
||||
|
||||
</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>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
|
@ -0,0 +1,44 @@
|
||||
-----
|
||||
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
|
||||
| | |
|
||||
| | |__ alfresco/extension ---> alfresco overriding Spring contexts
|
||||
| |
|
||||
| |__ properties -------------------------> environment aware application properties files
|
||||
| | |
|
||||
| | |__ local -------------> default application.properties
|
||||
| |
|
||||
| |__ java -------------------------------> customization java classes
|
||||
| |
|
||||
| |__ webapp -----------------------------> alfresco webapp overlay folder - this folder is overlayed (so may overwrite alfresco war)
|
||||
| |
|
||||
| |__ WEB-INF ----------------> drop in this folder WEB-INF custom / overwriting files (e.g. faces-config-custom.xml / web.xml)
|
||||
|
|
||||
|__ test
|
||||
|
||||
tools --
|
||||
|__ ant ---------------------------------------------> ant tools
|
||||
|__ m2 ---------------------------------------------> maven2 tools
|
||||
|__ export ------------------------------------------> support folder for automatic restore (drop acp+xml files here)
|
||||
|__ mysql -------------------------------------------> mysql setup/remove scripts, filtered based on the profile into
|
||||
|
||||
target - Project build dir
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
@ -64,15 +64,9 @@ Features (maven2 only):
|
||||
To test an example typing <<<mvn site:run>>> will run your site in jetty embedded on port 8080, with redeployment of site source files.
|
||||
To stage the site just type <<<mvn site:stage>>> and to deploy to remote site location, guess what, <<<mvn site:deploy>>>
|
||||
|
||||
TODO:
|
||||
|
||||
See ${svn.url}/TODO.txt
|
||||
|
||||
|
||||
ROADMAP:
|
||||
|
||||
See ${svn.url}/ROADMAP.txt
|
||||
|
||||
* <<Depenendency on AMP>>
|
||||
Using the maven-amp-plugin as pre configured in the archetype we're able to handle
|
||||
AMP transitive dependencies and having them packaged in the WAR
|
||||
|
||||
REFERENCES:
|
||||
|
||||
|
@ -6,7 +6,8 @@
|
||||
</skin>
|
||||
<poweredBy>
|
||||
<logo name="Maven" href="http://maven.apache.org" img="http://maven.apache.org/images/logos/maven-feather.png" />
|
||||
<logo name="Alfresco - Open source ECM" img="http://alfresco.com/assets/images/icons/powered_by_alfresco.gif" href="http://www.sourcesense.com" />
|
||||
<logo name="Alfresco - Open source ECM" img="http://alfresco.com/assets/images/icons/powered_by_alfresco.gif"
|
||||
href="http://www.sourcesense.com" />
|
||||
</poweredBy>
|
||||
<publishDate position="navigation-bottom" format="MM-dd-yy" />
|
||||
<bannerLeft>
|
||||
@ -23,11 +24,17 @@
|
||||
<menu name="M2 Alfresco Extension Archetype">
|
||||
<item name="Introduction" href="/index.html" />
|
||||
<item name="README" href="/readme.html" />
|
||||
<item name="Generated Project Layout " href="layout.html"/>
|
||||
<item name="How To" href="http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven" />
|
||||
<item name="Roadmap" href="http://forge.alfresco.com/docman/view.php/90/1645/ROADMAP.txt"/>
|
||||
<item name="FAQ" href="faq.html" />
|
||||
</menu>
|
||||
|
||||
<menu name="See also">
|
||||
<item name="Maven Alfresco AMP Archetype" href="http://repository.sourcesense.com/maven2-sites/maven-alfresco-amp-archetype" />
|
||||
<item name="Maven AMP Plugin" href="http://repository.sourcesense.com/maven2-sites/maven-amp-plugin" />
|
||||
<item name="Third party how to" href="http://www.cybermagic.co.nz/wiki/display/CM/Building+Alfresco+apps+with+Maven" />
|
||||
</menu>
|
||||
|
||||
<menu ref="reports" />
|
||||
</body>
|
||||
</project>
|
||||
|
@ -22,7 +22,6 @@
|
||||
<modules>
|
||||
<module>maven-alfresco-amp-archetype</module>
|
||||
<module>maven-alfresco-extension-archetype</module>
|
||||
<module>maven-alfresco-archetypes-base</module>
|
||||
</modules>
|
||||
<properties>
|
||||
<svn.base.url>https://maven-alfresco-archetypes.googlecode.com/svn</svn.base.url>
|
||||
@ -129,18 +128,6 @@
|
||||
<fromDeveloperId>g.columbro</fromDeveloperId>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<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:site site:deploy</goals>
|
||||
<tagBase>${svn.tags.url}</tagBase>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
@ -148,7 +135,7 @@
|
||||
<!-- useEditMode>true</useEditMode>-->
|
||||
<dryRun>true</dryRun>
|
||||
<preparationGoals>clean package</preparationGoals>
|
||||
<goals>deploy site:site site:deploy</goals>
|
||||
<goals>deploy</goals>
|
||||
<tagBase>${svn.tags.url}</tagBase>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -1,31 +0,0 @@
|
||||
<project>
|
||||
<skin>
|
||||
<groupId>org.apache.maven.skins</groupId>
|
||||
<artifactId>maven-stylus-skin</artifactId>
|
||||
<version>1.0</version>
|
||||
</skin>
|
||||
<poweredBy>
|
||||
<logo name="Maven" href="http://maven.apache.org" img="http://maven.apache.org/images/logos/maven-feather.png"/>
|
||||
<logo name="Alfresco - Open source ECM" img="http://alfresco.com/assets/images/icons/powered_by_alfresco.gif" href="http://www.sourcesense.com" />
|
||||
</poweredBy>
|
||||
<publishDate position="navigation-bottom" format="MM-dd-yy"/>
|
||||
<bannerLeft>
|
||||
<name>Maven alfresco archetypes - v. ${project.version}</name>
|
||||
<href>${site_site_url}</href>
|
||||
<src>http://www.sourcesense.com/resources/images/top.gif</src>
|
||||
</bannerLeft>
|
||||
<body>
|
||||
<links>
|
||||
<item name="Maven" href="http://maven.apache.org/"/>
|
||||
<item name="Apache" href="http://www.apache.org/"/>
|
||||
</links>
|
||||
|
||||
|
||||
<menu name="Modules">
|
||||
<item name="Maven Alfresco AMP Archetype" href="../maven-alfresco-amp-archetype"/>
|
||||
<item name="Maven Alfresco Eextension Archetype" href="../maven-alfresco-extension-archetype"/>
|
||||
</menu>
|
||||
<menu ref="reports"/>
|
||||
|
||||
</body>
|
||||
</project>
|
Loading…
x
Reference in New Issue
Block a user