diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/pom.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/pom.xml
deleted file mode 100644
index 345dbd4a..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
- 4.0.0
- maven-alfresco-amp-archetype
- maven-archetype
- Maven Alfresco Amp Archetype
-
- This archetype aims to provide a standardized approach to development, release and deployment of Alfresco AMPs (as opposed to Alfresco
- extensions, released as a different artifact )
-
-
- org.alfresco
- maven-alfresco-archetypes
- 4.0.0-SNAPSHOT
- ../pom.xml
-
-
-
-
- org.apache.maven.archetype
- archetype-packaging
- 2.0
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/changes/changes.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/changes/changes.xml
deleted file mode 100644
index 7152f27d..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/changes/changes.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- Maven Alfresco AMP archetype
- Gabriele Columbro
-
-
-
- Support for file-mappings.properties
- FTL content was destroyed
- META-INF not properly included
- mAmpResources was ignored
- Broken dependency
- Cannot find amp-plugin anywhere
- h2 support
- Eclipse Support
- Add alfresco-core.jar provided
- Documentation update
- Add h2 params to avoid DB locking at startup
- Update archetypes to use Alfresco 4.0b
- Align groupId to org.alfresco
-
-
-
- Moved to http://maven.alfresco.com
-
-
- Fixed version of maven-buildnumber-plugin (for compatibility issues with maven 2.2.1)
-
-
- Documented versioning scheme and maven-nosnapshot-plugin
-
-
-
-
- Added full AMP lifecycle management
-
-
-
-
- Updated to Alfresco 3.2r artifacts
-
-
- Updated to new Sourcesense repository
-
-
-
-
- Added full AMP lifecycle management
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
deleted file mode 100644
index 0ecbb6ab..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- src/main/webapp
-
- **/*.txt
- **/*.jsp
-
-
-
- src/main/config
-
- **/*.xml
- **/*.properties
-
-
-
- src/main/resources
-
- **/*.xml
- **/*.properties
-
-
-
- src/main/webapp
-
- **/*.js
- **/*.gif
- **/*.css
-
-
-
- src/test/properties
-
- **/*.properties
-
-
-
- src/test/resources
-
- **/*.xml
- **/*.properties
-
-
-
-
-
- module.properties
- README.txt
- TODO.txt
- jetty/*.xml
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt
deleted file mode 100644
index d9a07f41..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-======================================================================
-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.
-======================================================================
-
-
----------------------------------------
-Archetype Release: Archetype - maven-amp-archetype
-Author: gabriele.columbro@alfresco.com
-http://forge.alfresco.com/m2alfresco
-
-Contacts:
-- maven-alfresco@googlegroups.com (developer)
-
-See Also:
-http://wiki.alfresco.com/wiki/Module_Management_Tool
------------------------------------------------------
-
-
-
-M2 Instructions for Alfresco AMP:
---------------------------------
-
-The project can be built using Maven2.
-
-
-Alfresco maven2 AMP build
--------------------------
-
-
-One command quickstart:
-$ MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn clean integration-test -P webapp
-
-Runs the jetty embedded with overlayed the currently developed AMP
-
-
-FEATURES:
----------
-
-- AMP customized build : mvn clean package
-- AMP dependencies management: 'mvn clean package' can take care of overlay deps
-- Alfresco webapp integration via war creation mvn clean package -P webapp
-- jetty embedded build for fast testing, mvn clean integration-test -P webapp
-- install/deployment of Alfresco compatible AMPs on a m2 repo mvn install / deploy [ params ]
-
-- using the maven-amp-plugin (http://forge.alfresco.com/maven4alfresco) WAR can depend on AMP artifacts and have them overlayed within the maven
-lifecycle, avoiding the boring MMT run.
-
-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//application.properties
-
-
-PROJECT 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/artifactId.
- | | | This convention is used by the archetype and by the AMP unpacker.
- | | |__ ex: alfresco/module/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
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/TODO.txt b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/TODO.txt
deleted file mode 100644
index 189957a8..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/TODO.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-======================================================================
-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.
-======================================================================
-
-Known Issues:
--------------
-
-
-
-MAJOR:
-
-
-MINOR:
-- cannot use maven SNAPSHOT versioning as it's copied over in the module.properties
-file and not accepted by alfresco as valid module version number
-
-
-TRIVIAL:
-
-IMPROVEMENTS:
-- maven-sql-plugin to autocreate jetty db
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/jetty/jetty-env.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/jetty/jetty-env.xml
deleted file mode 100644
index 41e56aaa..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/jetty/jetty-env.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
- jdbc/dataSource
-
-
- ${alfresco.db.url}
- ${alfresco.db.username}
- ${alfresco.db.password}
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/module.properties b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/module.properties
deleted file mode 100644
index 20b503f2..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/module.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-# 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.
-
-
-
-# SDK Sample module
-
-# ==== Beginning of Alfresco required/optional properties ====== #
-
-module.id=${project.artifactId}
-#module.aliases=myModule-123, my-module
-module.title=${project.name}
-module.description=${project.description}
-module.version=${noSnapshotVersion}.${buildNumber}
-
-# The following optional properties can be used to prevent the module from being added
-# to inappropriate versions of the WAR file.
-# module.repo.version.min=2.0
-# module.repo.version.max=2.1
-
-# FIXME: This dependencies should come out of mvn dependencies on amp
-
-# The following describe dependencies on other modules
-# Depends on net.sf.myproject.module.SupportModuleA version ${version} or later
-# module.depends.net.sf.myproject.module.SupportModuleA=${version}-*
-# Depends on net.sf.myproject.module.SupportModuleA version ${version} to 2.0
-# module.depends.net.sf.myproject.module.SupportModuleB=${version}-2.0
-# Depends on net.sf.myproject.module.SupportModuleC - any version
-# module.depends.net.sf.myproject.module.SupportModuleB=*
-
-
-# ==== End of Alfresco required/optional properties ======= #
-
-
-# ==== Beginning of module required properties/optional ====== #
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/pom.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644
index 4cff7a9e..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/pom.xml
+++ /dev/null
@@ -1,528 +0,0 @@
-
-
-
- 4.0.0
- ${groupId}
- ${artifactId}
- amp
- Maven Alfresco AMP Packaging Sample
-
- ${version}
- Test AMP project
-
-
- alfresco-public-snapshots
- https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
-
- true
- daily
-
-
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
-
-
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
-
- alfresco-public-snapshots
- https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
-
- true
- daily
-
-
-
-
-
- local
-
- ${project.artifactId}-webapp
-
- 4.0.b
- community
- ./alf_data_jetty
- alf_jetty
- alfresco
- alfresco
- MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=TRUE
- jdbc:h2:${alfresco.data.location}/h2_data/${alfresco.db.name};${alfresco.db.params}
- org.h2.jdbcx.JdbcDataSource
- error
-
-
-
- debug
- 3.0.5.RELEASE
-
-
-
-
- org.alfresco
- alfresco-core
- ${alfresco.version}
- provided
- ${alfresco.edition}
-
-
- org.alfresco
- alfresco-repository
- ${alfresco.version}
- provided
- ${alfresco.edition}
-
-
- org.springframework
- spring-core
- ${spring.version}
- provided
-
-
- org.springframework
- spring-beans
- ${spring.version}
- provided
-
-
-
-
-
-
-
- scm:svn:http://domain.com/svn/trunk/
- scm:svn:https://${user.name}@domain.com/svn/trunk/
- http://domain.com/svn/trunk/
-
-
-
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 2.5
-
- UTF-8
-
-
- ftl
-
-
-
-
- maven-nosnapshot-plugin
- org.alfresco.maven
- 0.0.8
-
-
- default
- initialize
-
- strip
-
-
-
-
-
- org.codehaus.mojo
- buildnumber-maven-plugin
- 1.0
-
-
- validate
-
- create
-
-
-
-
- 1
- false
- false
-
-
-
- maven-compiler-plugin
-
- 1.6
- 1.6
-
-
-
- org.alfresco.maven.plugin
- maven-amp-plugin
- 3.0.4
- true
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
- true
- src/main/resources
-
- **README-*
-
-
-
-
- true
- src/main/config
- alfresco/module/${project.artifactId}
-
- **README-*
-
-
-
-
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- [2.0,)
-
- copy-dependencies
-
-
-
-
-
-
-
-
- org.alfresco.maven
- maven-nosnapshot-plugin
- [0.0,)
-
- strip
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- webapp
-
-
- ${project.basedir}/src/test/properties/${env}/alfresco-global.properties
-
- jetty:run-exploded
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
- unpack-amps
- process-resources
-
- unpack-dependencies
-
-
- amp
- ${project.build.directory}/${webapp.name}
- META*
-
-
-
-
-
-
- org.alfresco.maven.plugin
- maven-amp-plugin
- 3.0.4
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
-
-
-
- it
- package
-
- exploded
-
-
- true
-
-
-
-
- false
-
- ${project.build.directory}/${webapp.name}
-
- false
-
- licenses/**
-
-
- ${project.build.testOutputDirectory}
- WEB-INF/classes
- true
-
- **
-
-
-
-
- src/main/webapp
- WEB-INF/licenses
-
- licenses/*.*
-
- false
-
-
- jetty
- WEB-INF
- true
-
-
-
-
-
-
- org.alfresco.maven.plugin
- maven-amp-plugin
- 3.0.4
-
-
-
-
- org.mortbay.jetty
- maven-jetty-plugin
- 6.1.26
-
-
-
- it
- integration-test
-
- run-exploded
-
-
- /${webapp.name}
- ${project.build.directory}/${webapp.name}
- 10
-
-
- 8080
- 60000
-
-
-
-
-
-
-
- commons-dbcp
- commons-dbcp
- 1.4
-
-
-
-
-
-
-
- true
- src/test/resources
-
-
-
- true
- src/test/properties/${env}
-
-
-
- true
- .
-
- module.properties
-
- alfresco/module/${project.artifactId}
-
-
-
-
-
-
-
- org.alfresco
- alfresco
- ${alfresco.version}
- war
- ${alfresco.edition}
-
-
- com.h2database
- h2
- 1.3.158
-
-
- org.hibernate
- hibernate
- 3.2.7.ga
- provided
-
-
- net.sf.ehcache
- ehcache
-
-
-
-
- tk.skuro.alfresco
- h2-support
- 1.2
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/config/context/service-context.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/config/context/service-context.xml
deleted file mode 100644
index d8ca7199..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/config/context/service-context.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/config/log4j.properties b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/config/log4j.properties
deleted file mode 100644
index 1560089e..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/config/log4j.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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.
- #-----------------------------------------------------------------------
- # ${artifactId} module log4j.properties
- #
- # NOTE
- # ----
- # Log4j uses the following logging levels:
- # debug,info,warn,error,fatal
- #
- # To set the logging level of {fullClassName} to {loglevel},
- # add a line to this file of the following form:
- #
- # log4j.logger.{fullClassName}={loglevel}
- #
- # For example, to make 'com.example.MyExample' produce 'debug'
- # logs, add a line like this:
- #
- # log4j.logger.com.example.MyExample=debug
- #
- #
- # WARNING
- # -------
- # Log properties in this log4j.properties file override/augment
- # those in the webapp's main log4j.properties.
- #
- #-----------------------------------------------------------------------
-
- log4j.logger.org.alfresco.demoamp.DemoComponent=${module.log.level}
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/config/module-context.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/config/module-context.xml
deleted file mode 100644
index 2111526d..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/config/module-context.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/Demo.java b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/Demo.java
deleted file mode 100644
index da5ebeaa..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/Demo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2005-2007 Alfresco Software Limited.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- * As a special exception to the terms and conditions of version 2.0 of
- * the GPL, you may redistribute this Program in connection with Free/Libre
- * and Open Source Software ("FLOSS") applications as described in Alfresco's
- * FLOSS exception. You should have recieved a copy of the text describing
- * the FLOSS exception, and it is also available here:
- * http://www.alfresco.com/legal/licensing"
- */
-package org.alfresco.demoamp;
-
-/**
- * This class does nothing except dump some output to system.out.
- *
- * @author Derek Hulley
- */
-public class Demo
-{
- public void init()
- {
- System.out.println("SDK Demo AMP class has been loaded");
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/DemoComponent.java b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/DemoComponent.java
deleted file mode 100644
index 132acee4..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/DemoComponent.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- 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.
- */
-package org.alfresco.demoamp;
-
-import java.util.logging.Logger;
-
-import org.alfresco.repo.module.AbstractModuleComponent;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * A basic component that will be started for this module.
- *
- * @author Derek Hulley
- */
-public class DemoComponent extends AbstractModuleComponent
-{
- Log log = LogFactory.getLog(DemoComponent.class);
-
- @Override
- protected void executeInternal() throws Throwable
- {
- System.out.println("DemoComponent has been executed");
- log.debug("Test debug logging is working");
- log.info("This should not be outputted by default");
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/css/demoamp.css b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/css/demoamp.css
deleted file mode 100644
index c24bc1bd..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/css/demoamp.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- 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.
- */
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/jsp/demoamp.jsp b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/jsp/demoamp.jsp
deleted file mode 100644
index f442d2ef..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/jsp/demoamp.jsp
+++ /dev/null
@@ -1,16 +0,0 @@
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/licenses/README-licenses.txt b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/licenses/README-licenses.txt
deleted file mode 100644
index 2a848d02..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/licenses/README-licenses.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-This folder (root in the AMP) gets mapped automagically in WEB-INF/licenses
-in the war build
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/scripts/demoamp.js b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/scripts/demoamp.js
deleted file mode 100644
index c24bc1bd..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/webapp/scripts/demoamp.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- 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.
- */
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global.properties b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global.properties
deleted file mode 100644
index 27b9393d..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global.properties
+++ /dev/null
@@ -1,130 +0,0 @@
- # 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.
-
-# RUN TIME PROPERTIES
-# -------------------
-
-# 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.
-dir.root=${alfresco.data.location}
-# Allowed values are: NONE, AUTO, FULL
-index.recovery.mode=AUTO
-
-# Fail or not when there are node integrity checker errors
-integrity.failOnError=true
-
-db.driver=${alfresco.db.driver}
-db.url=${alfresco.db.url}
-db.username=${alfresco.db.username}
-db.password=${alfresco.db.password}
-db.pool.initial=10
-db.pool.max=100
-
-# Dialect is autodetected starting from 3.2
-# H2 dialect
-#hibernate.dialect=org.hibernate.dialect.H2Dialect
-
-# Change the following values only if you know what you're doing.
-# Default should suffice in most cases when running jetty embedded
-# for amp testing
-
-# Property to control whether schema updates are performed automatically.
-# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
-# there are also auto-generated update scripts that will need to be executed. After
-# upgrading to a new version, this can be disabled.
-#db.schema.update=true
-
-
-# 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.enabled=false
-ftp.port=1121
-ftp.authenticator=alfresco
-
-# This properties file is used to configure LDAP authentication
-# NB: The following LDAP related properties are read only in case -Denteprise mvn build property is specified
-# Wheter to allow silent deletion of users in the Alfresco UI (note: users will be then resynced in the next synchronization)
-ldap.authentication.allowDeleteUser=true
-# LDAP JNDI provider
-ldap.authentication.provider=com.sun.jndi.ldap.LdapCtxFactory
-# Url and protocol for LDAP server to carry authentication against
-ldap.authentication.url=ldap://ldap.mycompany.com:636
-# can be (simple, ssl)
-ldap.authentication.protcol=ssl
-# Credentials with full access to the directoty used
-ldap.authentication.adminUser=ou=Admin,ou=Services,o=Company
-ldap.authentication.adminPassword=secret
-# Wheter to allow unauthenticated guest a read only login
-ldap.authentication.guestLogin.allowed=false
-# Wheter users can be created on the fly upon successful external (e.g. LDAP) authentication. Useful to avoid user synchronization in case just uid and pwd are needed for a user
-server.transaction.allow-writes=true
-# Wheter user names are case sensitive
-user.name.caseSensitive=true
-# Wheter the synchronization process has to process duplicated users (e.g. synced users and users coming from the sync)
-personService.processDuplicates=true
-# Which action to take when processin duplicates. One of: LEAVE, SPLIT, DELETE
-personService.duplicateMode=DELETE
-# Which of the users (in case of SPLIT duplicates policy) should be considered valid
-personService.lastIsBest=true
-# Wheter auto created users should be considered when processing duplicates
-personService.includeAutoCreated=true
-# The query to find the people to import
-ldap.synchronisation.personQuery=(objectclass=inetOrgPerson)
-# The search base of the query to find people to import
-ldap.synchronisation.personSearchBase=ou=Identities,ou=mycompany,o=com
-# The attribute name on people objects found in LDAP to use as the uid in Alfresco
-ldap.synchronisation.userIdAttributeName=cn
-# The attribute on person objects in LDAP to map to the first name property in Alfresco
-ldap.synchronisation.userFirstNameAttributeName=givenName
-# The attribute on person objects in LDAP to map to the last name property in Alfresco
-ldap.synchronisation.userLastNameAttributeName=sn
-# The attribute on person objects in LDAP to map to the email property in Alfresco
-ldap.synchronisation.userEmailAttributeName=cn
-# The attribute on person objects in LDAP to map to the organizational id property in Alfresco
-ldap.synchronisation.userOrganizationalIdAttributeName=maildomain
-# The default home folder provider to use for people created via LDAP import
-ldap.synchronisation.defaultHomeFolderProvider=companyHomeFolderProvider
-# The query to find group objects
-ldap.synchronisation.groupQuery=(objectclass=AlfrescoGroup)
-# The search base to use to find group objects
-ldap.synchronisation.groupSearchBase=ou=AlfrescoGroups,ou=mycompany,o=com
-# The attribute on LDAP group objects to map to the gid property in Alfrecso
-ldap.synchronisation.groupIdAttributeName=cn
-# The group type in LDAP
-ldap.synchronisation.groupType=AlfrescoGroup
-# The person type in LDAP
-ldap.synchronisation.personType=inetOrgPerson
-# The attribute in LDAP on group objects that defines the DN for its members
-ldap.synchronisation.groupMemberAttributeName=member
-# The cron expression defining when people imports should take place (e.g. every evening at 22:00 hours)
-ldap.synchronisation.import.person.cron=0 0 22 * * ?
-# The cron expression defining when group imports should take place (e.g. every evening at 21:45 hours)
-ldap.synchronisation.import.group.cron=0 45 21 * * ?
-# Should all groups be cleared out at import time?
-# - this is safe as groups are not used in Alfresco for other things (unlike person objects which you should never clear out during an import)
-# - setting this to true means old group definitions will be tidied up.
-ldap.synchronisation.import.group.clearAllChildren=false
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties
deleted file mode 100644
index 8d919e9b..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,147 +0,0 @@
-# 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.
-
-
-# Customized alfresco log location
-# Set root logger level to error
-log4j.rootLogger=${webapp.log.level}, Console, File
-
-###### Console appender definition #######
-
-# All outputs currently set to be a ConsoleAppender.
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{3}] %m%n
-#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
-
-###### File appender definition #######
-log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.File.File=${webapp.log.dir}alfresco.log
-log4j.appender.File.Append=true
-log4j.appender.File.DatePattern='.'yyyy-MM-dd
-log4j.appender.File.layout=org.apache.log4j.PatternLayout
-log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
-
-###### Hibernate specific appender definition #######
-#log4j.appender.file=org.apache.log4j.FileAppender
-#log4j.appender.file.File=hibernate.log
-#log4j.appender.file.layout=org.apache.log4j.PatternLayout
-#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-###### Log level overrides #######
-
-log4j.logger.org.alfresco.repo.model.filefolder=info
-
-# Hibernate
-log4j.logger.org.hibernate=error
-log4j.logger.org.hibernate.util.JDBCExceptionReporter=fatal
-log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=fatal
-#log4j.logger.org.hibernate.cache.EhCacheProvider=warn
-log4j.logger.org.hibernate.type=warn
-# log4j.logger.org.hibernate.persister.collection=DEBUG
-
-# Spring
-log4j.logger.org.springframework=warn
-
-# Axis/WSS4J
-log4j.logger.org.apache.axis=info
-log4j.logger.org.apache.ws=info
-
-# MyFaces
-log4j.logger.org.apache.myfaces.util.DebugUtils=info
-log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
-log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
-log4j.logger.org.apache.myfaces.taglib=error
-
-# log prepared statement cache activity ###
-log4j.logger.org.hibernate.ps.PreparedStatementCache=info
-
-# Alfresco
-log4j.logger.org.alfresco=error
-log4j.logger.org.alfresco.repo.avm=info
-log4j.logger.org.alfresco.config=info
-log4j.logger.org.alfresco.sample=info
-log4j.logger.org.alfresco.web=info
-log4j.logger.org.alfresco.web.scripts=warn
-#log4j.logger.org.alfresco.web.ui.repo.component.UIActions=debug
-#log4j.logger.org.alfresco.web.ui.repo.tag.PageTag=debug
-#log4j.logger.org.alfresco.web.bean.clipboard=debug
-log4j.logger.org.alfresco.repo.webservice=info
-log4j.logger.org.alfresco.service.descriptor.DescriptorService=info
-#log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=info
-#log4j.logger.org.alfresco.web.ui.common.Utils=info
-log4j.logger.org.alfresco.repo.admin.patch.PatchExecuter=info
-log4j.logger.org.alfresco.repo.module.ModuleServiceImpl=info
-log4j.logger.org.alfresco.repo.domain.schema.SchemaBootstrap=info
-log4j.logger.org.alfresco.repo.admin.ConfigurationChecker=info
-log4j.logger.org.alfresco.repo.node.index.FullIndexRecoveryComponent=info
-log4j.logger.org.alfresco.util.OpenOfficeConnectionTester=warn
-log4j.logger.org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl=warn
-#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
-#log4j.logger.org.alfresco.repo.cache.EhCacheTracerJob=debug
-#log4j.logger.org.alfresco.repo.search.Indexer=debug
-#log4j.logger.org.alfresco.repo.workflow=info
-#log4j.logger.org.alfresco.repo.jscript=DEBUG
-log4j.logger.org.alfresco.repo.jscript.AlfrescoRhinoScriptDebugger=off
-
-# CIFS server debugging
-#log4j.logger.org.alfresco.smb.protocol=debug
-#log4j.logger.org.alfresco.smb.protocol.auth=debug
-#log4j.logger.org.alfresco.acegi=debug
-
-# FTP server debugging
-#log4j.logger.org.alfresco.ftp.protocol=debug
-#log4j.logger.org.alfresco.ftp.server=debug
-
-# WebDAV debugging
-#log4j.logger.org.alfresco.webdav.protocol=debug
-
-# NTLM servlet filters
-#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
-#log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug
-
-# Integrity message threshold - if 'failOnViolation' is off, then WARNINGS are generated
-log4j.logger.org.alfresco.repo.node.integrity=ERROR
-
-# New indexer debugging
-#log4j.logger.org.alfresco.repo.search.impl.lucene.index=DEBUG
-
-# Audit debugging
-# log4j.logger.org.alfresco.repo.audit=DEBUG
-# log4j.logger.org.alfresco.repo.audit.model=DEBUG
-
-# Turn off Spring remoting warnings that should really be info or debug.
-log4j.logger.org.springframework.remoting.support=error
-
-# Templating debugging
-# log4j.logger.org.alfresco.web.forms=debug
-# log4j.logger.org.chiba.xml.xforms=debug
-
-# Property sheet and modelling debugging
-# change to error to hide the warnings about missing properties and associations
-log4j.logger.alfresco.missingProperties=warn
-log4j.logger.org.alfresco.web.ui.repo.component.property.UIChildAssociation=warn
-log4j.logger.org.alfresco.web.ui.repo.component.property.UIAssociation=warn
-#log4j.logger.org.alfresco.web.ui.repo.component.property=debug
-#log4j.logger.org.alfresco.repo.dictionary.DictionaryDAO=info
-
-
-# Virtualization Server Registry
-#log4j.logger.org.alfresco.mbeans.VirtServerRegistry=debug
-
-# Link Validation debugging
-#log4j.logger.org.alfresco.linkvalidation.LinkValidationServiceImpl=debug
-#log4j.logger.org.alfresco.linkvalidation.LinkValidationStoreCallbackHandler=debug
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/index.apt.vm b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/index.apt.vm
deleted file mode 100644
index f1988a1e..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/index.apt.vm
+++ /dev/null
@@ -1,44 +0,0 @@
- -----
- Maven Alfresco Extension Archetype
- -----
- Alfresco
- -----
-
-
-
-Welcome to the Maven Alfresco AMP Archetype home
-
- You've reached the Maven Alfresco AMP archetype version ${site_pom_version} ) home page.
-
-
-Description
-
- ${site_pom_description}
-
-
- You can use this Archetype to build and add AMPs to Alfresco WAR packages in conjunction with the maven-alfresco-extension-archetype.
- Using Maven you will benefit of a more structured and scalable way of using AMPs without the Module Management Tool (MMT).
-
-
-
-Quick Start (maven2)
-
- For a quick start you can a maven alfresco AMP project created by just running <<(maven 2.1+ required)>>:
-
---------------------------------------------
-mvn archetype:generate -DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
---------------------------------------------
-
- and then choose the option 'maven-alfresco-amp-archetype'
-
-
-Usage
-
- You can package and install your AMP module in the local Maven repo by just running
-
---------------------------------------------
-mvn install
---------------------------------------------
-
- You can then use the AMP by depending on it using the Maven Alfresco Extension Archetype, without any external tool (e.g. MMT).
- See {{{http://maven.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/maven-alfresco-archetypes/maven-alfresco-extension-archetype/profiles.html} available profiles for Extension archetypes}}
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/layout.apt.vm b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/layout.apt.vm
deleted file mode 100644
index af370d5c..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/layout.apt.vm
+++ /dev/null
@@ -1,43 +0,0 @@
- -----
- 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/org.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
-
-------------------------------------------------------------------
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/readme.apt.vm b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/readme.apt.vm
deleted file mode 100644
index da5734a3..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/readme.apt.vm
+++ /dev/null
@@ -1,56 +0,0 @@
- -----
- 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
-
-
----------
- amp
----------
-
- 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 : <<>>
-
- * Alfresco webapp integrationt test via war creation and embedded run <<>>
-
- * Install/deployment of Alfresco compatible AMPs on a m2 repo <<< mvn install / deploy [ params ] >>>
-
- * using the {{{../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: <<>> can take care of overlay AMP deps
-
- * Error safe single sourcing of POM properties <<>> and <<>> 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//application.properties
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/versions.apt.vm b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/versions.apt.vm
deleted file mode 100644
index 45784903..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/versions.apt.vm
+++ /dev/null
@@ -1,33 +0,0 @@
- -----
- AMP used versioning scheme
- -----
-
-Progressive Versioning Scheme
-
- This scheme was designed to:
-
- * reach properties single sourcing from the POM (so to automatically fill module.properties based on POM properties)
-
- * to be able to use Maven SNAPSHOT capabilities during development
-
- * maintain a senseful progressive order in the versions and builds
-
-and had to overcome the following shortcomings:
-
- * Alfresco Module Packages (AMPs) versions cannot contain letters (therefore no -SNAPSHOT is allowed)
-
-For this the AMP version (in the module.properties) is filtered to be equals to:
-
-<<>>
-
-where:
-
- * noShapshotVersion --> is anything before '-SNAPSHOT' in the current POM version, generated by the maven-no-snapshot-plugin
-
- * buildNumber --> is the buildNumber generated by the maven-buildnumber-plugin from the SCM information for your project, or defaults to 1 if no SCM was configured
-
-
-Custom Versioning Schemes
-
- You can always maintain your <<>> version manually and remove the plugins invocations from the generated POMs.
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/fml/faq.fml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/fml/faq.fml
deleted file mode 100644
index 5c90273d..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/fml/faq.fml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
- General
-
- How do I build an AMP?
-
-
- Just Run
- mvn clean package
-
-
-
-
- How do I test the AMP?
-
-
- You can run Jetty embedded in maven by typing
- mvn clean integration-test -P webapp
-
- 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.
-
-
-
-
- Is MMT needed with maven?
-
-
- 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
- maven-amp-plugin
- for managing and processing AMP lifecycle, making MMT obsolete.
-
-
-
-
-
- Developer questions
-
- How do I configure Eclipse?
-
-
-
Run mvn eclipse:eclipse
-
hit "Refresh" on your Eclipse project
-
-
-
-
- Why I get PermGen or HeapSpace errors
-
-
Run your build with : MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn ...
-
-
-
- How do I 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://...
-
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/resources/images/Alfresco-logo-transparent.gif b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/resources/images/Alfresco-logo-transparent.gif
deleted file mode 100644
index ec36f987..00000000
Binary files a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/resources/images/Alfresco-logo-transparent.gif and /dev/null differ
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/resources/images/logo_noclaim.png b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/resources/images/logo_noclaim.png
deleted file mode 100644
index 0114b0b8..00000000
Binary files a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/resources/images/logo_noclaim.png and /dev/null differ
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/resources/maven-base.css b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/resources/maven-base.css
deleted file mode 100644
index b1ea3713..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/resources/maven-base.css
+++ /dev/null
@@ -1 +0,0 @@
-.maven {}
diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/site.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/site.xml
deleted file mode 100644
index 514d482a..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/site.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- org.apache.maven.skins
- maven-fluido-skin
- 1.2.1
-
-
-
- true
- true
-
- Maven Alfresco Lifecycle
- Maven Alfresco Lifecycle
- /img/Alfresco-logo-transparent.gif
- /index.html
-
-
- mindthegabz
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/README.txt b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/README.txt
deleted file mode 100644
index 6ae3fc22..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/README.txt
+++ /dev/null
@@ -1,115 +0,0 @@
-# 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.
-
-NOTE: This file maybe obsolete. Please refer to documentation site.
-
-
-Maven2/Ant Alfresco extension archetype
----------------------------------------
-
-What is an Alfresco extension?
-------------------------------
-We define an "Alfresco extension" (or customization) a custom build of Alfresco which does not impact on Alfresco source code (while depends on binary releases of the libraries and webapp).
-This is realized overriding (and in certain particular cases overwriting) Alfresco default configuration using Convention over Configuration hooks (e.g. classpath:alfresco/extension/*-context.xml autoloading), in order to ease integration in enterprise environments and to simplify full lifecycle management (from scratch-start to release and deploy) also for non experienced developers, resulting in a less error prone controlled process.
-Alternative to an "Alfresco extension" is the "Alfresco Module" (or AMP) which is meant to be deployed on an existing Alfresco instance and above all to coexist with other modules on top of this instance: as a general rule of thumb an extension is an exclusive customization while a module is one of many customizations which have a separate lifecycle (and owner).
-
-
-Quick Start:
-------------
-Wanna skip all the discussion (or you know already the thing) and want a zero conf maven2 alfresco customization project generation?
-Just see https://wiki.alfresco.com/wiki/Maven_For_Dummies
-
-
-Introduction:
--------------
-
-This archetype was originally developed within Sourcesense (http://www.sourcesense.com) aims to provide a standardized approach to development, release and deployment of Alfresco extensions (as opposed to AMP builds). 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 the next paragraphs.
-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-m2.txt.
-
-
-
-Features (maven2 only):
-----------------------
-
--- Easy dependency management and upgrade testing
-
-Webapp WAR dependency on Alfresco community/enterprise wars (or even environment dependent builds, e.g. WAR without log4j for Jboss-4.0.X) can be easily switched and build
-for different platforms in custom maven2 build profiles.
-Alfresco JAR dependency are only included for compilation (scope="provided") and IDE configuration and must manually be kept in sync with the WAR version (we used a maven style library naming, renaming Alfresco distributed libraries).
-
--- Single source environment dependent properties filtering:
-
-One of the biggest flaws (and most frequent cause for runtime errors) for Alfresco (and more in general for webapplications) is a poor build system which requires manual editing of properties in the source code in a developer/environment dependent way. With this build system just by specifying the -Denv= command line property your able to switch between different buildtime/runtime properties configuration and also have all common properties in one file for simple edit. No more messing up with Spring files when what you need to change is just a property.
-Properties files are stored in src/main/properties/ and get automatically copied over the classpath to provide complete code and configuration separation. Typical examples of developer/environment dependent properties are: db connection, LDAP server connection, alf_data location, SMB/FTP server enabling and configuration.
-
--- Automated (convention over configuration based) full Alfresco repository restore (boostrap)
-
-Alfresco bootstrap process requires manual actions to be taken, and namely to include the restore-context.xml and the 6 full repo export ACP files to be included in the alfresco/extension/restore package. With this build this becomes as easy as specifying the -DrestoreVersion= build property which will automatically pick up ACP files (alfresco package name = "export") found in tools/export/ and include them in the right position in the classpath. When the property is specified also the restore-context.xml to load them is automatically included
-
--- Automated LDAP configuration (and associated personService behaviors)
-
-Fill in your application.properties with appropriate LDAP connection and synchronization values and by specifying the -Denterprise build property on the command line you will have the LDAP authentication and sychronization context already configured. No more hassles in digging into huge Spring files ;)
-
--- Jboss/Tomcat cargo based deployment
-
-Using cargo we're able to provide (local) Jboss and (local/remote) Tomcat deployment. This comes handy both in the development phases and in the release phases when we want the release operation (scm tagging, m2 repo deployment, version update, appserver deployment) to be transactional and managed by maven. For additional configuration please refer to maven-cargo-plugin configuration and fine tune your $M2_HOME/conf/settings.xml (for system level settings) or ~/.m2/settings.xml (for user level settings) in order to match your host/credentials configuration
-
--- Zero conf startup
-
-Community artifacts (alfresco 2.x) artifacts are available on Alfresco public repository (http://maven.alfresco.com) and allow all the default dependencies specified in this POM to be successfully retrieved with no additional configuration.
-
---- Configurable log location and easy database setup
-By editing the POM property in the appropriate profile you can have the setting applied where it makes sense (jboss configures everything centrally).
-Database creation/remove scripts are filtered according to the build profile, so you can directly run them for the different environment they were 'built' for.
-
---- Easy ide (Eclipse) integration
-As difficult as running mvn eclipse:eclipse and hitting "Refresh in your eclipse proje"
-
---- Release process
-One command release deploy for this artifact and for the project generated from it. See README-m2.txt for more details.
-
---- Integrated documentation system
-Documentation is integrated and can be modified with one of the supported formats (Xdoc, APT, FML): project resources can be also linked (e.g.physical documents) .
-To test an example typing 'mvn site:run' will run your site in jetty embedded on port 8080, with redeployment of sited 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 TODO.txt
-
-
-ROADMAP:
---------
-See ROADMAP.txt
-
-
-REFERENCES:
-----------
-http://www.mortbay.org/maven-plugin
-http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
-http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html
-http://maven.apache.org/guides/getting-started/index.html#How_do_I_filter_resource_files
-http://maven.apache.org/pom.html#Final
-http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html
-http://jira.codehaus.org/browse/CARGO-416
-http://www.javaworld.com/javaworld/jw-05-2006/jw-0529-maven.html
-http://cargo.codehaus.org/Maven2+Plugin+Installation
-http://cargo.codehaus.org/Deploying+to+a+running+container
-http://maven.apache.org/plugins/maven-release-plugin/
-http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven.html?page=2
-http://maven.apache.org/doxia/references/apt-format.html
-http://maven.apache.org/guides/mini/guide-site.html
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/ROADMAP.txt b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/ROADMAP.txt
deleted file mode 100644
index 31f309f3..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/ROADMAP.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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.
-
-
-TODO (in order of priority):
------
-- make jetty:run-inplace work for easy runtime editing
-- Integration testing with selenium
-- unit testing suite
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/pom.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/pom.xml
deleted file mode 100644
index e84997c9..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
- 4.0.0
- maven-alfresco-extension-archetype
- maven-archetype
- Maven alfresco Extension archetype
-
- org.alfresco
- maven-alfresco-archetypes
- 4.0.0-SNAPSHOT
- ../pom.xml
-
-
- This archetype developed 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 ).
-
-
-
-
- org.apache.maven.archetype
- archetype-packaging
- 2.0
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/changes/changes.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/changes/changes.xml
deleted file mode 100644
index 747d2678..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/changes/changes.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
- Maven Alfresco Extension archetype
- Gabriele Columbro
-
-
-
- FTL content was destroyed
- Enable h2 support
- Documentation update
- Add h2 params to avoid DB locking at startup
- Align groupId to org.alfresco
-
-
-
- Removed support for H2 since alfresco does not work with it (even in PGSQL compatibility mode)
-
-
- Tested against 4.0.b Community
-
-
-
-
- Added -Prun profile to encapsulate jetty embedded running capabilities
-
-
- Added -Pinitialize profile to clean alf_data and drop/create DB within the build
-
-
- Updated all docs to Maven Alfresco repository
-
-
- Incapsulated jetty run in the -Prun profile, which runs by default jetty during the integration-test phase
-
-
-
-
- Updated to Alfresco 3.2r artifacts
-
-
- Updated to new Sourcesense repository
-
-
-
-
- Added full AMP lifecycle management.
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
deleted file mode 100644
index e7eb7c45..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- jetty
-
- *.xml
-
-
-
- src/main/webapp
-
- **/*.xml
- **/*.txt
-
-
-
- src/main/properties
-
- **/*.txt
- **/*.properties
-
-
-
- src/main/resources
-
- **/*.xml
- **/*.properties
-
-
-
- src/main/resources
-
- **/*.js
- **/*.ftl
-
-
-
- tools/export
-
- **/*.txt
-
-
-
- tools/ant
-
- **/*.txt
- **/*.html
- **/*.jsp
- **/*.xml
- **/*.properties
-
-
-
- tools/m2
-
- **/*.sh
-
-
-
- tools/ant
-
- **/*.access
- **/*.tld
- **/*.xsd
- **/*.sample
- **/*.gif
- **/*.ftl
- **/*.ico
- **/*.MF
- **/*.0-community/scripts/ajax/dojo/src/crypto/LICENSE
- **/*.as
- **/*.fla
- **/*.pdf
- **/*.0-community/scripts/ajax/dojo/src/i18n/calendar/nls/README
- **/*.0-community/scripts/ajax/dojo/src/i18n/currency/nls/README
- **/*.svg
- **/*.sql
- **/*.htm
- **/*.password
- **/*.exe
- **/*.jar
- **/*.js
- **/*.class
- **/*.dtd
- **/*.wsdd
- **/*.css
- **/*.png
- **/*.wsdl
- **/*.jpg
- **/*.smd
- **/*.acp
-
-
-
- .externalToolBuilders
-
- **/*.launch
-
-
-
-
-
- .classpath
- .project
- pom.xml
- build.xml
- maven-eclipse.xml
- README-ANT.txt
- README-m2.txt
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/PRESS.txt b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/PRESS.txt
deleted file mode 100644
index 3ed0ac57..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/PRESS.txt
+++ /dev/null
@@ -1,119 +0,0 @@
-Maven-alfresco-archetype references
------------------------------------
-
-
-AMP Packaging - http://forge.alfresco.com/forum/forum.php?thread_id=662&forum_id=310
-
-Documentation site - http://repository.sourcesense.com/maven2-sites/maven-alfresco-extension-archetype-1.0.0/
-
-Library conventions - http://forums.alfresco.com/viewtopic.php?f=10&t=1017&p=39172#p39172
-
-Maven repositories - http://forums.alfresco.com/viewtopic.php?f=12&t=10210&p=39175#p39175
-
-Running outside a container - http://forums.alfresco.com/viewtopic.php?f=4&t=9317&p=39176#p39176
-
-Maven4alfresco - http://forums.alfresco.com/viewtopic.php?f=32&t=9268&p=39179#p39179
-
-Maven for building Alfresco - http://forums.alfresco.com/viewtopic.php?f=14&t=7619&p=39188#p39188
-
-Release gforge page - http://forge.alfresco.com/frs/?group_id=90
-
-
-
-
-
-Forum post - Maven for building Alfresco
----------------------------
-
-Hi all, a bit delayed but wanted to leave my 2 cents on this *very interesting* topic.
-
-I believe that independently from the technology that is used, which hardly depends upon the context you plan to adopt and deploy Alfresco in,
-using Maven2 can be far more useful in structured enterprise environments where some of the mentioned requirements (strict dependency management and versioning or releasing policies / ownerships) which Ant is certainly the low key entry point for a test drive / evaluation or for very simple customizations for which maven would be overkill.
-
-ATM, as no real news have happened in one year on the Alfresco side on the mavenization of the Alfresco sources,
-we proceeded (in Sourcesense, http://www.sourcesense.com, alfresco partner) in using maven to build and customize Alfresco at our clients, typically big and potentially intricate enterprise environments.
-
-To be clear: we use maven ATM to build alfresco extensions (in the future also AMP should be supported) and that does not mandatorily mean that Alfresco itself should build with maven, even if how it works now (basically a maven-webapp-archetype with a war dependency on the alfresco war) is not completely neat as it flattens the whole transitive dependency resolving magic of m2.
-
-The process of improvement of this lifecycle management (more than just build) tool has been later on released on the alfresco forge (http://forge.alfresco.com/projects/m2alfresco/ and http://repository.sourcesense.com/maven ... ype-1.0.0/) and provides a number of interesting features (like jetty embedded run, clean property filtering management, documentation, jboss/tomcat local/remote deploy, maven release support etc.).
-For supporting this release, we made alfresco community artifacts (jar and war) available on Sourcesense repositories in order to have a zero conf startup for even junior developers (and to lower the maven learning curve). See http://repository.sourcesense.com/maven2/alfresco.
-
-For enterprise customization instead, we happily use internal repositories (Sourcesense or clients') with the same approach.
-
-About my 2 cents, it would be much better if Alfresco itself releases its artifacts on m2 repos (thus complete the m10n - mavenization - of source tree) for a number of reasons
-
-- standardization of the naming/versioning
-- easy startup
-- Alfresco declares itself a ECM systems, as we know 'E' stands for "enterprise", and as we all (sadly) know "enterprise" stands for processes, release policies, bureaucracy, ownerships, lifecycle, development vs. maintenance. A m2 structured approach will ease to me integration in highly complex environments (and with many enterprise applications) in which is not just a matter of "taking and xml file, dropping it in the shared folder, and restart the server" , because it's *simply* not possible
-- Having an archetype based approach can really gear community development and lower Alfresco "real" learning curve, as it's pretty much easier to have a list of properties to edit more than go-search-crawl-find on the wiki which is the Spring snippet to be modified. This is true for the extension projects (already in the forge) as well as AMP (let's say module build).
-- Alfresco grows faster and faster, to me it's the moment (especially with the 3.0 release) to provide a real neat basis for the even greater growth alfresco expects from the great improvements they are doing: Apache maven is basis for most open source projects, and even tough and complex frameworks (e.g. Apache Cocoon) have completed (not without hassles) the m10n process, towards a more integrated and documented open source vision. The bigger it grows the more difficult will be to do this change and to me it may really make it an outstanding example of "enterprise opensource"
-- I don't have to maintain a public m2 repository almost just for Alfresco ;)
-
-Ok, now you may think I'm a maven evangelist trying to find useful applications of that technology at all costs ;)
-
-On the other hand I believe that (especially being a partner) we should not impose technologies, while adapt the way we work to the open source (typically high) standards of development, and this is a characteristic that sometimes I see missing in Alfresco extension development: in this sense the archetype we've released builds *also* with Apache Ant (see http://forge.alfresco.com/forum/forum.php?forum_id=512), exploiting the tidy and standard maven project hierarchy and sharing the same property filtering policies.
-Of course all the nice m2 features (like jetty run, jboss and tomcat deploy, release management, etc.) are not supported by this build, but what you just need is to checkout the jar, unzip it, and run ant to have a properly packaged, environment aware alfresco WAR build.
-
-This was more a POC for the feasibility of this double approach, so I'm not planning to maintain the ant part while focusing on the interesting growth perspectives of the m2 part, but it can be useful to provide the double point of access I was mentioning before (enterprise vs. community).
-
-So wrapping up:
-I would be (and so my company Sourcesense) to see Alfresco move (and to help/support in this transition) to maven for building its source code, document and release it. But I understand it's a complex and risky process (but risks can be lowered supporting a bottom line Ant based build which provides continuity with current developments).
-
-So ATM I'd love to have some feedback on the possibility of building extension (and AMP in a while) using archetypes / prototype based approach (even before an Alfresco official move to maven) and hopefully some contributions to the project. I think that it's vitally important to have a (still agile but) sort of a process when developing and releasing and application.
-That's especially true/valuable for a partner but I think that will especially gear the professional open source community interest in Alfresco.
-
-Hope this helps,
-Gab
-
-PS:
-For some additional references on the maven topic you may be interested in (sorry for the spamming ;) :
-
-Library conventions - viewtopic.php?f=10&t=1017&p=39172#p39172
-Maven repositories - viewtopic.php?f=12&t=10210&p=39175#p39175
-Running outside a container - viewtopic.php?f=4&t=9317&p=39176#p39176
-Maven4alfresco - viewtopic.php?f=32&t=9268&p=39179#p39179
-
-
-
-Library conventions:
---------------------
-
-have been working a lot with Maven and Alfresco, especially in enterprise environments where versioning, releasing and dependency management can be really important and tricky.
-That's why I've put my efforts in releasing a maven2 archetype which can be used for building Alfresco extensions (and soon AMP, I hope) and managing the artifact in its whole lifecycle as m2 prescribes, e.g providing features like:
-
-- Property filtering
-- Rapid prototyping (common properties already available to the - junior - developer rather than Spring conf files)
-- Releasing
-- Documentation site
-- LDAP configuration samples
-- Local/remote deploy on tomcat/jboss with cargo
-- jetty embedded run
-
-Results are in the m2alfresco forge project here
-
-http://forge.alfresco.com/projects/m2alfresco/,
-
-and the documentation site with the zero conf command to run are here:
-
-http://repository.sourcesense.com/maven ... ype-1.0.0/.
-
-
-Now the geek part ;)
-
-I used almost your same convention, but you can have a look at the public repo with only community artifacts available (for obvious redistribution rules):
-http://repository.sourcesense.com/maven2/alfresco/
-
-Basically the war build overlays the extension to the alfresco WAR dependency (that brings already all the dependencies inside WEB-INF/lib, so no real pom.xml for it). All the other dependencies are directly set by the extension pom.xml with scope="provided" so that they don't get included again in the overlay phase.
-I agree that a an Alfresco pom is the most correct approach but I want to have it released by Alfresco itself in order to have the support and all the stuff for my clients.
-
-Maybe you can join the project in the forge and contribute all the (advanced ;) pom studies you've done here in the main pom of the archetype.
-
-Every feedback would be really appreciated.
-
-Ciao!
-
-Gabriele
-
-
-PS:
-BTW, sources are still in Sourcesense private repos but I'm going to move to the forge soon. Sources are available anyways in the maven repo http://repository.sourcesense.com/maven ... archetype/ and in the forge http://forge.alfresco.com/frs/?group_id=90.
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/README-ANT.txt b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/README-ANT.txt
deleted file mode 100644
index f3d3a22b..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/README-ANT.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-# 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//application.properties and build with -Denv=
- (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
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/README-m2.txt b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/README-m2.txt
deleted file mode 100644
index c4763fd0..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/README-m2.txt
+++ /dev/null
@@ -1,122 +0,0 @@
----------------------------------------
-Archetype Release: Archetype - maven-alfresco-archetype
-Author: g.columbro@sourcesense.com
-Contacts: alfresco@sourcesense.com
----------------------------------------
-M2 Instructions for Alfresco Extension:
-
-
-The project can be built by the means of two build systems:
-
-- Ant (suggested for fast startup and offline building) --> see README-ant.txt
-- Maven2 (suggested for structured team work and release) --> explained in this file
-
-Both build systems provide Alfresco customized build and deploy on tomcat.
-WARNING: Make sure you run tomcat/jboss with appropriate memory size (JAVA_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m")
-
-
-
-Alfresco maven2 WAR build
--------------------------
-
-FEATURES:
----------
-- centralized environment aware properties based configuration (common use cases covered with just properties file editing, contributions are more than welcome!)
-- Content Bootstrap
-- WAR customized build
-- environment dependent deploy
-- easy switch of alfresco version
-- jetty embedded build
-- jboss (local) and tomcat (local/remote) deployment support
-
-PROJECT 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
-
-
-
-Lifecycle HOWTO - Usage
------------------------
-
---- Fast one shot build and embedded jetty run-war|run-exploded [and restore bootstrap] [and customize webappName] [and integrate LDAP]:
-
-' MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m mvn integration-test" [-Denv=yourEnv] [-DrestoreVersion=versionToRestore] [-DwebappName=yourCustomWebappName] [-Denterprise] '
-
-(default env=src/main/properties/local/application.properties)
-
---- [Re]Deploy on Jboss (locally) [or on Tomcat locally or remotely]:
-
-' mvn clean package [cargo:undeploy] cargo:deploy -Pjboss [-Ptomcat] '
-
-Note: Jboss or Tomcat must be running prior to deployment
-
---- Packaging and Manual Deploy:
-- Invoke ' mvn clean package -Denv=targetEnv '
-from the root project's folder; for a list of available environments check src/main/properties//application.properties
-or create a custom src/main/properties//application.properties
-- Copy target/${webapp.name}.war in $JBOSS_HOME/server/default/deploy or in $CATALINA_HOME/webapps
-
---- Import data exports:
-- Invoke the maven package goal using -DrestoreVersion=, where is the name of one of the folders listed below tools/export
-
-- NB: Due to http://forums.alfresco.com/viewtopic.php?p=29429#29429 with embedded jetty run we run into this bug, which prevents boostrap from working.
-Restore properly works and was tested under Jboss and Tomcat.
-
---- Release process
-Just one command: ' mvn release:prepare release:perform '
-
-You can customize goals to be executed in both phases in the maven-release-plugin configuration section in the POM.
-
-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)
-
---- Install manually JTA (if needed):
-- Download jta-1_0_1B-classes.zip from http://java.sun.com/products/jta/
-- mvn install:install-file -Dfile=./jta-1_0_1B-classes.zip -DgroupId=jta -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/build.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/build.xml
deleted file mode 100644
index 7551de66..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/build.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/jetty/jetty-env.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/jetty/jetty-env.xml
deleted file mode 100644
index 7149eb42..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/jetty/jetty-env.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
- jdbc/dataSource
-
-
- ${alfresco.db.url}
- ${alfresco.db.username}
- ${alfresco.db.password}
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/pom.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644
index eab32825..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/pom.xml
+++ /dev/null
@@ -1,751 +0,0 @@
-
-
-
-
- 4.0.0
- ${groupId}
- ${artifactId}
- ${version}
- Alfresco extension
- war
-
- Alfresco extension
-
-
-
- 4.0.b
- community
-
- local
-
- alfresco
-
-
-
-
- ./alf_data_jetty
- alf_jetty
- alfresco
- alfresco
- MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=TRUE
- jdbc:h2:${alfresco.data.location}/h2_data/${alfresco.db.name};${alfresco.db.params}
- org.h2.jdbcx.JdbcDataSource
-
-
- org.alfresco.filesys.repo.desk
-
-
-
- ${project.description}
- ${project.organization.url}
- ${project.groupId}
- ${project.artifactId}
- ${project.version}
- ${svn.tags.url}
- ${site.url}
-
-
-
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
-
- alfresco-public-snapshots
- https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
-
- true
-
-
-
- alfresco-maven-repo
- https://artifacts.alfresco.com/nexus/content/groups/enterprise-snapshots
-
- true
-
-
-
-
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
-
- alfresco-public-snapshots
- https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
-
- true
-
-
-
-
-
-
-
-
-
-
- org.alfresco
- alfresco
- ${alfresco.version}
- war
- ${alfresco.edition}
-
-
-
- org.alfresco
- alfresco-web-client
- ${alfresco.version}
- provided
- ${alfresco.edition}
-
-
- org.alfresco
- alfresco-core
- ${alfresco.version}
- provided
- ${alfresco.edition}
-
-
- org.alfresco
- alfresco-repository
- ${alfresco.version}
- provided
- ${alfresco.edition}
-
-
- org.alfresco
- alfresco-remote-api
- ${alfresco.version}
- provided
- ${alfresco.edition}
-
-
-
-
-
- javax.servlet
- servlet-api
- 2.5
- provided
-
-
-
-
- ${webapp.name}
-
-
- ${project.basedir}/src/main/properties/${env}/alfresco-global.properties
-
-
-
-
-
- src/main/resources
-
- **/restore-context.xml
- **/ldap-*.xml
-
-
-
-
- src/main/properties/${env}
-
- alfresco-global.properties
-
- true
-
-
- src/main/resources
-
- log4j.properties
-
- true
-
-
- ${project.basedir}/tools/mysql
-
- *.sql
-
- true
- tools/mysql
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 2.5
-
- UTF-8
-
-
- ftl
-
-
-
-
-
- org.apache.maven.plugins
- maven-eclipse-plugin
- 2.8
-
-
-
-
- maven-site-plugin
- 3.0
-
- en
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.3
-
-
- unpack-amps
- process-resources
-
- unpack-dependencies
-
-
- amp
- ${build.directory}/${webapp.name}
- META*
-
-
-
-
-
-
- org.alfresco.maven.plugin
- maven-amp-plugin
- 3.0.4
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
- 2.1.1
-
- false
- target/${webapp.name}
- tools/**
-
-
-
-
-
-
- org.codehaus.cargo
- cargo-maven2-plugin
- 1.1.1
-
-
- org.apache.maven.plugins
- maven-release-plugin
-
-
- true
- clean package
- install deploy cargo:undeploy cargo:deploy
- site:deploy
-
-
-
-
-
- org.apache.maven.doxia
- doxia-maven-plugin
- 1.2
-
-
- pre-site
-
- render-books
-
-
-
-
-
- target/site/books
-
-
- src/site
- src/books/manual.xml
-
-
- xdoc
-
-
- pdf
-
-
- rtf
-
-
-
-
-
-
-
-
-
-
-
-
- maven-compiler-plugin
- 2.3.2
-
- 1.6
- 1.6
-
-
-
- maven-surefire-plugin
- 2.9
-
-
- maven-javadoc-plugin
- 2.8
-
-
- org.codehaus.mojo
- jxr-maven-plugin
- 2.0-beta-1
-
-
- maven-clover-plugin
- 2.4
-
-
-
- org.codehaus.mojo
- taglist-maven-plugin
- 2.4
-
-
-
-
-
-
-
-
-
-
-
-
- restore
-
-
- restoreVersion
-
-
-
- package
-
-
- src/main/resources
-
- **/restore-*.xml
-
-
-
- tools/export/${restoreVersion}
-
- **
-
- alfresco/extension/restore
-
-
-
-
-
-
- jboss
-
-
- ./alf_data
- alf_jboss
-
-
-
- cargo:deploy
-
-
- src/main/resources
-
- **/restore-context.xml
-
-
-
-
- src/main/resources
-
-
-
- true
-
-
-
-
- org.codehaus.cargo
- cargo-maven2-plugin
-
-
- jboss4x
- remote
-
-
- runtime
-
- 8080
-
-
-
- remote
-
-
- ${project.groupId}
- ${project.artifactId}
- war
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
- 2.1.1
-
- false
- target/${webapp.name}
- **/log4j.properties,**/lib/log4j*.jar,log4j.properties
- **/log4j.properties,WEB-INF/classes/tools
-
-
-
-
-
-
-
- tomcat
-
-
- ./alf_data
- alf_tomcat
-
-
-
- package
-
-
- org.codehaus.cargo
- cargo-maven2-plugin
-
-
- tomcat5x
- remote
-
-
-
- runtime
-
- tomcat
- tomcat
- 8080
-
-
-
- remote
-
-
- ${project.artifactId}
- war
-
- /${webapp.name}
-
-
-
-
-
-
-
-
-
-
-
- initialize
-
-
-
-
- maven-clean-plugin
-
-
- clean-execution
- generate-resources
-
- clean
-
-
-
-
- ${alfresco.data.location}
-
- **/*
-
-
-
- .
-
- **/*.log
- *.log
-
-
-
-
-
-
-
-
-
-
-
- run
-
-
-
- jetty
-
- jetty-env.xml
-
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
-
-
-
- jetty
- WEB-INF
- true
-
-
-
-
-
- org.mortbay.jetty
- maven-jetty-plugin
- 6.1.21
-
-
-
- it
- integration-test
-
- run-exploded
-
-
- /${webapp.name}
- ${project.build.directory}/${webapp.name}
- 10
-
-
- 8080
- 60000
-
-
-
-
-
-
-
-
-
-
- com.h2database
- h2
- 1.3.158
-
-
- tk.skuro.alfresco
- h2-support
- 1.2
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/properties/local/README-properties.txt b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/properties/local/README-properties.txt
deleted file mode 100644
index ca1531a6..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/properties/local/README-properties.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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.
-
-Ant/m2 runtime properties management
-------------------------------------
-
-Both build systems will comply to the following convention for properties:
-
-- if -Denv= property is specified at build time properties will be
- looked up in folder
-
- src/main/properties//application.properties
-
- and copied in the classpath under
-
- alfresco/extension/application.properties
-
-- if no "env" system property is specified env=local default value will be used
-
-
-Buildtime properties management - Note for Ant Users:
------------------------------------------------------
-Here you can also configure buildtime properties which will be loaded in ant
-build context with the same aforementioned convention.
-This is done for tomcat ATM.
-
-Buildtime properties management - Note for Maven Users:
------------------------------------------------------
-You should configure your buildtime properties as suggested by the maven
-cascading build properties system, i.e. externalizing them from the project
-by the means of settings.xml file.
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/properties/local/alfresco-global.properties b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/properties/local/alfresco-global.properties
deleted file mode 100644
index b180313b..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/properties/local/alfresco-global.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-# 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.
-
-
-
-# RUN TIME PROPERTIES
-# -------------------
-
-# 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.
-dir.root=${alfresco.data.location}
-# Allowed values are: NONE, AUTO, FULL
-index.recovery.mode=NONE
-
-# Fail or not when there are node integrity checker errors
-integrity.failOnError=true
-
-# database connection properties
-# MySQL connection (This is default and requires mysql-connector-java-5.0.3-bin.jar, which ships with the Alfresco server)
-
-db.driver=${alfresco.db.driver}
-db.url=${alfresco.db.url}
-db.username=${alfresco.db.username}
-db.password=${alfresco.db.password}
-db.pool.initial=10
-db.pool.max=100
-
-# Dialect is autodetected starting from 3.2
-# H2 dialect
-#hibernate.dialect=org.hibernate.dialect.H2Dialect
-
-
-# Property to control whether schema updates are performed automatically.
-# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
-# there are also auto-generated update scripts that will need to be executed. After
-# upgrading to a new version, this can be disabled.
-#db.schema.update=true
-
-
-# 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
-ftp.port=1121
-ftp.authenticator=alfresco
-
-# This properties file is used to configure LDAP authentication
-# NB: The following LDAP related properties are read only in case -Denteprise mvn build property is specified
-# Wheter to allow silent deletion of users in the Alfresco UI (note: users will be then resynced in the next synchronization)
-ldap.authentication.allowDeleteUser=true
-# LDAP JNDI provider
-ldap.authentication.provider=com.sun.jndi.ldap.LdapCtxFactory
-# Url and protocol for LDAP server to carry authentication against
-ldap.authentication.url=ldap://ldap.mycompany.com:636
-# can be (simple, ssl)
-ldap.authentication.protcol=ssl
-# Credentials with full access to the directoty used
-ldap.authentication.adminUser=ou=Admin,ou=Services,o=Company
-ldap.authentication.adminPassword=secret
-# Wheter to allow unauthenticated guest a read only login
-ldap.authentication.guestLogin.allowed=false
-# Wheter users can be created on the fly upon successful external (e.g. LDAP) authentication. Useful to avoid user synchronization in case just uid and pwd are needed for a user
-server.transaction.allow-writes=true
-# Wheter user names are case sensitive
-user.name.caseSensitive=true
-# Wheter the synchronization process has to process duplicated users (e.g. synced users and users coming from the sync)
-personService.processDuplicates=true
-# Which action to take when processin duplicates. One of: LEAVE, SPLIT, DELETE
-personService.duplicateMode=DELETE
-# Which of the users (in case of SPLIT duplicates policy) should be considered valid
-personService.lastIsBest=true
-# Wheter auto created users should be considered when processing duplicates
-personService.includeAutoCreated=true
-# The query to find the people to import
-ldap.synchronisation.personQuery=(objectclass=inetOrgPerson)
-# The search base of the query to find people to import
-ldap.synchronisation.personSearchBase=ou=Identities,ou=mycompany,o=com
-# The attribute name on people objects found in LDAP to use as the uid in Alfresco
-ldap.synchronisation.userIdAttributeName=cn
-# The attribute on person objects in LDAP to map to the first name property in Alfresco
-ldap.synchronisation.userFirstNameAttributeName=givenName
-# The attribute on person objects in LDAP to map to the last name property in Alfresco
-ldap.synchronisation.userLastNameAttributeName=sn
-# The attribute on person objects in LDAP to map to the email property in Alfresco
-ldap.synchronisation.userEmailAttributeName=cn
-# The attribute on person objects in LDAP to map to the organizational id property in Alfresco
-ldap.synchronisation.userOrganizationalIdAttributeName=maildomain
-# The default home folder provider to use for people created via LDAP import
-ldap.synchronisation.defaultHomeFolderProvider=companyHomeFolderProvider
-# The query to find group objects
-ldap.synchronisation.groupQuery=(objectclass=AlfrescoGroup)
-# The search base to use to find group objects
-ldap.synchronisation.groupSearchBase=ou=AlfrescoGroups,ou=mycompany,o=com
-# The attribute on LDAP group objects to map to the gid property in Alfrecso
-ldap.synchronisation.groupIdAttributeName=cn
-# The group type in LDAP
-ldap.synchronisation.groupType=AlfrescoGroup
-# The person type in LDAP
-ldap.synchronisation.personType=inetOrgPerson
-# The attribute in LDAP on group objects that defines the DN for its members
-ldap.synchronisation.groupMemberAttributeName=member
-# The cron expression defining when people imports should take place (e.g. every evening at 22:00 hours)
-ldap.synchronisation.import.person.cron=0 0 22 * * ?
-# The cron expression defining when group imports should take place (e.g. every evening at 21:45 hours)
-ldap.synchronisation.import.group.cron=0 45 21 * * ?
-# Should all groups be cleared out at import time?
-# - this is safe as groups are not used in Alfresco for other things (unlike person objects which you should never clear out during an import)
-# - setting this to true means old group definitions will be tidied up.
-ldap.synchronisation.import.group.clearAllChildren=false
-
-# BUILD TIME PROPERTIES
-# ---------------------
-
-# NB: This group of properties is only used by ant for tomcat deployment, and may not be maintained.
-# Appserver to deploy to (tomcat) - used only by ant ATM.
-# Use $M2_HOME/conf/settings.xml (or ~/.m2/settings.xml) for maven2 appservers username/password
-appserver.dir=/your/appserver/dir
-appserver.host=localhost
-appserver.manager.url=http://${appserver.host}:8080/manager
-appserver.username=tomcat
-appserver.password=tomcat
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/restore-context.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/restore-context.xml
deleted file mode 100644
index 5ff92001..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/restore-context.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
-
- alfresco/extension/restore/export_systeminfo.xml
-
-
-
-
-
-
-
- /
- alfresco/extension/restore/export_users.acp
-
-
-
- true
-
-
-
-
-
-
- /
- alfresco/extension/restore/export_system.acp
-
-
-
- true
-
-
-
-
-
-
- /
- alfresco/extension/restore/export_versions.acp
-
-
-
- true
-
-
-
-
-
-
- /
- alfresco/extension/restore/export_spaces_archive.acp
-
-
-
-
-
-
-
-
-
- /
- alfresco/extension/restore/export_spaces.acp
-
-
-
- true
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/custom-model-context.xml.sample b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/custom-model-context.xml.sample
deleted file mode 100644
index f26b0cfe..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/custom-model-context.xml.sample
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- alfresco/extension/custom-model.xml
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/custom-model.xml.sample b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/custom-model.xml.sample
deleted file mode 100644
index 08867368..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/custom-model.xml.sample
+++ /dev/null
@@ -1,174 +0,0 @@
-
-
-
-
-
-
-
-
-
- Custom Alfresco model
- Sourcesense
- 1.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Select a Document type...
- Brief
- E-mail
- Fax
- E-Form
-
-
-
-
-
-
- Select a status...
- New
- Draft
- Proposal
- Approved
- Public
-
-
-
-
-
- 0
-
-
- 6
-
-
-
-
- 0
-
-
- 20
-
-
-
-
-
-
-
-
- Incoming document
- cm:content
-
-
- d:text
- true
-
-
-
-
-
- d:text
- false
-
-
-
-
-
- d:text
- false
- New
-
-
-
-
-
-
- cm:dublincore
- cm:versionable
- ss:sendable
-
-
-
-
-
-
-
-
-
-
- d:date
- false
-
-
- d:text
- false
-
-
-
-
-
- d:text
- false
-
-
-
-
-
- d:text
- false
-
-
-
-
-
- d:text
- false
-
-
-
-
-
- d:text
- false
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/custom-repository-context.xml.sample b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/custom-repository-context.xml.sample
deleted file mode 100644
index a5c4c409..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/custom-repository-context.xml.sample
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- true
-
-
-
- classpath:alfresco/repository.properties
- classpath:alfresco/version.properties
- classpath:alfresco/domain/transaction.properties
-
-
- classpath:alfresco/extension/application.properties
-
-
-
-
-
-
-
- classpath:alfresco/domain/hibernate-cfg.properties
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/file-servers-custom.xml.sample b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/file-servers-custom.xml.sample
deleted file mode 100644
index 8aa0a5d7..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/file-servers-custom.xml.sample
+++ /dev/null
@@ -1,152 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Alfresco CIFS Server
-
-
- 255.255.255.0
-
-
-
-
-
- ${smb.server.bindto}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${ftp.port}
-
-
-
-
-
-
-
-
-
-
-
- workspace://SpacesStore
- /app:company_home
-
-
-
- __Alfresco.url
- http://${localname}/
-
-
-
-
-
-
-
-
-
- alfresco/desktop/Alfresco.exe
- http://${localname}/
-
-
- ${desktop.action.package}.CheckInOutDesktopAction
- CheckInOut
- __CheckInOut.exe
-
-
- ${desktop.action.package}.JavaScriptDesktopAction
- JavaScriptURL
- __ShowDetails.exe
-
- anyFiles
- copyToTarget
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/web-client-config-custom.xml.sample b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/web-client-config-custom.xml.sample
deleted file mode 100644
index d3464db4..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/web-client-config-custom.xml.sample
+++ /dev/null
@@ -1,193 +0,0 @@
-
-
-
-
-
-
-
-
- Italiano
- Dutch
-
-
-
-
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/webclient.properties.sample b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/webclient.properties.sample
deleted file mode 100644
index efa85e7e..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/extension/samples/webclient.properties.sample
+++ /dev/null
@@ -1,40 +0,0 @@
-# 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.
-
-
-# Sample webclient alfresco custom labels (english)
-# for additional i18n add files in alfresco/messages/*_{locale}.properties
-
-#========== Document labels ==============#
-
-# Incoming
-incoming=Incoming document
-incoming.properties=Incoming document additional properties
-incoming.moreProperties=Additional document properties
-incoming.scanId=Scan ID
-incoming.status=Status
-incoming.documentType=Document Type
-
-#========== Aspects labels ==============#
-
-# Sendable
-sendable=Sendable document
-sendable.properties=Sending details
-sendable.dateSent=Sending date
-sendable.senderName=Sender Name
-sendable.senderBsn=Sender BSN
-sendable.senderAddress=Sender Address
-sendable.senderZipcode=Sender Zip Code
-sendable.senderCity=Sender City
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties
deleted file mode 100644
index f7a4b7c5..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,147 +0,0 @@
-# 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.
-
-
-# Customized alfresco log location
-# Set root logger level to error
-log4j.rootLogger=error, Console, File
-
-###### Console appender definition #######
-
-# All outputs currently set to be a ConsoleAppender.
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{3}] %m%n
-#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
-
-###### File appender definition #######
-log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.File.File=${log.dir}alfresco.log
-log4j.appender.File.Append=true
-log4j.appender.File.DatePattern='.'yyyy-MM-dd
-log4j.appender.File.layout=org.apache.log4j.PatternLayout
-log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
-
-###### Hibernate specific appender definition #######
-#log4j.appender.file=org.apache.log4j.FileAppender
-#log4j.appender.file.File=hibernate.log
-#log4j.appender.file.layout=org.apache.log4j.PatternLayout
-#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-###### Log level overrides #######
-
-log4j.logger.org.alfresco.repo.model.filefolder=info
-
-# Hibernate
-log4j.logger.org.hibernate=error
-log4j.logger.org.hibernate.util.JDBCExceptionReporter=fatal
-log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=fatal
-#log4j.logger.org.hibernate.cache.EhCacheProvider=warn
-log4j.logger.org.hibernate.type=warn
-# log4j.logger.org.hibernate.persister.collection=DEBUG
-
-# Spring
-log4j.logger.org.springframework=warn
-
-# Axis/WSS4J
-log4j.logger.org.apache.axis=info
-log4j.logger.org.apache.ws=info
-
-# MyFaces
-log4j.logger.org.apache.myfaces.util.DebugUtils=info
-log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
-log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
-log4j.logger.org.apache.myfaces.taglib=error
-
-# log prepared statement cache activity ###
-log4j.logger.org.hibernate.ps.PreparedStatementCache=info
-
-# Alfresco
-log4j.logger.org.alfresco=error
-log4j.logger.org.alfresco.repo.avm=info
-log4j.logger.org.alfresco.config=info
-log4j.logger.org.alfresco.sample=info
-log4j.logger.org.alfresco.web=info
-log4j.logger.org.alfresco.web.scripts=warn
-#log4j.logger.org.alfresco.web.ui.repo.component.UIActions=debug
-#log4j.logger.org.alfresco.web.ui.repo.tag.PageTag=debug
-#log4j.logger.org.alfresco.web.bean.clipboard=debug
-log4j.logger.org.alfresco.repo.webservice=info
-log4j.logger.org.alfresco.service.descriptor.DescriptorService=info
-#log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=info
-#log4j.logger.org.alfresco.web.ui.common.Utils=info
-log4j.logger.org.alfresco.repo.admin.patch.PatchExecuter=info
-log4j.logger.org.alfresco.repo.module.ModuleServiceImpl=info
-log4j.logger.org.alfresco.repo.domain.schema.SchemaBootstrap=info
-log4j.logger.org.alfresco.repo.admin.ConfigurationChecker=info
-log4j.logger.org.alfresco.repo.node.index.FullIndexRecoveryComponent=info
-log4j.logger.org.alfresco.util.OpenOfficeConnectionTester=warn
-log4j.logger.org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl=warn
-#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
-#log4j.logger.org.alfresco.repo.cache.EhCacheTracerJob=debug
-#log4j.logger.org.alfresco.repo.search.Indexer=debug
-#log4j.logger.org.alfresco.repo.workflow=info
-#log4j.logger.org.alfresco.repo.jscript=DEBUG
-log4j.logger.org.alfresco.repo.jscript.AlfrescoRhinoScriptDebugger=off
-
-# CIFS server debugging
-#log4j.logger.org.alfresco.smb.protocol=debug
-#log4j.logger.org.alfresco.smb.protocol.auth=debug
-#log4j.logger.org.alfresco.acegi=debug
-
-# FTP server debugging
-#log4j.logger.org.alfresco.ftp.protocol=debug
-#log4j.logger.org.alfresco.ftp.server=debug
-
-# WebDAV debugging
-#log4j.logger.org.alfresco.webdav.protocol=debug
-
-# NTLM servlet filters
-#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
-#log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug
-
-# Integrity message threshold - if 'failOnViolation' is off, then WARNINGS are generated
-log4j.logger.org.alfresco.repo.node.integrity=ERROR
-
-# New indexer debugging
-#log4j.logger.org.alfresco.repo.search.impl.lucene.index=DEBUG
-
-# Audit debugging
-# log4j.logger.org.alfresco.repo.audit=DEBUG
-# log4j.logger.org.alfresco.repo.audit.model=DEBUG
-
-# Turn off Spring remoting warnings that should really be info or debug.
-log4j.logger.org.springframework.remoting.support=error
-
-# Templating debugging
-# log4j.logger.org.alfresco.web.forms=debug
-# log4j.logger.org.chiba.xml.xforms=debug
-
-# Property sheet and modelling debugging
-# change to error to hide the warnings about missing properties and associations
-log4j.logger.alfresco.missingProperties=warn
-log4j.logger.org.alfresco.web.ui.repo.component.property.UIChildAssociation=warn
-log4j.logger.org.alfresco.web.ui.repo.component.property.UIAssociation=warn
-#log4j.logger.org.alfresco.web.ui.repo.component.property=debug
-#log4j.logger.org.alfresco.repo.dictionary.DictionaryDAO=info
-
-
-# Virtualization Server Registry
-#log4j.logger.org.alfresco.mbeans.VirtServerRegistry=debug
-
-# Link Validation debugging
-#log4j.logger.org.alfresco.linkvalidation.LinkValidationServiceImpl=debug
-#log4j.logger.org.alfresco.linkvalidation.LinkValidationStoreCallbackHandler=debug
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/README-WEB-INF.txt b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/README-WEB-INF.txt
deleted file mode 100644
index 974995c6..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/README-WEB-INF.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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.
-
-Readme for the WEB-INF overlay procedures
------------------------------------------
-- Note:
-This folder contents will be overlayed to the ${webapp.name}/WEB-INF folder. So for example a web.xml file put into this folder will overwrite (not "override" by classpath or inheritance rules) the existing web.xml.
-This is useful for example for configuring external SSO authentication filters (e.g. NTLMAuthenticationFilter)
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config-custom.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config-custom.xml
deleted file mode 100644
index 5415178f..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config-custom.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/site/apt/book-index.apt b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/site/apt/book-index.apt
deleted file mode 100644
index 3368415a..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/site/apt/book-index.apt
+++ /dev/null
@@ -1,76 +0,0 @@
- -----
- Maven Alfresco Extension Manual
- -----
- Sourcesense
- -----
-
-Introduction
-
- Welcome to the Maven Alfresco Extension Archetype manual
-
-
-How to edit this manual
-
- This page is generated from <<<$PROJECT_HOME/src/site/book-index.apt>>> file. \
- Book sections and chapters can be edited in the <<<$PROJECT_HOME/src/site/manual.xml>>> file. \
- While related POM configuration snippet follows>
-
-+-------------------------------------------
-
-
-
- org.apache.maven.doxia
- doxia-maven-plugin
- 1.0-alpha-10
-
-
- pre-site
-
- render-books
-
-
-
-
-
- target/site/books
-
-
- src/site
- src/books/manual.xml
-
-
- xdoc
-
-
- pdf
-
-
- rtf
-
-
-
-
-
-
-
-+-------------------------------------------
-
-Limitations
-
- * Book sections are matched on id, so a file named section.* must be found
- at any depth level withing the folder specified in the POM as book folder
-
- * Books cannot use property filtering
-
- * Books cannot use .vm files as filename cannot be specified, so this makes
- only static (no filtering needed) APT/XDOC/FML pages usable for both site
- and manual in a single sourcing fashion
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm
deleted file mode 100644
index 5496a147..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm
+++ /dev/null
@@ -1,48 +0,0 @@
- -----
- Maven Alfresco Extension Manual
- -----
- Sourcesense
- -----
-
-
-
-Welcome to the Maven Alfresco Extension Archetype manual
-
- You've reached the Sourcesense Maven Alfresco Extension archetype home page (version: ${site_pom_version}) .
-
-
-
-Description
-
- ${site_pom_description}
-
-
-Full documentation
-
- You can also download the full application manual {{{books/pdf/manual/manual.pdf} PDF}} or {{{books/rtf/manual/manual.rtf} RTF}} format.
-
-
-
-Quick Start (maven2)
-
- Prerequisite: Mysql running locally with empty db.name = alf_jetty and permissions for user alfresco/alfresco.
-
- For a quick start you can a run alfresco extension project by just running <<(maven 2.0.6+ required)>>:
-
---------------------------------------------
-
-mvn integration-test
-
---------------------------------------------
-
-Quick Start (Ant)
-
- For a quick start you can package alfresco by running <<(Default target : package)>> :
-
---------------------------------------------
-ant
---------------------------------------------
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/site/fml/faq.fml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/site/fml/faq.fml
deleted file mode 100644
index fc6e5f94..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/src/site/fml/faq.fml
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
- General
-
- How do I configure Eclipse?
-
-
-
Run ' mvn eclipse:eclipse '
-
"Refresh" on your Eclipse project
-
-
-
-
- Why I cannot access db "alf_[jetty,tomcat,jboss] "?
-
-
- Remember to setup appropriate permissions for selected db / build profile. You have 2 methods to configure/remove your db:
-
-
- Properly edit
- tools/mysql/db_setup.sql
- and run from project home
- mysql -u root < tools/mysql/db_setup.sql
-
-
- if you use POM property 'alfresco.db.name' you have sql files already filtered (after process-resources phase), and run
- directly
- mysql -u root -p < target/classes/tools/[db_setup,db_remove].sql
-
-
-
-
-
-
- Why do I get memory errors running jetty?
-
-
- Run your build with :
- MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn jetty:[run-war,run-exploded]
-
-
-
-
-
- Release
-
- How do I release?
-
-
-
Uncommenting in generated POM svn.tags.url and maven-release-plugin configuration
-
Ensuring dryRun="false" element in that configuration
-
- Running a single command:
- mvn release:prepare release:perforn
-
-
-
-
-
- Why my release process complains about svn LC_ALL variable?
-
-
- 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)
-
-
-
-
- Why do I get Content integrity errors on restore running with jetty embedded/during release?
-
-
Did you remove also alf_data_jetty (or how you renamed it) apart from the alf_jetty (or how you renamed it) db ;) ?
-
-
-
-
- Dependency management
-
- Why JTA can't be properly found on maven repos?
-
-
- Due to redistribution problems you have to install JTA manuall when you need it with:
-
- - Download jta-1_0_1B-classes.zip from http://java.sun.com/products/jta/ - mvn install:install-file
- -Dfile=./jta-1_0_1B-classes.zip -DgroupId=jta -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar
-
-
-
-
-
-
- Documentation
-
- Why I have duplicated properties with '_' character in my POM?
-
-
- Due to maven/velocity filtering limitation,
- dot based properties will not work in filtered site files. That's why a '_' separator is needed.
-
Welcome to the Maven Alfresco Extension Archetype manual
-
-
How to edit this manual
-
This page is generated from $PROJECT_HOME/src/site/book-index.apt
- file.
-Book sections and chapters can be edited in the $PROJECT_HOME/src/site/manual.xml
- file.
-While related POM configuration snippet follows>
-
-<!-- Adds support for books PDF and RTF generation for single sourced documentation -->
-<plugin>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-maven-plugin</artifactId>
- <version>1.0-alpha-10</version>
- <executions>
- <execution>
- <phase>pre-site</phase>
- <goals>
- <goal>render-books</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <!--
- | Target books dir: within the site so it can be linked and deployed
- | TODO: Use ${pom.target.dir} or so similar property instead of
- | hard wiring 'target'
- -->
- <generatedDocs>target/site/books</generatedDocs>
- <books>
- <book>
- <directory>src/site</directory>
- <descriptor>src/books/manual.xml</descriptor>
- <formats>
- <format>
- <id>xdoc</id>
- </format>
- <format>
- <id>pdf</id>
- </format>
- <format>
- <id>rtf</id>
- </format>
- </formats>
- </book>
- </books>
- </configuration>
-</plugin>
-
-
-
-
Limitations
-
Book sections are matched on id, so a file named section.* must be found at any depth level withing the folder specified in the POM as book folder
-
Books cannot use property filtering
-
Books cannot use .vm files as filename cannot be specified, so this makes only static (no filtering needed) APT/XDOC/FML pages usable for both site and manual in a single sourcing fashion
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/pdf/manual/manual.pdf b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/pdf/manual/manual.pdf
deleted file mode 100644
index dd48a308..00000000
Binary files a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/pdf/manual/manual.pdf and /dev/null differ
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/pdf/manual/manual.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/pdf/manual/manual.xml
deleted file mode 100644
index deb995cb..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/pdf/manual/manual.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
- Introduction
-
-
-
-
- Introduction
-
-
-
- Welcome to the Maven Alfresco Extension Archetype manual
-
-
-
-
-
- How to edit this manual
-
-
-
- This page is generated from
- $PROJECT_HOME/src/site/book-index.apt
- file.
-
- Book sections and chapters can be edited in the
- $PROJECT_HOME/src/site/manual.xml
- file.
-
- While related POM configuration snippet follows>
-
-
-
-
-
-
-
-
- Limitations
-
-
-
-
- Book sections are matched on id, so a file named section.* must be found at any depth level withing the folder specified in the POM as book folder
-
-
- Books cannot use property filtering
-
-
- Books cannot use .vm files as filename cannot be specified, so this makes only static (no filtering needed) APT/XDOC/FML pages usable for both site and manual in a single sourcing fashion
-
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/rtf/manual/manual.rtf b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/rtf/manual/manual.rtf
deleted file mode 100644
index c2810c93..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/rtf/manual/manual.rtf
+++ /dev/null
@@ -1,33 +0,0 @@
-{\rtf1\ansi\ansicpg1252
-\deff0{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fswiss\fcharset0 Arial;}{\f2\froman\fcharset2 Symbol;}}
-{\colortbl\red0\green0\blue0;\red255\green255\blue255;\red255\green0\blue0;}
-{\*\listtable
-{\list\listtemplateid247428345\hybrid
-{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelstartat1{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f2\fi0\li300\ri0\tx300}
-\listid658159304}
-}
-{\*\listoverridetable
-{\listoverride\listid658159304\listoverridecount0\ls1}
-}
-{\info{\operator iText by lowagie.com}{\creationdate \yr2008\mo3\dy1\hr19\min0\sec8}{\operator Doxia iText}{\creationdate \yr2008\mo3\dy1\hr19\min0\sec8}}
-\paperw11907\paperh16840\margl720\margr720\margt720\margb720
-{\footer }{\header }\pgwsxn11907\pghsxn16840\sectd{\footer }{\header }\pgwsxn11907\pghsxn16840\pard\li0\ri0\f1\fs48\cf2 1. \f1\fs48\cf2 Introduction\par\par\pard\li0\ri0\f1\fs44\cf0 1. \f1\fs44\cf0 Introduction \par\par\f0\fs20\cf0 \par \pard\li0\ri0\f0\fs20\cf0 \par \f1\fs20\cf0 Welcome to the Maven Alfresco Extension Archetype manual \par\par\pard\li0\ri0\f1\fs44\cf0 2. \f1\fs44\cf0 How to edit this manual \par\par\f0\fs20\cf0 \par \pard\li0\ri0\f0\fs20\cf0 \par \f1\fs20\cf0 This page is generated from $PROJECT_HOME/src/site/book-index.apt file. \f0\fs20\cf0 \par \f1\fs20\cf0 Book sections and chapters can be edited in the $PROJECT_HOME/src/site/manual.xml file. \f0\fs20\cf0 \par \f1\fs20\cf0 While related POM configuration snippet follows>\par\f1\fs20\cf0 \par\trowd
-\trftsWidth3\trwWidth10400\trkeep\trqc\trgaph10\trbrdrl\brdrs\brdrw20\brdrcf0
-\trbrdrt\brdrs\brdrw20\brdrcf0
-\trbrdrb\brdrs\brdrw20\brdrcf0
-\trbrdrr\brdrs\brdrw20\brdrcf0
-\trbrdrh\brdrs\brdrw20\brdrcf0
-\trbrdrv\brdrs\brdrw20\brdrcf0
-\trpaddl100\trpaddr100\trpaddfl3\trpaddfr3
-\clbrdrl\brdrs\brdrw10\brdrcf0
-\clbrdrt\brdrs\brdrw10\brdrcf0
-\clbrdrb\brdrs\brdrw10\brdrcf0
-\clbrdrr\brdrs\brdrw10\brdrcf0
-\clcbpat1
-\clftsWidth3
-\clwWidth10400
-\clpadl100\clpadt100\clpadr100\clpadb100\clpadfl3\clpadft3\clpadfr3\clpadfb3\cellx10400\intbl\pard\intbl\li0\ri0\f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 org.apache.maven.doxia\f0\fs20\cf0 \par \f1\fs20\cf0 doxia-maven-plugin\f0\fs20\cf0 \par \f1\fs20\cf0 1.0-alpha-10\f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 pre-site\f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 render-books\f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 target/site/books\f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 src/site\f0\fs20\cf0 \par \f1\fs20\cf0 src/books/manual.xml\f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 xdoc\f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 pdf\f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 rtf\f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \f1\fs20\cf0 \f0\fs20\cf0 \par \cell \row
-\pard\par\qc\par\pard\li0\ri0\f1\fs44\cf0 3. \f1\fs44\cf0 Limitations \par\par\f0\fs20\cf0 \par \f1\fs20\cf0 \pard\ql\fi0\li300\ri0\fs20\ls1{{\listtext\pard\f2\fi0\li300\ri0 \'b7\tab}\f1\fs20\cf0 Book sections are matched on id, so a file named section.* must be found at any depth level withing the folder specified in the POM as book folder \par
-{\listtext\pard\f2\fi0\li300\ri0 \'b7\tab}\f1\fs20\cf0 Books cannot use property filtering \par
-{\listtext\pard\f2\fi0\li300\ri0 \'b7\tab}\f1\fs20\cf0 Books cannot use .vm files as filename cannot be specified, so this makes only static (no filtering needed) APT/XDOC/FML pages usable for both site and manual in a single sourcing fashion \par
-}\pard\par\sect}
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/rtf/manual/manual.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/rtf/manual/manual.xml
deleted file mode 100644
index deb995cb..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/rtf/manual/manual.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
- Introduction
-
-
-
-
- Introduction
-
-
-
- Welcome to the Maven Alfresco Extension Archetype manual
-
-
-
-
-
- How to edit this manual
-
-
-
- This page is generated from
- $PROJECT_HOME/src/site/book-index.apt
- file.
-
- Book sections and chapters can be edited in the
- $PROJECT_HOME/src/site/manual.xml
- file.
-
- While related POM configuration snippet follows>
-
-
-
-
-
-
-
-
- Limitations
-
-
-
-
- Book sections are matched on id, so a file named section.* must be found at any depth level withing the folder specified in the POM as book folder
-
-
- Books cannot use property filtering
-
-
- Books cannot use .vm files as filename cannot be specified, so this makes only static (no filtering needed) APT/XDOC/FML pages usable for both site and manual in a single sourcing fashion
-
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/xdoc/manual/book-index.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/xdoc/manual/book-index.xml
deleted file mode 100644
index bdedcc19..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/target/site/books/xdoc/manual/book-index.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-Maven Alfresco Extension Manual
-Sourcesense
-
-
-
-
Welcome to the Maven Alfresco Extension
-Archetype manual
-
-
This page is generated from
-$PROJECT_HOME/src/site/book-index.apt
-file.
-Book sections and chapters can be edited in the
-$PROJECT_HOME/src/site/manual.xml
-file.
-While related POM configuration snippet follows>
-
-<!-- Adds support for books PDF and RTF generation for single sourced documentation -->
-<plugin>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-maven-plugin</artifactId>
- <version>1.0-alpha-10</version>
- <executions>
- <execution>
- <phase>pre-site</phase>
- <goals>
- <goal>render-books</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <!--
- | Target books dir: within the site so it can be linked and deployed
- | TODO: Use ${pom.target.dir} or so similar property instead of
- | hard wiring 'target'
- -->
- <generatedDocs>target/site/books</generatedDocs>
- <books>
- <book>
- <directory>src/site</directory>
- <descriptor>src/books/manual.xml</descriptor>
- <formats>
- <format>
- <id>xdoc</id>
- </format>
- <format>
- <id>pdf</id>
- </format>
- <format>
- <id>rtf</id>
- </format>
- </formats>
- </book>
- </books>
- </configuration>
-</plugin>
-
-
-
Book sections are matched on id, so a
-file named section.* must be found at any depth level withing the folder
-specified in the POM as book folder
-
-
Books cannot use property filtering
-
-
Books cannot use .vm files as filename cannot be specified, so this
-makes only static (no filtering needed) APT/XDOC/FML pages usable for both
-site and manual in a single sourcing fashion
The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
-
GroupId
-
ArtifactId
-
Version
-
Classifier
-
Type
-
Optional
-
-
alfresco.community
-
alfresco
-
2.1.0
-
-
-
war
-
-
-
mysql
-
mysql-connector-java
-
5.0.3
-
-
-
jar
-
-
-
-
-
provided
-
The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:
-
GroupId
-
ArtifactId
-
Version
-
Classifier
-
Type
-
Optional
-
-
alfresco.community
-
alfresco-core
-
2.1.0
-
-
-
jar
-
-
-
alfresco.community
-
alfresco-remote-api
-
2.1.0
-
-
-
jar
-
-
-
alfresco.community
-
alfresco-repository
-
2.1.0
-
-
-
jar
-
-
-
alfresco.community
-
alfresco-web-client
-
2.1.0
-
-
-
jar
-
-
-
javax.servlet
-
servlet-api
-
2.5
-
-
-
jar
-
-
-
-
-
-
Project Transitive Dependencies
-
The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.
- Remember to setup appropriate permissions for selected db / build profile. You have 2 methods to configure/remove your db:
-
-
- Properly edit
- tools/mysql/db_setup.sql
- and run from project home
- mysql -u root < tools/mysql/db_setup.sql
-
-
- if you use POM property 'alfresco.db.name' you have sql files already filtered (after process-resources phase), and run
- directly
- mysql -u root -p < target/classes/tools/[db_setup,db_remove].sql
-
- Due to redistribution problems you have to install JTA manuall when you need it with:
-
- - Download jta-1_0_1B-classes.zip from http://java.sun.com/products/jta/ - mvn install:install-file
- -Dfile=./jta-1_0_1B-classes.zip -DgroupId=jta -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar
-
-
This report includes a cross-reference of the project's sources. Each source entry is also linked with its corresponding Javadoc (if Javadoc was generated).
This document provides an overview of the various documents and links that are part of this project's general information. All of this content is automatically generated by Maven
- on behalf of the project.
This document provides information on the members of this project. These are the individuals who have contributed to the project in one form or another.
A successful project requires many people to play many roles. Some members write code or documentation, while others are valuable as testers, submitting patches and suggestions.
-
The team is comprised of Members and Contributors. Members have direct access to the source of a project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. Get involved today. All contributions to the project are greatly appreciated.
-
Members
-
There are no developers working on this project.
-
-
Contributors
-
There are no contributors listed for this project. Please check back again later.
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/ant/ant-bootstrap.sh b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/ant/ant-bootstrap.sh
deleted file mode 100755
index b8e9e7f8..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/ant/ant-bootstrap.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-#
-# This script is needed *only* in case you use Ant.
-# You *need* to run this script otherwise build will fail without finding JAR and WAR artifacts.
-# It will fetch alfresco dependencies specified in this file
-# and download them when the Ant build process is able to find them,
-# e.g.
-# - the alfresco war unpacked in the $PROJECT_HOME/tools/ant/deps/alfresco folder
-# - jars in $PROJECT_HOME/tools/ant/deps/alfresco/WEB-INF/lib will be used as jar dependencies by the build process. Change ALFRESCO_DIR accordingly to corresponding build.xml property.
-#
-# Use these properties to specify alfresco version/release from command line
-
-ALFRESCO_DIR=deps/alfresco
-ALFRESCO_VERSION="2.1.0"
-ALFRESCO_RELEASE="community"
-
-
-if [ $1 ]; then
- echo "Using command line specified ALFRESCO_VERSION=${1}"
- ALFRESCO_VERSION=$1
-else
- echo "Defaulting at ALFRESCO_VERSION=${ALFRESCO_VERSION}"
-fi
-if [ $2 ]; then
- echo "Using command line specified ALFRESCO_RELEASE=${2}"
- ALFRESCO_RELEASE=$2
- else
- echo "Defaulting at ALFRESCO_RELEASE=${ALFRESCO_RELEASE}"
-fi
-
-
-echo "[INFO]" - Downloading Alfresco ${ALFRESCO_RELEASE} ${ALFRESCO_VERSION} WAR into ${ALFRESCO_DIR}
-# Go to the target folder
-cd ${ALFRESCO_DIR}
-# Downloads alfresco
-echo "[INFO]" - Unzipping Alfresco ${ALFRESCO_RELEASE} ${ALFRESCO_VERSION} WAR into ${ALFRESCO_DIR}
-wget http://repository.sourcesense.com/maven2/alfresco/${ALFRESCO_RELEASE}/alfresco/${ALFRESCO_VERSION}/alfresco-${ALFRESCO_VERSION}.war
-unzip alfresco-${ALFRESCO_VERSION}.war
-rm -Rf alfresco-${ALFRESCO_VERSION}.war
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/ant/tasks/tomcat-tasks.properties b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/ant/tasks/tomcat-tasks.properties
deleted file mode 100644
index e6c69c25..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/ant/tasks/tomcat-tasks.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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.
-
-deploy=org.apache.catalina.ant.DeployTask
-install=org.apache.catalina.ant.InstallTask
-list=org.apache.catalina.ant.ListTask
-reload=org.apache.catalina.ant.ReloadTask
-remove=org.apache.catalina.ant.RemoveTask
-resources=org.apache.catalina.ant.ResourcesTask
-roles=org.apache.catalina.ant.RolesTask
-start=org.apache.catalina.ant.StartTask
-stop=org.apache.catalina.ant.StopTask
-undeploy=org.apache.catalina.ant.UndeployTask
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/ant/tasks/tomcat-tasks.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/ant/tasks/tomcat-tasks.xml
deleted file mode 100644
index 447c251a..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/ant/tasks/tomcat-tasks.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/export/testRestoreVersion/README-restore.txt b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/export/testRestoreVersion/README-restore.txt
deleted file mode 100644
index 486c2499..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/export/testRestoreVersion/README-restore.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-
-Restore procedure:
-------------------
-(README: Only supported for WAR integrated build ATM)
-
-1. Place here your 6 full repository export files (5 acp + 1 xml) calling the export
-package "export" (so that your file will appear like export_spaces.acp, export_users.acp, etc.)
-
-2. run your build with the property
-
-mvn clean package -DrestoreVersion=testRestoreVersion
-
-3. deploy as a war (mvn jboss:deploy)
-
-4. if you had a consistent repository/database you should have your repo fully imported
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/m2/m2-bootstrap.sh b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/m2/m2-bootstrap.sh
deleted file mode 100755
index 29bc6524..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/m2/m2-bootstrap.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash
-#
-# Name: m2-bootstrap.sh
-# Author: g.columbro@sourcesense.com
-#
-# Description:
-# This script is needed *only* in case you *don't* have you don't have alfresco artifacts available in any public repo,
-# and you can't connect to Sourcesense public repo.
-# So you can manually downlaod JAR and WAR alfresco artifacts in $BASE_DIR (1st param)
-# and have them deployed to $TARGET_REPO (2nd param) and $TARGET_REPO_URL (3rd param)
-# by running this script and passing the 5 params in the command line. 4th param indicates the version
-# while the 5th one the alfresco distro (labs vs enteprise) we're going to deploy.
-#
-# Note:
-# This script works for alfresco > 3.0 artifacts. It must be modified for
-# earlier versions (as share.war won't be present)
-#
-# License:
-# 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.
-#
-# Example run:
-# ./m2-bootstrap.sh
-# /Users/mindthegab/downloads/alfresco/alfresco-labs-war-3a.1032_2
-# ss-public
-# scp://repository.sourcesense.com/var/www/demo.sourcesense.com/maven2
-# 3a.1032
-# labs
-#
-# Artifacts will be deployed with the following pattern:
-#
-# org.alfresco:alfresco[-*]:[jar|war]:[VERSION]:[RELEASE]
-#
-# To have this fully working you need to have the following alfresco BASE_DIR layout:
-#
-# BASE_DIR
-# |____ alfresco.war
-# |____ alfresco
-# | |__ WEB-INF
-# | |__ lib
-# | |___ alfresco-*.jar
-# |____ share.war
-# |____ share
-# |__ WEB-INF
-# |__ alfresco-*.jar
-#
-# which you can easily obtain downloading an alfresco WAR distribution and unpacking both alfresco.war and share.war in folders with the same name
-
-
-# 1st command line param:
-# directory where jar and war dependencies are stored
-BASE_DIR=$1
-# 2st command line param:
-# target repo id (matches in settings)
-TARGET_REPO=$2
-# 3rd command line param:
-# target repo url
-TARGET_REPO_URL=$3
-# 4th command line param:
-# Version
-VERSION=$4
-# 5th command line param:
-# Release [labs|enterprise]
-RELEASE=$5
-
-echo "Starting Alfresco JARs uploading to repo ${TARGET_REPO} at ${TARGET_REPO_URL}
-
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco/WEB-INF/lib/alfresco-core.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-core -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco/WEB-INF/lib/alfresco-deployment.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-deployment -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco/WEB-INF/lib/alfresco-jlan-embed.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-jlan-embed -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco/WEB-INF/lib/alfresco-linkvalidation.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-linkvalidation -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco/WEB-INF/lib/alfresco-mbeans.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-mbeans -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco/WEB-INF/lib/alfresco-remote-api.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-remote-api -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco/WEB-INF/lib/alfresco-repository.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-repository -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco/WEB-INF/lib/alfresco-web-client.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-web-client -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco/WEB-INF/lib/alfresco-webscript-framework.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-webscript-framework -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/share/WEB-INF/lib/alfresco-share.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-share -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/share/WEB-INF/lib/alfresco-web-framework.jar -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco-web-framework -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=jar -Dclassifier=${RELEASE}
-
-echo "Starting Alfresco WARs uploading to repo ${TARGET_REPO} at ${TARGET_REPO_URL}
-
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/alfresco.war -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=alfresco -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=war -Dclassifier=${RELEASE}
-mvn deploy:deploy-file -Dfile=${BASE_DIR}/share.war -DrepositoryId=${TARGET_REPO} -DgroupId=org.alfresco -DartifactId=share -Dversion=${VERSION} -Durl=${TARGET_REPO_URL} -Dpackaging=war -Dclassifier=${RELEASE}
-
-echo "Artifacts uploaded"
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/mysql/db_remove.sql b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/mysql/db_remove.sql
deleted file mode 100644
index b0d925ba..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/mysql/db_remove.sql
+++ /dev/null
@@ -1 +0,0 @@
-drop database ${alfresco.db.name};
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/mysql/db_setup.sql b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/mysql/db_setup.sql
deleted file mode 100644
index 3cb054aa..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/main/resources/archetype-resources/tools/mysql/db_setup.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create database ${alfresco.db.name};
-grant all on ${alfresco.db.name}.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
-grant all on ${alfresco.db.name}.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/index.apt.vm b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/index.apt.vm
deleted file mode 100644
index 98c25834..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/index.apt.vm
+++ /dev/null
@@ -1,56 +0,0 @@
- -----
- Maven Alfresco Extension Archetype
- -----
- Alfresco
- -----
-
-
-
-Welcome to the Maven Alfresco Extension Archetype home
-
- You've reached the ({{ ${site_pom_url} }}) Maven Alfresco Extension archetype home page (version: ${site_pom_version})
-
-
-
-Description
-
- ${site_pom_description}
-
-
-
-Quick Start Project Creation
-
- For a quick start you can a maven alfresco extension project created by just running <<(maven 2.0.6+ required)>>:
-
---------------------------------------------
-mvn archetype:generate -DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
---------------------------------------------
-
- and then choose the option 'maven-alfresco-extension-archetype' and fill your custom project information. You can also do this via Eclipse
- using the m2eclipse plugin.
-
-
-
-Run your project in 3 minutes
-
- The command below allows you to package your customization, run unit tests and eventually run jetty embedded with Alfresco
-
---------------------------------------------
-mvn install -Prun
---------------------------------------------
-
- You should be able to point your browser to http://localhost:8080/alfresco and see your nice custom Alfresco running.
- You might need to raise the MAVEN_OPTS memory allocated to Maven, see the FAQ section for this {{faq.html}}. \
-
- <>:
-
- The only prerequisite is to have a Mysql instance running with proper permissions for the DB user, password and name configured in the POM.
- The default configuration can be found in the generated pom.xml file and goes as follows:
-
---------------------------------------------
- ./alf_data_jetty
- alf_jetty
- alfresco
- alfresco
---------------------------------------------
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/layout.apt.vm b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/layout.apt.vm
deleted file mode 100644
index bcda6a58..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/layout.apt.vm
+++ /dev/null
@@ -1,44 +0,0 @@
- -----
- 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
-
-
-------------------------------------------------------------------
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/profiles.apt.vm b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/profiles.apt.vm
deleted file mode 100644
index 249a8199..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/profiles.apt.vm
+++ /dev/null
@@ -1,62 +0,0 @@
-What can this build do?
-
- This Maven Alfresco build process allows you to :
-
- * develop and package
-
- * test and run (on different platforms)
-
- * document and release your Alfresco extension project (site and PDF documentation)
-
- * You can also depend on AMP files deployed on a Maven repository (either manually or using the Maven Alfresco AMP archetype),
- by adding the following <<< dependency >>> snippet to your Extension pom.xml:
-
---------------------------------------------
-
- your.company
- youramp
- 1.0-SNAPSHOT
- runtime
- amp
-
---------------------------------------------
-
- This operation will result in automated AMP unpacking in your Extension WAR file during the normal build process (e.g. <<>>).
-
-
-
-Available maven profiles:
-
- Follows a list of the accepted profiles for the Extension archetype created project:
-
- * <<-Pinitialize>> \
- Drops/creates DB and removes the alf_data POM configured directory
-
- * <<-Prun>> \
- Run Alfresco in an embedded Jetty
-
- * <<-Pjboss>> \
- Run in a locally running Jboss configured from the POM
-
- * <<-Ptomcat>> \
- Runs in a local/remote Tomcat configured from the POM
-
- * <<-Prestore>> (DEPRECATED) \
- Bootstrap a full repo from 6 ACP files (pre 3.x, now full export is disabled)
-
- * <<-Penterprise>> (DEPRECATED) \
- Pre 3.2 LDAP configuration support using ldap-autentication-context.xml and ldap-synchronization-contex.xml
-
-
-
-
-Configuration:
-
- The project created from the extension archetype is very flexible. It uses a configuration mechanism (pre 3.2) which sigles sources the all required properties in one single file (called <<>>) which is global to the whole Spring context.
- This works also against 3.2, but activities are ongoing to converge to a proper usage of the new <<>>.
-
- Properties are stored in the <<< src/main/properties/ >>> folders and env=local is considered by default. You can switch the environment
- you're building for (e.g. for a release) using the <<<-Denv=yourEnv>>> switch in the command line build.
-
- Also a number of properties are also accepted via command line of your build to give more configurability (if you're using the <<>>).
- Please check the <<>> and <<>> generated project files for more detailed comments.
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/readme.apt.vm b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/readme.apt.vm
deleted file mode 100644
index 7ad23666..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/readme.apt.vm
+++ /dev/null
@@ -1,102 +0,0 @@
-What is an Alfresco extension?
-
- We define an "Alfresco extension" (or customization) a custom build of Alfresco which does not impact on Alfresco source code (while depends on binary releases of the libraries and webapp). \
- This is realized overriding (and in certain particular cases overwriting) Alfresco default configuration using Convention over Configuration hooks (e.g. classpath:alfresco/extension/*-context.xml autoloading), in order to ease integration in enterprise environments and to simplify full lifecycle management (from scratch-start to release and deploy) also for non experienced developers, resulting in a less error prone controlled process. \
- Alternative to an "Alfresco extension" is the "Alfresco Module" (or AMP) which is meant to be deployed on an existing Alfresco instance and above all to coexist with other modules on top of this instance: as a general rule of thumb an extension is an exclusive customization while a module is one of many customizations which have a separate lifecycle (and owner). \
- For an maven2 archetype of AMP Alfresco build please have a look at:
-
- {{${site_site_url}}}
-
-
-
-Introduction:
-
- This archetype was developed by Gabriele Columbro {{http://www.mindthegab.com}}, originally for Sourcesense {{http://www.sourcesense.com}} then for Alfresco Limited {{http://www.alfresco.com}}.
- It aims to provide a standardized approach to development, release and deployment of Alfresco extensions (as opposed to AMP builds). 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 the next paragraphs. \
- 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 Ant apprach please refer instead to {{{${site_tags_url}/${site_pom_artifactId}-${site_pom_version}�src/main/resources/archetype-resources/readme-ANT.txt} Ant Readme}}.
-
-
-Features (maven2 only):
-
- For a detail of the Maven profiles to call please refer to the Usage page {{profiles.html}}, follows a high level description of the features:
-
- * <> \
- Webapp WAR dependency on Alfresco community/enterprise wars (or even environment dependent builds, e.g. WAR without log4j for Jboss-4.0.X) can be easily switched and build
- ` for different platforms in custom maven2 build profiles.
- Alfresco JAR dependency are only included for compilation (scope="provided") and IDE configuration and must manually be kept in sync with the WAR version (we used a maven style library naming, renaming Alfresco distributed libraries).
-
- * <> \
- One of the biggest flaws (and most frequent cause for runtime errors) for Alfresco (and more in general for webapplications) is a poor build system which requires manual editing of properties in the source code in a developer/environment dependent way. With this build system just by specifying the -Denv= command line property your able to switch between different buildtime/runtime properties configuration and also have all common properties in one file for simple edit. No more messing up with Spring files when what you need to change is just a property.
- Properties files are stored in src/main/properties/ and get automatically copied over the classpath to provide complete code and configuration separation. Typical examples of developer/environment dependent properties are: db connection, LDAP server connection, alf_data location, SMB/FTP server enabling and configuration.
-
- * <> \
- Alfresco bootstrap process requires manual actions to be taken, and namely to include the restore-context.xml and the 6 full repo export ACP files to be included in the alfresco/extension/restore package. With this build this becomes as easy as specifying the -DrestoreVersion= build property which will automatically pick up ACP files (alfresco package name = "export") found in tools/export/ and include them in the right position in the classpath. \
- When the property is specified also the restore-context.xml to load them is automatically included
-
- * <> \
- Fill in your application.properties with appropriate LDAP connection and synchronization values \
- and by specifying the -Denterprise build property on the command line you will have the LDAP authentication and \
- sychronization context already configured. No more hassles in digging into huge Spring files ;)
-
- * <> \
- Using cargo we're able to provide (local) Jboss and (local/remote) Tomcat deployment. \
- This comes handy both in the development phases and in the release phases when we want \
- the release operation (scm tagging, m2 repo deployment, version update, appserver deployment) to be transactional and managed by maven. \
- For additional configuration please refer to maven-cargo-plugin configuration and fine tune your $M2_HOME/conf/settings.xml (for system level settings) or ~/.m2/settings.xml (for user level settings) in order to match your host/credentials configuration
-
- * <> \
- Community artifacts (alfresco 2.x) artifacts are available on Sourcesense public repository (http://maven.alfresco.com/maven2) and allow all the default dependencies specified in this POM to be successfully retrieved with no additional configuration. \
-
-
- * <> \
- By editing the POM property in the appropriate profile you can have the setting applied where it makes sense (jboss configures everything centrally).
- Database creation/remove scripts are filtered according to the build profile, so you can directly run them for the different environment they were 'built' for.
-
- * <> \
- Using m2eclipse {{http://m2eclipse.sonatype.org}}
-
- * <> \
- One command release deploy for this artifact and for the project generated from it. See README-m2.txt for more details.
-
- * <> \
- Documentation is integrated and can be modified with one of the supported formats (Xdoc, APT, FML):
- project resources can be also linked (e.g.physical documents).\+
- Through Doxia also PDF and RTF output is supported from single sourced source files (apart from Doxia limitations) for easy enterprise integration. \
- To test an example typing <<>> will run your site in jetty embedded on port 8080, with redeployment of site source files.
- To stage the site just type <<>> and to deploy to remote site location, guess what, <<>>
-
- * <>
- 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:
-
- * {{http://www.mortbay.org/maven-plugin}}
-
- * {{http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin}}
-
- * {{http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html}}
-
- * {{http://maven.apache.org/guides/getting-started/index.html#How_do_I_filter_resource_files}}
-
- * {{http://maven.apache.org/pom.html#Final}}
-
- * {{http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html}}
-
- * {{http://jira.codehaus.org/browse/CARGO-416}}
-
- * {{http://www.javaworld.com/javaworld/jw-05-2006/jw-0529-maven.html}}
-
- * {{http://cargo.codehaus.org/Maven2+Plugin+Installation}}
-
- * {{http://cargo.codehaus.org/Deploying+to+a+running+container}}
-
- * {{http://maven.apache.org/plugins/maven-release-plugin/}}
-
- * {{http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven.html?page=2}}
-
- * {{http://maven.apache.org/doxia/references/apt-format.html}}
-
- * {{http://maven.apache.org/guides/mini/guide-site.html}}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/fml/faq.fml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/fml/faq.fml
deleted file mode 100644
index e29900e9..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/fml/faq.fml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- General
-
- How do I configure Eclipse?
-
-
-
Run ' mvn eclipse:eclipse '
-
"Refresh" on your Eclipse project
-
-
-
-
- Why I cannot access db "alf_[jetty,tomcat,jboss] "?
-
-
- Remember to setup appropriate permissions for selected db / build profile. You have 2 methods to configure/remove your db:
-
-
- Properly edit
- tools/mysql/db_setup.sql
- and run from project home
- mysql -u root < tools/mysql/db_setup.sql
-
-
- if you use POM property 'alfresco.db.name' you have sql files already filtered (after process-resources phase), and run
- directly
- mysql -u root -p < target/classes/tools/[db_setup,db_remove].sql
-
-
-
-
-
-
- Why do I get memory errors running jetty?
-
-
- Run your build with :
- MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn jetty:[run-war,run-exploded]
-
-
-
-
-
- Release
-
- How do I release?
-
-
-
Uncommenting in generated POM svn.tags.url and maven-release-plugin configuration
-
Ensuring dryRun="false" element in that configuration
-
- Running a single command:
- mvn release:prepare release:perforn
-
-
-
-
-
- Why my release process complains about svn LC_ALL variable?
-
-
- 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)
-
-
-
-
- Why do I get Content integrity errors on restore running with jetty embedded/during release?
-
-
Did you remove also alf_data_jetty (or how you renamed it) apart from the alf_jetty (or how you renamed it) db ;) ?
-
-
-
-
- Dependency management
-
- Why for creating the archetype we need an older version of the archetype plugin?
-
-
- As described here
- the -DremoteRepositories switch is broken in the latest versions of
- the maven-archetype-archetype-plugin and that's why in the command
- line for creating an artifact we manually specify an older version of the plugin:
-
- mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create ... ... ...
-
-
-
-
-
- Why JTA can't be properly found on maven repos?
-
-
- Due to redistribution problems you have to install JTA manuall when you need it with:
-
- - Download jta-1_0_1B-classes.zip from http://java.sun.com/products/jta/ - mvn install:install-file
- -Dfile=./jta-1_0_1B-classes.zip -DgroupId=jta -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar
-
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/resources/images/Alfresco-logo-transparent.gif b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/resources/images/Alfresco-logo-transparent.gif
deleted file mode 100644
index ec36f987..00000000
Binary files a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/resources/images/Alfresco-logo-transparent.gif and /dev/null differ
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/resources/maven-base.css b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/resources/maven-base.css
deleted file mode 100644
index b1ea3713..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/resources/maven-base.css
+++ /dev/null
@@ -1 +0,0 @@
-.maven {}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/site.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/site.xml
deleted file mode 100644
index 6f82d5f1..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/site.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
- org.apache.maven.skins
- maven-fluido-skin
- 1.2.1
-
-
-
- true
- true
-
- Maven Alfresco Lifecycle
- Maven Alfresco Lifecycle
- /img/Alfresco-logo-transparent.gif
- /index.html
-
-
- mindthegabz
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
- Maven alfresco Share archetype - v. ${project.version}
- ${site_site_url}
- images/Alfresco-logo-transparent.gif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/changes/changes.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/changes/changes.xml
deleted file mode 100644
index 0d7b89d4..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/changes/changes.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- Maven AMP plugin
-
-
-
-
-
-
-
- Now consistent maven plugin properties usage and support for AMP overlays and full AMP lifecycle
-
-
- Added UnArchiver to mimic MMT behavior. Not needed anymore as AMPs gets properly unpacked into a WAR artifact.
-
-
- Added plugin site documentation
-
-
- Deployed on maven repository: http://repository.sourcesense.com/maven2/org/alfresco/maven/plugins
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/AbstractAmpMojo.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/AbstractAmpMojo.java
deleted file mode 100644
index 8f983c5e..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/AbstractAmpMojo.java
+++ /dev/null
@@ -1,765 +0,0 @@
-package org.alfresco.maven.plugin.amp;
-
-/*
- * 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.
- */
-
-import org.alfresco.maven.plugin.amp.overlay.OverlayManager;
-import org.alfresco.maven.plugin.amp.packaging.AmpPackagingContext;
-import org.alfresco.maven.plugin.amp.packaging.AmpPackagingTask;
-import org.alfresco.maven.plugin.amp.packaging.AmpPostPackagingTask;
-import org.alfresco.maven.plugin.amp.packaging.AmpProjectPackagingTask;
-import org.alfresco.maven.plugin.amp.packaging.OverlayPackagingTask;
-import org.alfresco.maven.plugin.amp.packaging.SaveAmpStructurePostPackagingTask;
-import org.alfresco.maven.plugin.amp.util.AmpStructure;
-import org.alfresco.maven.plugin.amp.util.AmpStructureSerializer;
-import org.alfresco.maven.plugin.amp.util.CompositeMap;
-import org.alfresco.maven.plugin.amp.util.PropertyUtils;
-import org.alfresco.maven.plugin.amp.util.ReflectionProperties;
-
-
-import org.apache.maven.archiver.MavenArchiveConfiguration;
-import org.apache.maven.model.Resource;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.archiver.jar.JarArchiver;
-import org.codehaus.plexus.archiver.manager.ArchiverManager;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-public abstract class AbstractAmpMojo extends AbstractMojo
-{
-
- /**
- * Returns a string array of the classes and resources to be excluded from the jar excludes to be used
- * when assembling/copying the AMP.
- *
- * @return an array of tokens to exclude
- */
- protected String[] getExcludes()
- {
- List excludeList = new ArrayList();
- if ( StringUtils.isNotEmpty( mAmpJarExcludes ) )
- {
- excludeList.addAll( Arrays.asList( StringUtils.split( mAmpJarExcludes, "," ) ) );
- }
-
- return (String[]) excludeList.toArray( EMPTY_STRING_ARRAY );
- }
-
- /**
- * Returns a string array of the classes and resources to be included from the jar assembling/copying the war.
- *
- * @return an array of tokens to include
- */
- protected String[] getIncludes()
- {
- return StringUtils.split( StringUtils.defaultString( mAmpJarIncludes ), "," );
- }
-
- /**
- * Returns a string array of the resources to be included in the AMP web/ folder.
- *
- * @return an array of tokens to include
- */
- protected String[] getWebIncludes()
- {
- return StringUtils.split( StringUtils.defaultString( mAmpWebIncludes ), "," );
- }
-
- /**
- * Returns a string array of the resources to be excluded in the AMP web/ folder.
- *
- * @return an array of tokens to exclude
- */
- protected String[] getWebExcludes()
- {
- List excludeList = new ArrayList();
- if ( StringUtils.isNotEmpty( mAmpWebExcludes ) )
- {
- excludeList.addAll( Arrays.asList( StringUtils.split( mAmpWebExcludes, "," ) ) );
- }
-
- return (String[]) excludeList.toArray( EMPTY_STRING_ARRAY );
-
- }
-
-
- /**
- * Returns a string array of the excludes to be used
- * when adding dependent AMPs as an overlay onto this AMP.
- *
- * @return an array of tokens to exclude
- */
- protected String[] getDependentAmpExcludes()
- {
- String[] excludes;
- if ( StringUtils.isNotEmpty( dependentAmpExcludes ) )
- {
- excludes = StringUtils.split( dependentAmpExcludes, "," );
- }
- else
- {
- excludes = EMPTY_STRING_ARRAY;
- }
- return excludes;
- }
-
- /**
- * Returns a string array of the includes to be used
- * when adding dependent AMP as an overlay onto this AMP.
- *
- * @return an array of tokens to include
- */
- protected String[] getDependentAmpIncludes()
- {
- return StringUtils.split( StringUtils.defaultString( dependentAmpIncludes ), "," );
- }
-
- public void buildExplodedAmp( File webappDirectory )
- throws MojoExecutionException, MojoFailureException
- {
- webappDirectory.mkdirs();
-
- try
- {
- buildAmp( mProject, webappDirectory );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not build AMP", e );
- }
- }
-
-
- /**
- * Builds the webapp for the specified project with the new packaging task
- * thingy
- *
- * Classes, libraries and tld files are copied to
- * the webappDirectory during this phase.
- *
- * @param project the maven project
- * @param webappDirectory the target directory
- * @throws MojoExecutionException if an error occured while packaging the webapp
- * @throws MojoFailureException if an unexpected error occured while packaging the webapp
- * @throws IOException if an error occured while copying the files
- */
- public void buildAmp( MavenProject project, File webappDirectory )
- throws MojoExecutionException, MojoFailureException, IOException
- {
-
- AmpStructure cache;
- if ( mUseCache && mCacheFile.exists() )
- {
- cache = new AmpStructure( webappStructureSerialier.fromXml( mCacheFile ) );
- }
- else
- {
- cache = new AmpStructure( null );
- }
-
- final long startTime = System.currentTimeMillis();
- getLog().info( "Assembling AMP [" + project.getArtifactId() + "] in [" + webappDirectory + "]" );
-
- final OverlayManager overlayManager =
- new OverlayManager( mOverlays, project, dependentAmpIncludes, dependentAmpExcludes );
- final List packagingTasks = getPackagingTasks( overlayManager );
- final AmpPackagingContext context = new DefaultAmpPackagingContext( webappDirectory, cache, overlayManager );
- final Iterator it = packagingTasks.iterator();
- while ( it.hasNext() )
- {
- AmpPackagingTask ampPackagingTask = (AmpPackagingTask) it.next();
- ampPackagingTask.performPackaging( context );
- }
-
- // Post packaging
- final List postPackagingTasks = getPostPackagingTasks();
- final Iterator it2 = postPackagingTasks.iterator();
- while ( it2.hasNext() )
- {
- AmpPostPackagingTask task = (AmpPostPackagingTask) it2.next();
- task.performPostPackaging( context );
-
- }
- getLog().info( "AMP assembled in[" + ( System.currentTimeMillis() - startTime ) + " msecs]" );
-
- }
-
- /**
- * Returns a List of the {@link org.alfresco.maven.plugin.amp.packaging.AmpPackagingTask}
- * instances to invoke to perform the packaging.
- *
- * @param overlayManager the overlay manager
- * @return the list of packaging tasks
- * @throws MojoExecutionException if the packaging tasks could not be built
- */
- private List getPackagingTasks( OverlayManager overlayManager )
- throws MojoExecutionException
- {
- final List packagingTasks = new ArrayList();
- final List resolvedOverlays = overlayManager.getOverlays();
- final Iterator it = resolvedOverlays.iterator();
- while ( it.hasNext() )
- {
- Overlay overlay = (Overlay) it.next();
- if ( overlay.isCurrentProject() )
- {
- packagingTasks.add( new AmpProjectPackagingTask( mAmpResources, mModuleProperties) );
- }
- else
- {
- packagingTasks.add( new OverlayPackagingTask( overlay ) );
- }
- }
- return packagingTasks;
- }
-
-
- /**
- * Returns a List of the {@link org.alfresco.maven.plugin.amp.packaging.AmpPostPackagingTask}
- * instances to invoke to perform the post-packaging.
- *
- * @return the list of post packaging tasks
- */
- private List getPostPackagingTasks()
- {
- final List postPackagingTasks = new ArrayList();
- if ( mUseCache )
- {
- postPackagingTasks.add( new SaveAmpStructurePostPackagingTask( mCacheFile ) );
- }
- // TODO add lib scanning to detect duplicates
- return postPackagingTasks;
- }
-
-
- /**
- * The maven project.
- *
- * @parameter expression="${project}"
- * @required
- * @readonly
- */
- private MavenProject mProject;
-
- /**
- * The directory containing generated classes.
- *
- * @parameter expression="${project.build.outputDirectory}"
- * @required
- * @readonly
- */
- private File mClassesDirectory;
-
-
- /**
- * The Jar archiver needed for archiving classes directory into jar file under WEB-INF/lib.
- *
- * @parameter expression="${component.org.codehaus.plexus.archiver.Archiver#jar}"
- * @required
- */
- private JarArchiver mJarArchiver;
-
-
- /**
- * The directory where the webapp is built.
- *
- * @parameter expression="${project.build.directory}/${project.build.finalName}"
- * @required
- */
- private File mAmpDirectory;
-
- /**
- * Single directory for extra files to include in the AMP.
- *
- * @parameter expression="${project.build.outputDirectory}"
- * @required
- */
- private File mAmpConfigDirectory;
-
- /**
- * Single directory for extra files to include in the AMP.
- *
- * @parameter expression="${basedir}/src/main/webapp"
- * @required
- */
- private File mAmpWebDirectory;
-
- /**
- * The list of webResources we want to transfer.
- *
- * @parameter
- */
- private Resource[] mAmpResources;
-
- /**
- * Filters (property files) to include during the interpolation of the pom.xml.
- *
- * @parameter expression="${project.build.filters}"
- */
- private List filters;
-
- /**
- * The path to the web.xml file to use.
- *
- * @parameter expression="${maven.amp.moduleProperties}" default-value="${project.basedir}/module.properties"
- */
- private File mModuleProperties;
-
-
- /**
- * Directory to unpack dependent AMPs into if needed
- *
- * @parameter expression="${project.build.directory}/amp/work"
- * @required
- */
- private File mWorkDirectory;
-
- /**
- * The file name mapping to use to copy libraries and tlds. If no file mapping is
- * set (default) the file is copied with its standard name.
- *
- * @parameter
- * @since 2.0.3
- */
- private String mOutputFileNameMapping;
-
- /**
- * The file containing the webapp structure cache.
- *
- * @parameter expression="${project.build.directory}/amp/work/amp-cache.xml"
- * @required
- * @since 2.1
- */
- private File mCacheFile;
-
- /**
- * Whether the cache should be used to save the status of the webapp
- * accross multiple runs.
- *
- * @parameter expression="${useCache}" default-value="true"
- * @since 2.1
- */
- private boolean mUseCache = true;
-
-
-
- /**
- * To look up Archiver/UnArchiver implementations
- *
- * @parameter expression="${component.org.codehaus.plexus.archiver.manager.ArchiverManager}"
- * @required
- */
- protected ArchiverManager mArchiverManager;
-
- private static final String META_INF = "META-INF";
-
- public static final String DEFAULT_FILE_NAME_MAPPING_CLASSIFIER =
- "${artifactId}-${version}-${classifier}.${extension}";
-
- public static final String DEFAULT_FILE_NAME_MAPPING = "${artifactId}-${version}.${extension}";
-
- /**
- * The comma separated list of tokens to include in the AMP internal JAR. Default **.
- * Default is '**'.
- *
- * @parameter alias="includes"
- */
- private String mAmpJarIncludes = "**";
-
- /**
- * The comma separated list of tokens to exclude from the AMP created JAR file. By default module configuration is left outside jars.
- *
- * @parameter alias="excludes" default-value="alfresco/module/**"
- */
- private String mAmpJarExcludes;
-
-
- /**
- * The comma separated list of tokens to include in the AMP internal JAR. Default **.
- * Default is '**'.
- *
- * @parameter alias="webIncludes" default-value="**"
- */
- private String mAmpWebIncludes;
-
- /**
- * The comma separated list of tokens to exclude from the AMP created JAR file. By default module configuration is left outside jars.
- *
- * @parameter alias="webExcludes"
- */
- private String mAmpWebExcludes;
-
- /**
- * The comma separated list of tokens to include when doing
- * a AMP overlay.
- * Default is '**'
- *
- * @parameter
- */
- private String dependentAmpIncludes = "**/**";
-
- /**
- * The comma separated list of tokens to exclude when doing
- * a AMP overlay.
- *
- * @parameter
- */
- private String dependentAmpExcludes = "META-INF/**";
-
- /**
- * The overlays to apply.
- *
- * @parameter
- * @since 2.1
- */
- private List mOverlays = new ArrayList();
-
- /**
- * The maven archive configuration to use.
- *
- * @parameter
- */
- protected MavenArchiveConfiguration archive = new MavenArchiveConfiguration();
-
- private static final String[] EMPTY_STRING_ARRAY = {};
-
- private final AmpStructureSerializer webappStructureSerialier = new AmpStructureSerializer();
-
-
-
-
- // AMP packaging implementation
-
- private class DefaultAmpPackagingContext
- implements AmpPackagingContext
- {
-
-
- private final AmpStructure webappStructure;
-
- private final File mAmpDirectory;
-
- private final OverlayManager overlayManager;
-
- public DefaultAmpPackagingContext( File webappDirectory, final AmpStructure webappStructure,
- final OverlayManager overlayManager )
- {
- this.mAmpDirectory = webappDirectory;
- this.webappStructure = webappStructure;
- this.overlayManager = overlayManager;
-
- // This is kinda stupid but if we loop over the current overlays and we request the path structure
- // it will register it. This will avoid wrong warning messages in a later phase
- final Iterator it = overlayManager.getOverlayIds().iterator();
- while ( it.hasNext() )
- {
- String overlayId = (String) it.next();
- webappStructure.getStructure( overlayId );
- }
- }
-
- public MavenProject getProject()
- {
- return mProject;
- }
-
- public File getAmpDirectory()
- {
- return mAmpDirectory;
- }
-
- public File getClassesDirectory()
- {
- return mClassesDirectory;
- }
-
- public Log getLog()
- {
- return AbstractAmpMojo.this.getLog();
- }
-
- public String getOutputFileNameMapping()
- {
- return mOutputFileNameMapping;
- }
-
- public File getAmpWebDirectory()
- {
- return mAmpWebDirectory;
- }
-
- public String[] getAmpJarIncludes()
- {
- return getIncludes();
- }
-
- public String[] getAmpJarExcludes()
- {
- return getExcludes();
- }
-
- public File getOverlaysWorkDirectory()
- {
- return mWorkDirectory;
- }
-
- public ArchiverManager getArchiverManager()
- {
- return mArchiverManager;
- }
-
- public MavenArchiveConfiguration getArchive()
- {
- return archive;
- }
-
- public JarArchiver getJarArchiver()
- {
- return mJarArchiver;
- }
-
- public List getFilters()
- {
- return filters;
- }
-
- public Map getFilterProperties()
- throws MojoExecutionException
- {
- Map filterProperties = new Properties();
-
- // System properties
- filterProperties.putAll( System.getProperties() );
-
- // Project properties
- filterProperties.putAll( mProject.getProperties() );
-
- for ( Iterator i = filters.iterator(); i.hasNext(); )
- {
- String filtersfile = (String) i.next();
-
- try
- {
- Properties properties = PropertyUtils.loadPropertyFile( new File( filtersfile ), true, true );
-
- filterProperties.putAll( properties );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error loading property file '" + filtersfile + "'", e );
- }
- }
-
- // can't putAll, as ReflectionProperties doesn't enumerate - so we make a composite map with the project variables as dominant
- return new CompositeMap( new ReflectionProperties( mProject ), filterProperties );
- }
-
- public AmpStructure getAmpStructure()
- {
- return webappStructure;
- }
-
- public List getOwnerIds()
- {
- return overlayManager.getOverlayIds();
- }
-
- /**
- * @see org.alfresco.maven.plugin.amp.packaging.AmpPackagingContext#getAmpConfigDirectory()
- */
- public File getAmpConfigDirectory()
- {
- return mAmpConfigDirectory;
- }
-
- public String[] getAmpWebExcludes() {
- return getWebExcludes();
- }
-
- public String[] getAmpWebIncludes() {
- return getWebIncludes();
- }
-
- }
-
- public MavenProject getProject()
- {
- return mProject;
- }
-
- public void setProject( MavenProject project )
- {
- this.mProject = project;
- }
-
- public File getClassesDirectory()
- {
- return mClassesDirectory;
- }
-
- public void setClassesDirectory( File classesDirectory )
- {
- this.mClassesDirectory = classesDirectory;
- }
-
- public File getAmpDirectory()
- {
- return mAmpDirectory;
- }
-
- public void setAmpDirectory( File webappDirectory )
- {
- this.mAmpDirectory = webappDirectory;
- }
-
- public File getAmpSourceDirectory()
- {
- return mAmpWebDirectory;
- }
-
- public void setAmpSourceDirectory( File ampSourceDirectory )
- {
- this.mAmpWebDirectory = ampSourceDirectory;
- }
-
- public File getWebXml()
- {
- return mModuleProperties;
- }
-
- public void setWebXml( File webXml )
- {
- this.mModuleProperties = webXml;
- }
-
-
- public String getOutputFileNameMapping()
- {
- return mOutputFileNameMapping;
- }
-
- public void setOutputFileNameMapping( String outputFileNameMapping )
- {
- this.mOutputFileNameMapping = outputFileNameMapping;
- }
-
- public List getOverlays()
- {
- return mOverlays;
- }
-
- public void setOverlays( List overlays )
- {
- this.mOverlays = overlays;
- }
-
- public void addOverlay( Overlay overlay )
- {
- mOverlays.add( overlay );
- }
-
-
- public JarArchiver getJarArchiver()
- {
- return mJarArchiver;
- }
-
- public void setJarArchiver( JarArchiver jarArchiver )
- {
- this.mJarArchiver = jarArchiver;
- }
-
- public Resource[] getAmpResources()
- {
- return mAmpResources;
- }
-
- public void setAmpResources( Resource[] webResources )
- {
- this.mAmpResources = webResources;
- }
-
- public List getFilters()
- {
- return filters;
- }
-
- public void setFilters( List filters )
- {
- this.filters = filters;
- }
-
- public File getWorkDirectory()
- {
- return mWorkDirectory;
- }
-
- public void setWorkDirectory( File workDirectory )
- {
- this.mWorkDirectory = workDirectory;
- }
-
- public File getCacheFile()
- {
- return mCacheFile;
- }
-
- public void setCacheFile( File cacheFile )
- {
- this.mCacheFile = cacheFile;
- }
-
- public void setAmpSourceIncludes( String ampSourceIncludes )
- {
- this.mAmpJarIncludes = ampSourceIncludes;
- }
-
- public String getAmpJarExcludes()
- {
- return mAmpJarExcludes;
- }
-
- public void setAmpJarExcludes( String ampJarExcludes )
- {
- this.mAmpJarExcludes = ampJarExcludes;
- }
-
-
- public boolean isUseCache()
- {
- return mUseCache;
- }
-
- public void setUseCache( boolean useCache )
- {
- this.mUseCache = useCache;
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/AmpExplodedMojo.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/AmpExplodedMojo.java
deleted file mode 100644
index 9ac9880a..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/AmpExplodedMojo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.alfresco.maven.plugin.amp;
-
-/*
- * 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.
- */
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * Generate the exploded webapp
- *
- * @goal explodedAmp
- * @phase package
- * @requiresDependencyResolution runtime
- */
-public class AmpExplodedMojo extends AbstractAmpMojo
-{
- public void execute()
- throws MojoExecutionException, MojoFailureException
- {
- getLog().info( "Exploding AMP" );
-
- this.buildExplodedAmp( this.getAmpDirectory() );
- }
-
-}
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/AmpMojo.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/AmpMojo.java
deleted file mode 100644
index ca81897f..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/AmpMojo.java
+++ /dev/null
@@ -1,348 +0,0 @@
-package org.alfresco.maven.plugin.amp;
-
-/*
- * 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.
- */
-
-import org.alfresco.plexus.archiver.AmpArchiver;
-import org.apache.maven.archiver.MavenArchiver;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProjectHelper;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.jar.ManifestException;
-import org.codehaus.plexus.archiver.zip.ZipArchiver;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Build a amp/webapp.
- *
- * Note this is a modification of Emmanuel Venisse's (evenisse@apache.org) WAR
- * Mojo and has been adapted to build an Alfresco AMP.
- * @version $Id:$
- * @goal amp
- * @phase package
- * @requiresDependencyResolution runtime
- */
-public class AmpMojo extends AbstractAmpMojo
-{
- /* ====================================================================== */
- // constructors
- /* ====================================================================== */
-
- /**
- * default constructor
- */
- public AmpMojo()
- {
- this.setAmpArchiver(null);
- this.setAmpName(null);
- this.setOutputDirectory(null);
- }
-
- /* ====================================================================== */
- // properties
- /* ====================================================================== */
-
- /**
- * Whether this is the main artifact being built. Set to false if you don't want to install or
- * deploy it to the local repository instead of the default one in an execution.
- *
- * @parameter expression="${primaryArtifact}" default-value="true"
- */
- private boolean mPrimaryArtifact;
-
- /**
- * get the the internal value for the ampArchiver property.
- *
- * The ampArchiver property
- * @return Returns the internal value for the ampArchiver property.
- */
- protected AmpArchiver getAmpArchiver()
- {
- return this.mAmpArchiver;
- }
-
- /**
- * set the internal value for the ampArchiver property
- * @param pAmpArchiver The ampArchiver to set.
- */
- protected void setAmpArchiver(AmpArchiver pAmpArchiver)
- {
- this.mAmpArchiver = pAmpArchiver;
- }
-
- /**
- * get the the internal value for the ampName property.
- *
- * The ampName property
- * @return Returns the internal value for the ampName property.
- */
- protected String getAmpName()
- {
- return this.mAmpName;
- }
-
- /**
- * set the internal value for the ampName property
- * @param pAmpName The ampName to set.
- */
- protected void setAmpName(String pAmpName)
- {
- this.mAmpName = pAmpName;
- }
-
- /**
- * get the the internal value for the outputDirectory property.
- *
- * The outputDirectory property
- * @return Returns the internal value for the outputDirectory property.
- */
- protected String getOutputDirectory()
- {
- return this.mOutputDirectory;
- }
-
- /**
- * set the internal value for the outputDirectory property
- * @param pOutputDirectory The outputDirectory to set.
- */
- protected void setOutputDirectory(String pOutputDirectory)
- {
- this.mOutputDirectory = pOutputDirectory;
- }
-
- /**
- * get the the internal value for the primaryArtifact property.
- *
- * The primaryArtifact property
- * @return Returns the internal value for the primaryArtifact property.
- */
- protected boolean isPrimaryArtifact()
- {
- return this.mPrimaryArtifact;
- }
-
- /**
- * set the internal value for the primaryArtifact property
- * @param pPrimaryArtifact The primaryArtifact to set.
- */
- protected void setPrimaryArtifact(boolean pPrimaryArtifact)
- {
- this.mPrimaryArtifact = pPrimaryArtifact;
- }
-
- /**
- * get the the internal value for the projectHelper property.
- *
- * The projectHelper property
- * @return Returns the internal value for the projectHelper property.
- */
- protected MavenProjectHelper getProjectHelper()
- {
- return this.mProjectHelper;
- }
-
- /**
- * set the internal value for the projectHelper property
- * @param pProjectHelper The projectHelper to set.
- */
- protected void setProjectHelper(MavenProjectHelper pProjectHelper)
- {
- this.mProjectHelper = pProjectHelper;
- }
-
- /**
- * Overload this to produce a test-war, for example.
- */
- protected String getClassifier()
- {
- return mClassifier;
- }
-
- /**
- * set the internal value for the classifier property
- * @param pClassifier The classifier to set.
- */
- protected void setClassifier(String pClassifier)
- {
- this.mClassifier = pClassifier;
- }
-
- /* ====================================================================== */
- // public methods
- /* ====================================================================== */
-
- /**
- * Executes the WarMojo on the current project.
- *
- * @throws MojoExecutionException if an error occured while building the webapp
- */
- public void execute()
- throws MojoExecutionException,
- MojoFailureException
- {
-
- File vAmpFile = AmpMojo.getAmpFile(new File( getOutputDirectory() ), getAmpName(), getClassifier());
-
- try
- {
- this.performPackaging(vAmpFile);
- }
- catch (Exception eAssemblyFailure)
- {
- /* behavior is the same for the following exceptions:
- * DependencyResolutionRequiredException
- * ManifestException
- * IOException
- * ArchiverException
- */
- throw new MojoExecutionException( "Error assembling AMP: " + eAssemblyFailure.getMessage(), eAssemblyFailure );
- }
- }
-
- /* ====================================================================== */
- // protected methods
- /* ====================================================================== */
-
-
- /**
- * composes the full file name for the AMP and gets a file handle for that file
- * TODO: what happens when nulls are passed in
- * TODO: what does a null response mean?
- * @param pBaseDir Base directory for AMP
- * @param pFileName Final Name of AMP
- * @param pClassifier TODO: fill this in
- */
- protected static File getAmpFile( File pBasedir, String pFinalName, String pClassifier )
- {
- String vClassifier = pClassifier;
-
- if (vClassifier == null)
- {
- vClassifier = "";
- }
- else if (vClassifier.trim().length() > 0 && !vClassifier.startsWith( "-" ) )
- {
- vClassifier = "-" + vClassifier;
- }
-
- return new File(pBasedir, pFinalName + vClassifier + ".amp" );
- }
-
-
- /**
- * Generates the webapp according to the mode attribute.
- *
- * @param pAmpFile the target AMP file
- * @throws IOException
- * @throws ArchiverException
- * @throws ManifestException
- * @throws DependencyResolutionRequiredException
- *
- */
- protected void performPackaging(File pAmpFile)
- throws IOException,
- ArchiverException,
- ManifestException,
- DependencyResolutionRequiredException,
- MojoExecutionException, MojoFailureException
- {
- getLog().info( "Packaging Alfresco AMP (" + this.getAmpName() + ")" );
-
-
- this.buildExplodedAmp(this.getAmpDirectory());
-
- /* create and setup an archiver */
- MavenArchiver vArchiver = new MavenArchiver();
- vArchiver.setArchiver(this.getAmpArchiver());
- vArchiver.setOutputFile(pAmpFile);
-
- /* setup amp Archiver */
- this.getAmpArchiver().addDirectory(this.getAmpDirectory(), this.getIncludes(), this.getExcludes());
-
- // create archive
- vArchiver.createArchive(this.getProject(), archive );
-
- String vClassifier = this.getClassifier();
-
- if ( vClassifier != null )
- {
- this.getProjectHelper().attachArtifact( this.getProject(), "amp", vClassifier, pAmpFile );
- }
- else
- {
- Artifact vArtifact = this.getProject().getArtifact();
-
- if ( this.isPrimaryArtifact() )
- {
- vArtifact.setFile(pAmpFile);
- }
- else if(vArtifact.getFile() == null || vArtifact.getFile().isDirectory() )
- {
- vArtifact.setFile(pAmpFile);
- }
- }
- }
-
-
- /* ====================================================================== */
- // member fields
- /* ====================================================================== */
-
- /**
- * The directory for the generated AMP.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- */
- private String mOutputDirectory;
-
- /**
- * The name of the generated AMP.
- *
- * @parameter expression="${project.build.finalName}"
- * @required
- */
- private String mAmpName;
-
- /**
- * Classifier to add to the artifact generated. If given, the artifact will be an attachment instead.
- *
- * @parameter
- */
- private String mClassifier;
-
- /**
- * The AMP archiver.
- * @parameter expression="${component.org.codehaus.plexus.archiver.Archiver#amp}"
- * @required
- */
- private AmpArchiver mAmpArchiver;
-
-
- /**
- * @component
- */
- private MavenProjectHelper mProjectHelper;
-}
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/Overlay.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/Overlay.java
deleted file mode 100644
index 84d4d708..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/Overlay.java
+++ /dev/null
@@ -1,309 +0,0 @@
-package org.alfresco.maven.plugin.amp;
-
-/*
- * 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.
- */
-
-import org.apache.maven.artifact.Artifact;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * An overlay is a skeleton war added to another war project in order to inject a
- * functionnality, resources or any other shared component.
- *
- * Note that a particlar war dependency can be added multiple times as an overlay
- * with different includes/excludes filter; this allows building a fine grained
- * overwriting policy.
- *
- * The current project can also be described as an overlay and could not be specified
- * twice. An overlay with no groupId and no artifactId is detected as defining the
- * current project.
- *
- * @author Stephane Nicoll
- */
-public class Overlay
-{
-
- public static final String[] DEFAULT_INCLUDES = new String[]{"**/**"};
-
- public static final String[] DEFAULT_EXCLUDES = new String[]{"META-INF/MANIFEST.MF"};
-
- private static Overlay currentProjectInstance;
-
- private String id;
-
- private String groupId;
-
- private String artifactId;
-
- private String classifier = null;
-
- private String[] includes = DEFAULT_INCLUDES;
-
- private String[] excludes = DEFAULT_EXCLUDES;
-
- private boolean filtered = false;
-
- private boolean skip = false;
-
- private Artifact artifact;
-
- private String targetPath;
-
- /** default overlay type is war */
- private String type = "amp";
-
- public Overlay()
- {
- super();
- }
-
-
- public Overlay( String groupId, String artifactId )
- {
- this();
- this.groupId = groupId;
- this.artifactId = artifactId;
- }
-
- /**
- * Specify whether this overlay represents the current project or not.
- *
- * @return true if the overlay represents the current project, false otherwise
- */
- public boolean isCurrentProject()
- {
- return ( groupId == null && artifactId == null );
- }
-
- /**
- * Creates an overlay of the current project.
- *
- * @return the current project as an overlay
- */
- public static Overlay currentProjectInstance()
- {
- if ( currentProjectInstance == null )
- {
- currentProjectInstance = new Overlay();
- currentProjectInstance.setId( "currentBuild" );
- }
- return currentProjectInstance;
- }
-
- // Getters and Setters
-
- public String getId()
- {
- if ( id == null )
- {
- final StringBuffer sb = new StringBuffer();
- sb.append( getGroupId() ).append( ":" ).append( getArtifactId() );
- if ( getClassifier() != null )
- {
- sb.append( ":" ).append( getClassifier() );
- }
- id = sb.toString();
- }
- return id;
- }
-
- public void setId( String id )
- {
- this.id = id;
- }
-
- public String getGroupId()
- {
- return groupId;
- }
-
- public void setGroupId( String groupId )
- {
- this.groupId = groupId;
- }
-
- public String getArtifactId()
- {
- return artifactId;
- }
-
- public void setArtifactId( String artifactId )
- {
- this.artifactId = artifactId;
- }
-
- public String getClassifier()
- {
- return classifier;
- }
-
- public void setClassifier( String classifier )
- {
- this.classifier = classifier;
- }
-
- public String[] getIncludes()
- {
- return includes;
- }
-
- public void setIncludes( String includes )
- {
- this.includes = parse( includes );
- }
-
- public void setIncludes( String[] includes )
- {
- this.includes = includes;
- }
-
- public String[] getExcludes()
- {
- return excludes;
- }
-
- public void setExcludes( String excludes )
- {
- this.excludes = parse( excludes );
- }
-
- public void setExcludes( String[] excludes )
- {
- this.excludes = excludes;
- }
-
- public boolean isFiltered()
- {
- return filtered;
- }
-
- public void setFiltered( boolean filtered )
- {
- this.filtered = filtered;
- }
-
- public boolean shouldSkip()
- {
- return skip;
- }
-
- public void setSkip( boolean skip )
- {
- this.skip = skip;
- }
-
- public Artifact getArtifact()
- {
- return artifact;
- }
-
- public void setArtifact( Artifact artifact )
- {
- this.artifact = artifact;
- }
-
- public String getTargetPath()
- {
- return targetPath;
- }
-
-
- public void setTargetPath( String targetPath )
- {
- this.targetPath = targetPath;
- }
-
- public String getType()
- {
- return type;
- }
-
-
- public void setType( String type )
- {
- this.type = type;
- }
-
- public String toString()
- {
- return " id " + getId();
- }
-
-
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
- if ( o == null || getClass() != o.getClass() )
- {
- return false;
- }
-
- Overlay overlay = (Overlay) o;
-
- if ( excludes != null ? !Arrays.equals( excludes, overlay.excludes ) : overlay.excludes != null )
- {
- return false;
- }
- if ( getId() != null ? !getId().equals( overlay.getId() ) : overlay.getId() != null )
- {
- return false;
- }
- if ( includes != null ? !Arrays.equals( includes, overlay.includes ) : overlay.includes != null )
- {
- return false;
- }
-
- return true;
- }
-
- public int hashCode()
- {
- int result;
- result = ( getId() != null ? getId().hashCode() : 0 );
- result = 31 * result + ( includes != null ? includes.hashCode() : 0 );
- result = 31 * result + ( excludes != null ? excludes.hashCode() : 0 );
- return result;
- }
-
- private String[] parse( String s )
- {
- final List result = new ArrayList();
- if ( s == null )
- {
- return (String[]) result.toArray( new String[result.size()] );
- }
- else
- {
- String[] tokens = s.split( "," );
- for ( int i = 0; i < tokens.length; i++ )
- {
- String token = tokens[i];
- result.add( token.trim() );
- }
- return (String[]) result.toArray( new String[result.size()] );
- }
- }
-
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/overlay/DefaultOverlay.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/overlay/DefaultOverlay.java
deleted file mode 100644
index fa372807..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/overlay/DefaultOverlay.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.alfresco.maven.plugin.amp.overlay;
-
-/*
- * 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.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.alfresco.maven.plugin.amp.Overlay;
-
-/**
- * A default overlay implementation based on an {@link Artifact}.
- *
- * @author Stephane Nicoll
- */
-public class DefaultOverlay
- extends Overlay
-{
-
- /**
- * Creates an overlay for the specified artifact.
- *
- * @param a the artifact
- */
- public DefaultOverlay( Artifact a )
- {
- super();
- setGroupId( a.getGroupId() );
- setArtifactId( a.getArtifactId() );
- setClassifier( a.getClassifier() );
- setArtifact( a );
- setType( a.getType() );
- }
-
- /**
- * Creates an overlay for the specified artifact.
- *
- * @param a the artifact
- * @param includes the includes to use
- * @param excludes the excludes to use
- */
- public DefaultOverlay( Artifact a, String includes, String excludes )
- {
- this( a );
- setIncludes( includes );
- setExcludes( excludes );
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/overlay/InvalidOverlayConfigurationException.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/overlay/InvalidOverlayConfigurationException.java
deleted file mode 100644
index 6f03e751..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/overlay/InvalidOverlayConfigurationException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.alfresco.maven.plugin.amp.overlay;
-
-import org.apache.maven.plugin.MojoExecutionException;
-
-/*
- * 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.
- */
-
-/**
- * Thrown if the overlay configuration is invalid.
- *
- * @author Stephane Nicoll
- */
-public class InvalidOverlayConfigurationException
- extends MojoExecutionException
-{
-
- private static final long serialVersionUID = 1L;
-
- public InvalidOverlayConfigurationException( String string )
- {
- super( string );
- }
-
- public InvalidOverlayConfigurationException( String string, Throwable throwable )
- {
- super( string, throwable );
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/overlay/OverlayManager.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/overlay/OverlayManager.java
deleted file mode 100644
index 4a00119d..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/overlay/OverlayManager.java
+++ /dev/null
@@ -1,257 +0,0 @@
-package org.alfresco.maven.plugin.amp.overlay;
-
-/*
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
-import org.alfresco.maven.plugin.amp.Overlay;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * Manages the overlays.
- *
- *
- * @author Stephane Nicoll
- */
-public class OverlayManager
-{
- private final List overlays;
-
- private final MavenProject project;
-
- private final List artifactsOverlays;
-
- /**
- * Creates a manager with the specified overlays.
- *
- * Note that the list is potentially updated by the
- * manager so a new list is created based on the overlays.
- *
- * @param overlays the overlays
- * @param project the maven project
- * @param defaultIncludes the default includes to use
- * @param defaultExcludes the default excludes to use
- * @throws InvalidOverlayConfigurationException
- * if the config is invalid
- */
- public OverlayManager( List overlays, MavenProject project, String defaultIncludes, String defaultExcludes )
- throws InvalidOverlayConfigurationException
- {
- this.overlays = new ArrayList();
- if ( overlays != null )
- {
- this.overlays.addAll( overlays );
- }
- this.project = project;
-
- this.artifactsOverlays = getOverlaysAsArtifacts();
-
- // Initialize
- initialize( defaultIncludes, defaultExcludes );
-
- }
-
-
- /**
- * Returns the resolved overlays.
- *
- * @return the overlays
- */
- public List getOverlays()
- {
- return overlays;
- }
-
- /**
- * Returns the id of the resolved overlays.
- *
- * @return the overlay ids
- */
- public List getOverlayIds()
- {
- final Iterator it = overlays.iterator();
- final List result = new ArrayList();
- while ( it.hasNext() )
- {
- Overlay overlay = (Overlay) it.next();
- result.add( overlay.getId() );
- }
- return result;
-
- }
-
- /**
- * Intializes the manager and validates the overlays configuration.
- *
- * @param defaultIncludes the default includes to use
- * @param defaultExcludes the default excludes to use
- * @throws InvalidOverlayConfigurationException
- * if the configuration is invalid
- */
- void initialize( String defaultIncludes, String defaultExcludes )
- throws InvalidOverlayConfigurationException
- {
-
- // Build the list of configured artifacts and makes sure that each overlay
- // refer to a valid artifact
- final List configuredWarArtifacts = new ArrayList();
- final ListIterator it = overlays.listIterator();
- while ( it.hasNext() )
- {
- Overlay overlay = (Overlay) it.next();
- if ( overlay == null )
- {
- throw new InvalidOverlayConfigurationException( "overlay could not be null." );
- }
- // If it's the current project, return the project instance
- if ( overlay.isCurrentProject() )
- {
- overlay = Overlay.currentProjectInstance();
- it.set( overlay );
- }
- // default includes/excludes - only if the overlay uses the default settings
- if ( Overlay.DEFAULT_INCLUDES.equals( overlay.getIncludes() ) &&
- Overlay.DEFAULT_EXCLUDES.equals( overlay.getExcludes() ) )
- {
- overlay.setIncludes( defaultIncludes );
- overlay.setExcludes( defaultExcludes );
- }
-
- final Artifact artifact = getAssociatedArtifact( overlay );
- if ( artifact != null )
- {
- configuredWarArtifacts.add( artifact );
- overlay.setArtifact( artifact );
- }
- }
-
- // Build the list of missing overlays
- final Iterator it2 = artifactsOverlays.iterator();
- while ( it2.hasNext() )
- {
- Artifact artifact = (Artifact) it2.next();
- if ( !configuredWarArtifacts.contains( artifact ) )
- {
- // Add a default overlay for the given artifact which will be applied after
- // the ones that have been configured
- overlays.add( new DefaultOverlay( artifact, defaultIncludes, defaultExcludes ) );
- }
- }
-
- // Final validation, make sure that the current project is in there. Otherwise add it first
- final Iterator it3 = overlays.iterator();
- while ( it3.hasNext() )
- {
- Overlay overlay = (Overlay) it3.next();
- if ( overlay.equals( Overlay.currentProjectInstance() ) )
- {
- return;
- }
- }
- overlays.add( 0, Overlay.currentProjectInstance() );
- }
-
- /**
- * Returns the Artifact associated to the specified overlay.
- *
- * If the overlay defines the current project, null is
- * returned. If no artifact could not be found for the overlay
- * a InvalidOverlayConfigurationException is thrown.
- *
- * @param overlay an overlay
- * @return the artifact associated to the overlay
- * @throws org.apache.maven.plugin.war.overlay.InvalidOverlayConfigurationException
- * if the overlay does not have an associated artifact
- */
- Artifact getAssociatedArtifact( final Overlay overlay )
- throws InvalidOverlayConfigurationException
- {
- if ( overlay.isCurrentProject() )
- {
- return null;
- }
-
- for ( Iterator iterator = artifactsOverlays.iterator(); iterator.hasNext(); )
- {
- // Handle classifier dependencies properly (clash management)
- Artifact artifact = (Artifact) iterator.next();
- if ( compareOverlayWithArtifact(overlay, artifact) )
- {
- return artifact;
- }
- }
-
- // maybe its a project dependencies zip or an other type
- Set projectArtifacts = this.project.getDependencyArtifacts();
- if (projectArtifacts != null)
- {
- for( Iterator iterator = projectArtifacts.iterator();iterator.hasNext();)
- {
- Artifact artifact = (Artifact) iterator.next();
- if ( compareOverlayWithArtifact(overlay, artifact) )
- {
- return artifact;
- }
- }
- }
- throw new InvalidOverlayConfigurationException(
- "overlay[" + overlay + "] is not a dependency of the project." );
-
- }
-
- private boolean compareOverlayWithArtifact(Overlay overlay, Artifact artifact)
- {
- return ( StringUtils.equals( overlay.getGroupId(), artifact.getGroupId() )
- && StringUtils.equals( overlay.getArtifactId(), artifact.getArtifactId() )
- && StringUtils.equals( overlay.getType(), artifact.getType() ) && ( overlay.getClassifier() == null || ( StringUtils
- .equals( overlay.getClassifier(), artifact.getClassifier() ) ) ) );
- }
-
- /**
- * Returns a list of war {@link org.apache.maven.artifact.Artifact} describing
- * the overlays of the current project.
- *
- * @return the overlays as artifacts objects
- */
- private List getOverlaysAsArtifacts()
- {
- ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME );
- final Set artifacts = project.getArtifacts();
- final Iterator it = artifacts.iterator();
-
- final List result = new ArrayList();
- while ( it.hasNext() )
- {
- Artifact artifact = (Artifact) it.next();
- if ( !artifact.isOptional() && filter.include( artifact ) && ( "amp".equals( artifact.getType() ) ) )
- {
- result.add( artifact );
- }
- }
- return result;
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AbstractAmpPackagingTask.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AbstractAmpPackagingTask.java
deleted file mode 100644
index 4299c00b..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AbstractAmpPackagingTask.java
+++ /dev/null
@@ -1,409 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-/*
- * 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.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.alfresco.maven.plugin.amp.AbstractAmpMojo;
-
-import org.alfresco.maven.plugin.amp.util.MappingUtils;
-import org.alfresco.maven.plugin.amp.util.PathSet;
-import org.alfresco.maven.plugin.amp.util.AmpStructure;
-
-
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.UnArchiver;
-import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.InterpolationFilterReader;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * @author Stephane Nicoll
- */
-public abstract class AbstractAmpPackagingTask
- implements AmpPackagingTask
-{
- public static final String[] DEFAULT_INCLUDES = {"**/**"};
-
-
- public static final String META_INF_PATH = "META-INF";
-
-
- /**
- * Copies the files if possible with an optional target prefix.
- *
- * Copy uses a first-win strategy: files that have already been copied by previous
- * tasks are ignored. This method makes sure to update the list of protected files
- * which gives the list of files that have already been copied.
- *
- * If the structure of the source directory is not the same as the root of the
- * webapp, use the targetPrefix parameter to specify in which particular
- * directory the files should be copied. Use null to copy the files with
- * the same structure
- *
- * @param sourceId the source id
- * @param context the context to use
- * @param sourceBaseDir the base directory from which the sourceFilesSet will be copied
- * @param sourceFilesSet the files to be copied
- * @param targetPrefix the prefix to add to the target file name
- * @throws IOException if an error occured while copying the files
- */
- protected void copyFiles( String sourceId, AmpPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet,
- String targetPrefix )
- throws IOException
- {
- for ( Iterator iter = sourceFilesSet.iterator(); iter.hasNext(); )
- {
- final String fileToCopyName = (String) iter.next();
- final File sourceFile = new File( sourceBaseDir, fileToCopyName );
-
- String destinationFileName;
- if ( targetPrefix == null )
- {
- destinationFileName = fileToCopyName;
- }
- else
- {
- destinationFileName = targetPrefix + fileToCopyName;
- }
-
- copyFile( sourceId, context, sourceFile, destinationFileName );
- }
- }
-
- /**
- * Copies the files if possible as is.
- *
- * Copy uses a first-win strategy: files that have already been copied by previous
- * tasks are ignored. This method makes sure to update the list of protected files
- * which gives the list of files that have already been copied.
- *
- * @param sourceId the source id
- * @param context the context to use
- * @param sourceBaseDir the base directory from which the sourceFilesSet will be copied
- * @param sourceFilesSet the files to be copied
- * @throws IOException if an error occured while copying the files
- */
- protected void copyFiles( String sourceId, AmpPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet )
- throws IOException
- {
- copyFiles( sourceId, context, sourceBaseDir, sourceFilesSet, null );
- }
-
- /**
- * Copy the specified file if the target location has not yet already been used.
- *
- * The targetFileName is the relative path according to the root of
- * the generated web application.
- *
- * @param sourceId the source id
- * @param context the context to use
- * @param file the file to copy
- * @param targetFilename the relative path according to the root of the webapp
- * @throws IOException if an error occured while copying
- */
- protected void copyFile( String sourceId, final AmpPackagingContext context, final File file,
- String targetFilename )
- throws IOException
- {
- final File targetFile = new File( context.getAmpDirectory(), targetFilename );
- context.getAmpStructure().registerFile( sourceId, targetFilename, new AmpStructure.RegistrationCallback()
- {
- public void registered( String ownerId, String targetFilename )
- throws IOException
- {
- copyFile( context, file, targetFile, targetFilename, false );
- }
-
- public void alreadyRegistered( String ownerId, String targetFilename )
- throws IOException
- {
- copyFile( context, file, targetFile, targetFilename, true );
- }
-
- public void refused( String ownerId, String targetFilename, String actualOwnerId )
- throws IOException
- {
- context.getLog().debug( " - " + targetFilename + " wasn't copied because it has " +
- "already been packaged for overlay[" + actualOwnerId + "]." );
- }
-
- public void superseded( String ownerId, String targetFilename, String deprecatedOwnerId )
- throws IOException
- {
- context.getLog().info( "File[" + targetFilename + "] belonged to overlay[" + deprecatedOwnerId +
- "] so it will be overwritten." );
- copyFile( context, file, targetFile, targetFilename, false );
- }
-
- public void supersededUnknownOwner( String ownerId, String targetFilename, String unknownOwnerId )
- throws IOException
- {
- context.getLog().warn( "File[" + targetFilename + "] belonged to overlay[" + unknownOwnerId +
- "] which does not exist anymore in the current project. It is recommended to invoke " +
- "clean if the dependencies of the project changed." );
- copyFile( context, file, targetFile, targetFilename, false );
- }
- } );
- }
-
- /**
- * Copy the specified file if the target location has not yet already been
- * used and filter its content with the configureed filter properties.
- *
- * The targetFileName is the relative path according to the root of
- * the generated web application.
- *
- * @param sourceId the source id
- * @param context the context to use
- * @param file the file to copy
- * @param targetFilename the relative path according to the root of the webapp
- * @return true if the file has been copied, false otherwise
- * @throws IOException if an error occured while copying
- * @throws MojoExecutionException if an error occured while retrieving the filter properties
- */
- protected boolean copyFilteredFile( String sourceId, AmpPackagingContext context, File file, String targetFilename )
- throws IOException, MojoExecutionException
- {
-
- if ( context.getAmpStructure().registerFile( sourceId, targetFilename ) )
- {
- final File targetFile = new File( context.getAmpDirectory(), targetFilename );
- // buffer so it isn't reading a byte at a time!
- Reader fileReader = null;
- Writer fileWriter = null;
- try
- {
- // fix for MWAR-36, ensures that the parent dir are created first
- targetFile.getParentFile().mkdirs();
-
- fileReader = new BufferedReader( new FileReader( file ) );
- fileWriter = new FileWriter( targetFile );
-
- Reader reader = fileReader;
- for ( int i = 0; i < getFilterWrappers().length; i++ )
- {
- FilterWrapper wrapper = getFilterWrappers()[i];
- reader = wrapper.getReader( reader, context.getFilterProperties() );
- }
-
- IOUtil.copy( reader, fileWriter );
- }
- finally
- {
- IOUtil.close( fileReader );
- IOUtil.close( fileWriter );
- }
- // Add the file to the protected list
- context.getLog().debug( " + " + targetFilename + " has been copied." );
- return true;
- }
- else
- {
- context.getLog().debug( " - " + targetFilename + " wasn't copied because it has already been packaged." );
- return false;
- }
- }
-
-
- /**
- * Unpacks the specified file to the specified directory.
- *
- * @param context the packaging context
- * @param file the file to unpack
- * @param unpackDirectory the directory to use for th unpacked file
- * @throws MojoExecutionException if an error occured while unpacking the file
- */
- protected void doUnpack( AmpPackagingContext context, File file, File unpackDirectory )
- throws MojoExecutionException
- {
- String archiveExt = FileUtils.getExtension( file.getAbsolutePath() ).toLowerCase();
-
- // Uncompressing an AMP into another AMP does not require any
- // special treatment so we just use a zip unarchiver
- if ("amp".equals(archiveExt))
- {
- archiveExt = "zip";
- }
-
- try
- {
- UnArchiver unArchiver = context.getArchiverManager().getUnArchiver( archiveExt );
- unArchiver.setSourceFile( file );
- unArchiver.setDestDirectory( unpackDirectory );
- unArchiver.setOverwrite( true );
- unArchiver.extract();
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error unpacking file[" + file.getAbsolutePath() + "]" + "to[" +
- unpackDirectory.getAbsolutePath() + "]", e );
- }
- catch ( ArchiverException e )
- {
- throw new MojoExecutionException( "Error unpacking file[" + file.getAbsolutePath() + "]" + "to[" +
- unpackDirectory.getAbsolutePath() + "]", e );
- }
- catch ( NoSuchArchiverException e )
- {
- context.getLog().warn( "Skip unpacking dependency file[" + file.getAbsolutePath() +
- " with unknown extension[" + archiveExt + "]" );
- }
- }
-
- /**
- * Copy file from source to destination. The directories up to destination
- * will be created if they don't already exist. if the onlyIfModified flag
- * is false, destination will be overwritten if it already exists. If the
- * flag is true destination will be overwritten if it's not up to date.
- *
- *
- * @param context the packaging context
- * @param source an existing non-directory File to copy bytes from
- * @param destination a non-directory File to write bytes to (possibly overwriting).
- * @param targetFilename the relative path of the file from the webapp root directory
- * @param onlyIfModified if true, copy the file only if the source has changed, always copy otherwise
- * @return true if the file has been copied/updated, false otherwise
- * @throws IOException if source does not exist, destination cannot
- * be written to, or an IO error occurs during copying
- */
- protected boolean copyFile( AmpPackagingContext context, File source, File destination, String targetFilename,
- boolean onlyIfModified )
- throws IOException
- {
- if ( onlyIfModified && destination.lastModified() >= source.lastModified() )
- {
- context.getLog().debug( " * " + targetFilename + " is up to date." );
- return false;
- }
- else
- {
- FileUtils.copyFile( source.getCanonicalFile(), destination );
- // preserve timestamp
- destination.setLastModified( source.lastModified() );
- context.getLog().debug( " + " + targetFilename + " has been copied." );
- return true;
- }
- }
-
- /**
- * Returns the file to copy. If the includes are null or empty, the
- * default includes are used.
- *
- * @param baseDir the base directory to start from
- * @param includes the includes
- * @param excludes the excludes
- * @return the files to copy
- */
- protected PathSet getFilesToIncludes( File baseDir, String[] includes, String[] excludes )
- {
- final DirectoryScanner scanner = new DirectoryScanner();
- scanner.setBasedir( baseDir );
-
- if ( excludes != null )
- {
- scanner.setExcludes( excludes );
- }
- scanner.addDefaultExcludes();
-
- if ( includes != null && includes.length > 0 )
- {
- scanner.setIncludes( includes );
- }
- else
- {
- scanner.setIncludes( DEFAULT_INCLUDES );
- }
-
- scanner.scan();
-
- return new PathSet( scanner.getIncludedFiles() );
-
- }
-
- /**
- * Returns the final name of the specified artifact.
- *
- * If the outputFileNameMapping is set, it is used, otherwise
- * the standard naming scheme is used.
- *
- * @param context the packaging context
- * @param artifact the artifact
- * @return the converted filename of the artifact
- */
- protected String getArtifactFinalName( AmpPackagingContext context, Artifact artifact )
- {
- if ( context.getOutputFileNameMapping() != null )
- {
- return MappingUtils.evaluateFileNameMapping( context.getOutputFileNameMapping(), artifact );
- }
-
- String classifier = artifact.getClassifier();
- if ( ( classifier != null ) && !( "".equals( classifier.trim() ) ) )
- {
- return MappingUtils.evaluateFileNameMapping( AbstractAmpMojo.DEFAULT_FILE_NAME_MAPPING_CLASSIFIER,
- artifact );
- }
- else
- {
- return MappingUtils.evaluateFileNameMapping( AbstractAmpMojo.DEFAULT_FILE_NAME_MAPPING, artifact );
- }
-
- }
-
- private FilterWrapper[] getFilterWrappers()
- {
- return new FilterWrapper[]{
- // support ${token}
- new FilterWrapper()
- {
- public Reader getReader( Reader fileReader, Map filterProperties )
- {
- return new InterpolationFilterReader( fileReader, filterProperties, "${", "}" );
- }
- },
- // support @token@
- new FilterWrapper()
- {
- public Reader getReader( Reader fileReader, Map filterProperties )
- {
- return new InterpolationFilterReader( fileReader, filterProperties, "@", "@" );
- }
- }};
- }
-
- private interface FilterWrapper
- {
- Reader getReader( Reader fileReader, Map filterProperties );
- }
-
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingContext.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingContext.java
deleted file mode 100644
index cee7bca2..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingContext.java
+++ /dev/null
@@ -1,189 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-/*
- * 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.
- */
-
-import org.apache.maven.archiver.MavenArchiveConfiguration;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.logging.Log;
-import org.alfresco.maven.plugin.amp.util.AmpStructure;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.archiver.jar.JarArchiver;
-import org.codehaus.plexus.archiver.manager.ArchiverManager;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The packaging context of the AMP
- *
- * @author Stephane Nicoll - Modified version for AMP
- *
- */
-public interface AmpPackagingContext
-{
- /**
- * Returns the maven project.
- *
- * @return the project
- */
- MavenProject getProject();
-
- /**
- * Returns the webapp directory. Packaging tasks should use this
- * directory to generate the webapp.
- *
- * @return the webapp directory
- */
- File getAmpDirectory();
-
- /**
- * Returns the AMP classes + resources folder
- *
- * @return the webapp source directory
- */
- File getAmpConfigDirectory();
-
-
- /**
- * Returns the AMP web directory.
- *
- * @return the webapp source directory
- */
- File getAmpWebDirectory();
-
- /**
- * Returns the webapp source includes.
- *
- * @return the webapp source includes
- */
- String[] getAmpJarIncludes();
-
- /**
- * Returns the webapp source excludes.
- *
- * @return the webapp source excludes
- */
- String[] getAmpJarExcludes();
-
-
- /**
- * Returns the AMP web/ includes.
- *
- * @return the AMP web/ includes
- */
- String[] getAmpWebIncludes();
-
- /**
- * Returns the AMP web/ excludes.
- *
- * @return the AMP web/ excludes
- */
- String[] getAmpWebExcludes();
-
-
- /**
- * Returns the directory holding generated classes to be packed in the jar - By default is the same of the AMP configuration
- *
- * @return the classes directory
- */
- File getClassesDirectory();
-
-
- /**
- * Returns the logger to use to output logging event.
- *
- * @return the logger
- */
- Log getLog();
-
- /**
- * Returns the directory to unpack dependent WARs into if needed.
- *
- * @return the overlays work directory
- */
- File getOverlaysWorkDirectory();
-
- /**
- * Returns the archiver manager to use.
- *
- * @return the archiver manager
- */
- ArchiverManager getArchiverManager();
-
- /**
- * The maven archive configuration to use.
- *
- * @return the maven archive configuration
- */
- MavenArchiveConfiguration getArchive();
-
- /**
- * Returns the Jar archiver needed for archiving classes directory into
- * jar file under WEB-INF/lib.
- *
- * @return the jar archiver to user
- */
- JarArchiver getJarArchiver();
-
- /**
- * Returns the output file name mapping to use, if any. Returns null
- * if no file name mapping is set.
- *
- * @return the output file name mapping or null
- */
- String getOutputFileNameMapping();
-
- /**
- * Returns the list of filter files to use.
- *
- * @return a list of filter files
- */
- List getFilters();
-
- /**
- * Returns the filter properties to use to filter resources.
- *
- * TODO: this needs to be refactored to use the resource plugin somehow.
- *
- * @return a map of filter properties
- * @throws MojoExecutionException if an error occured while reading a filter file
- */
- Map getFilterProperties()
- throws MojoExecutionException;
-
- /**
- * Returns the {@link AmpStructure}.
- *
- * @return the webapp structure
- */
- AmpStructure getAmpStructure();
-
- /**
- * Returns the list of registered overlays for this session. This list might
- * differ from the one returned by the cache; in this case, it means that the
- * project's configuration has changed. The plugin will handle thos cases nicely
- * but it would be better in general to invoke the clean goal.
- *
- * @return the list of registered overlays, including the current project
- */
- List getOwnerIds();
-
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingTask.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingTask.java
deleted file mode 100644
index bc9b81ac..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingTask.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-/*
- * 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.
- */
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * The base packaging task.
- *
- * @author Stephane Nicoll
- */
-public interface AmpPackagingTask
-{
-
- /**
- * Performs the packaging for the specified task.
- *
- * The task is responsible to update the packaging context, namely
- * with the files that have been copied.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if an error occured
- * @throws MojoFailureException if the project configuration is invalid
- */
- void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException, MojoFailureException;
-
-
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPostPackagingTask.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPostPackagingTask.java
deleted file mode 100644
index a37edcf3..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPostPackagingTask.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * Defines tasks that should be performed after the packaging.
- *
- * @author Stephane Nicoll
- */
-public interface AmpPostPackagingTask
-{
-
- /**
- * Executes the post packaging task.
- *
- * The packaging context hold all information regarding the webapp that
- * has been packaged.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if an error occured
- * @throws MojoFailureException if a falure occured
- */
- void performPostPackaging( AmpPackagingContext context )
- throws MojoExecutionException, MojoFailureException;
-
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java
deleted file mode 100644
index 377a9f32..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java
+++ /dev/null
@@ -1,326 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.alfresco.maven.plugin.amp.Overlay;
-import org.alfresco.maven.plugin.amp.util.PathSet;
-
-import org.apache.maven.model.Resource;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Handles the project own resources, that is:
- *
The list of web resources, if any
- *
The content of the webapp directory if it exists
- *
The custom deployment descriptor(s), if any
- *
The content of the classes directory if it exists
- *
The dependencies of the project
- *
- *
- * @author Stephane Nicoll
- */
-public class AmpProjectPackagingTask
- extends AbstractAmpPackagingTask
-{
- private static final String MODULE_PROPERTIES = "module.properties";
-
- private static final String WEB_PATH = "web/";
-
- private static final String CONFIG_PATH = "config/";
-
- private Resource[] webResources = new Resource[0];
-
- private final File moduleProperties;
-
- private final String id;
-
-
- public AmpProjectPackagingTask( Resource[] webResource, File moduleProperties)
- {
- if ( webResources != null )
- {
- this.webResources = webResources;
- }
- this.moduleProperties = moduleProperties;
- this.id = Overlay.currentProjectInstance().getId();
- }
-
- public void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException, MojoFailureException
- {
-
- context.getLog().info( "Processing amp project" );
-
- File metainfDir = new File( context.getAmpDirectory(), META_INF_PATH );
-
- metainfDir.mkdirs();
-
- handleArtifacts( context );
-
- handleWebResources( context );
-
- handleClassesDirectory( context );
-
- handeAmpConfigDirectory( context );
-
- handeWebAppSourceDirectory( context );
-
-
- // Notice: this will work only in case we are copying only this AMP or this AMP is
- // set as last overlay of the maven-amp-plugin
- handleDeploymentDescriptors(context);
-
- }
-
-
- /**
- * Handles the web resources.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if a resource could not be copied
- */
- protected void handleWebResources( AmpPackagingContext context )
- throws MojoExecutionException
- {
- for ( int i = 0; i < webResources.length; i++ )
- {
- Resource resource = webResources[i];
- if ( !( new File( resource.getDirectory() ) ).isAbsolute() )
- {
- resource.setDirectory( context.getProject().getBasedir() + File.separator + resource.getDirectory() );
- }
-
- // Make sure that the resource directory is not the same as the webappDirectory
- if ( !resource.getDirectory().equals( context.getAmpDirectory().getPath() ) )
- {
-
- try
- {
- copyResources( context, resource );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not copy resource[" + resource.getDirectory() + "]", e );
- }
- }
- }
- }
-
- /**
- * Handles the webapp sources.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if the sources could not be copied
- */
- protected void handeWebAppSourceDirectory( AmpPackagingContext context )
- throws MojoExecutionException
- {
- if ( !context.getAmpWebDirectory().exists() )
- {
- context.getLog().debug( "AMP sources directory does not exist - skipping." );
- }
- else
- if ( !context.getAmpWebDirectory().getAbsolutePath().equals( context.getAmpDirectory().getPath() ) )
- {
- final PathSet sources = getFilesToIncludes( context.getAmpWebDirectory(),
- context.getAmpWebIncludes(),
- context.getAmpWebExcludes() );
-
- try
- {
- context.getLog().info("Copying AMP web data into " + WEB_PATH);
- copyFiles( id, context, context.getAmpWebDirectory(), sources, WEB_PATH );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException(
- "Could not copy AMP sources[" + context.getAmpDirectory().getAbsolutePath() + "]", e );
- }
- }
- }
-
- /**
- * Handles the webapp sources.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if the sources could not be copied
- */
- protected void handeAmpConfigDirectory( AmpPackagingContext context )
- throws MojoExecutionException
- {
- if ( !context.getAmpConfigDirectory().exists() )
- {
- context.getLog().debug( "AMP config directory does not exist - skipping." );
- }
- else
- {
- if ( !context.getAmpConfigDirectory().getAbsolutePath().equals( context.getAmpDirectory().getPath() ) )
- {
- final PathSet sources = getFilesToIncludes( context.getAmpConfigDirectory(),
- new String[0],
- new String[] {"**/*.class"} );
-
- try
- {
- context.getLog().info("packaging AMP config items into " + CONFIG_PATH);
- copyFiles( id, context, context.getAmpConfigDirectory(), sources, CONFIG_PATH );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException(
- "Could not copy AMP config [" + context.getAmpDirectory().getAbsolutePath() + "]", e );
- }
-
-
- }
-
-
- }
- }
-
- /**
- * Handles the webapp artifacts.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if the artifacts could not be packaged
- */
- protected void handleArtifacts( AmpPackagingContext context )
- throws MojoExecutionException
- {
- ArtifactsPackagingTask task = new ArtifactsPackagingTask( context.getProject().getArtifacts() );
- task.performPackaging( context );
- }
-
- /**
- * Handles the webapp classes.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if the classes could not be packaged
- */
- protected void handleClassesDirectory( AmpPackagingContext context )
- throws MojoExecutionException
- {
- ClassesPackagingTask task = new ClassesPackagingTask();
- task.performPackaging( context );
- }
-
- /**
- * Handles the deployment descriptors, if specified. Note that the behavior
- * here is slightly different since the customized entry always win, even if
- * an overlay has already packaged a web.xml previously.
- *
- * @param context the packaging context
- * @param webinfDir the web-inf directory
- * @param metainfDir the meta-inf directory
- * @throws MojoFailureException if the web.xml is specified but does not exist
- * @throws MojoExecutionException if an error occured while copying the descriptors
- */
- protected void handleDeploymentDescriptors( AmpPackagingContext context)
- throws MojoFailureException, MojoExecutionException
- {
- try
- {
- if ( moduleProperties != null && StringUtils.isNotEmpty( moduleProperties.getName() ) )
- {
- if ( !moduleProperties.exists() )
- {
- throw new MojoFailureException( "The specified module.properties file '" + moduleProperties + "' does not exist" );
- }
-
- if(new File(context.getAmpDirectory().getPath() + "/module.properties").exists())
- {
- context.getLog().warn("A module.properties was already present, possibly due to previous overlay. Unexpected results may happen, check your target dir");
- }
-
- //rename to module.properties
- context.getLog().info("copying " + moduleProperties + " into " + MODULE_PROPERTIES);
- copyFilteredFile(id, context, moduleProperties, MODULE_PROPERTIES);
- }
-
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Failed to copy deployment descriptor", e );
- }
- }
-
-
- /**
- * Copies webapp webResources from the specified directory.
- *
- * @param context the war packaging context to use
- * @param resource the resource to copy
- * @throws IOException if an error occured while copying the resources
- * @throws MojoExecutionException if an error occured while retrieving the filter properties
- */
- public void copyResources( AmpPackagingContext context, Resource resource )
- throws IOException, MojoExecutionException
- {
- if ( !context.getAmpDirectory().exists() )
- {
- context.getLog().warn( "Not copying AMP ampResources[" + resource.getDirectory() +
- "]: amp directory[" + context.getAmpDirectory().getAbsolutePath() + "] does not exist!" );
- }
-
- context.getLog().info( "Copy AMP ampResources[" + resource.getDirectory() + "] to[" +
- context.getAmpDirectory().getAbsolutePath() + "]" );
- String[] fileNames = getFilesToCopy( resource );
- for ( int i = 0; i < fileNames.length; i++ )
- {
- String targetFileName = fileNames[i];
- if ( resource.getTargetPath() != null )
- {
- //TODO make sure this thing is 100% safe
- targetFileName = resource.getTargetPath() + File.separator + targetFileName;
- }
- if ( resource.isFiltering() )
- {
- copyFilteredFile( id, context, new File( resource.getDirectory(), fileNames[i] ), targetFileName );
- }
- else
- {
- copyFile( id, context, new File( resource.getDirectory(), fileNames[i] ), targetFileName );
- }
- }
- }
-
-
- /**
- * Returns a list of filenames that should be copied
- * over to the destination directory.
- *
- * @param resource the resource to be scanned
- * @return the array of filenames, relative to the sourceDir
- */
- private String[] getFilesToCopy( Resource resource )
- {
- DirectoryScanner scanner = new DirectoryScanner();
- scanner.setBasedir( resource.getDirectory() );
- if ( resource.getIncludes() != null && !resource.getIncludes().isEmpty() )
- {
- scanner.setIncludes(
- (String[]) resource.getIncludes().toArray( new String[resource.getIncludes().size()] ) );
- }
- else
- {
- scanner.setIncludes( DEFAULT_INCLUDES );
- }
- if ( resource.getExcludes() != null && !resource.getExcludes().isEmpty() )
- {
- scanner.setExcludes(
- (String[]) resource.getExcludes().toArray( new String[resource.getExcludes().size()] ) );
- }
-
- scanner.addDefaultExcludes();
-
- scanner.scan();
-
- return scanner.getIncludedFiles();
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/ArtifactsPackagingTask.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/ArtifactsPackagingTask.java
deleted file mode 100644
index ee9bbd86..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/ArtifactsPackagingTask.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.alfresco.maven.plugin.amp.Overlay;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Handles the artifacts that needs to be packaged in the web application.
- *
- * @author Stephane Nicoll
- */
-public class ArtifactsPackagingTask
- extends AbstractAmpPackagingTask
-{
-
- public static final String LIB_PATH = "lib/";
-
- private final Set artifacts;
-
- private final String id;
-
-
- public ArtifactsPackagingTask( Set artifacts )
- {
- this.artifacts = artifacts;
- this.id = Overlay.currentProjectInstance().getId();
- }
-
-
- public void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException
- {
-
- final ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME );
- final List duplicates = findDuplicates( context, artifacts );
-
- for ( Iterator iter = artifacts.iterator(); iter.hasNext(); )
- {
- Artifact artifact = (Artifact) iter.next();
- String targetFileName = getArtifactFinalName( context, artifact );
-
- context.getLog().debug( "Processing: " + targetFileName );
-
- if ( duplicates.contains( targetFileName ) )
- {
- context.getLog().debug( "Duplicate found: " + targetFileName );
- targetFileName = artifact.getGroupId() + "-" + targetFileName;
- context.getLog().debug( "Renamed to: " + targetFileName );
- }
-
- if ( !artifact.isOptional() && filter.include( artifact ) )
- {
- try
- {
- String type = artifact.getType();
- if ( "tld".equals( type ) )
- {
- // copyFile( id, context, artifact.getFile(), TLD_PATH + targetFileName );
- }
- else if ( "aar".equals( type ) )
- {
- //copyFile( id, context, artifact.getFile(), SERVICES_PATH + targetFileName );
- }
- else if ( "jar".equals( type ) || "ejb".equals( type ) || "ejb-client".equals( type ) ||
- "test-jar".equals( type ) )
- {
- copyFile( id, context, artifact.getFile(), LIB_PATH + targetFileName );
- context.getLog().debug("addng " + artifact.getId() + " to AMP in " + LIB_PATH );
- }
- else if ( "par".equals( type ) )
- {
- targetFileName = targetFileName.substring( 0, targetFileName.lastIndexOf( '.' ) ) + ".jar";
- copyFile( id, context, artifact.getFile(), LIB_PATH + targetFileName );
- }
- else if ( "war".equals( type ) )
- {
- // Nothing to do here, it is an overlay and it's already handled
- }
- else if ("zip".equals( type ))
- {
- // Nothing to do here, it is an overlay and it's already handled
- }
- else if ("amp".equals( type ))
- {
- context.getLog().debug("skipping " + artifact.getId() + " in artifacts packaging phase. Will be processed in overlay");
- }
- else
- {
- context.getLog().debug(
- "Artifact of type[" + type + "] is not supported, ignoring[" + artifact + "]" );
- }
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Failed to copy file for artifact[" + artifact + "]", e );
- }
- }
- }
- }
-
- /**
- * Searches a set of artifacts for duplicate filenames and returns a list
- * of duplicates.
- *
- * @param context the packaging context
- * @param artifacts set of artifacts
- * @return List of duplicated artifacts as bundling file names
- */
- private List findDuplicates( AmpPackagingContext context, Set artifacts )
- {
- List duplicates = new ArrayList();
- List identifiers = new ArrayList();
- for ( Iterator iter = artifacts.iterator(); iter.hasNext(); )
- {
- Artifact artifact = (Artifact) iter.next();
- String candidate = getArtifactFinalName( context, artifact );
- if ( identifiers.contains( candidate ) )
- {
- duplicates.add( candidate );
- }
- else
- {
- identifiers.add( candidate );
- }
- }
- return duplicates;
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/ClassesPackagingTask.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/ClassesPackagingTask.java
deleted file mode 100644
index 24ca863c..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/ClassesPackagingTask.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.apache.maven.archiver.MavenArchiver;
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.alfresco.maven.plugin.amp.Overlay;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.jar.ManifestException;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Handles the classes directory that needs to be packaged in the web application.
- *
- * Based on the {@link AmpPackagingContext#archiveClasses()} flag the resources
- * either copied into to WEB-INF/classes directory or archived in a jar
- * within the WEB-INF/lib directory.
- *
- * @author Stephane Nicoll
- */
-public class ClassesPackagingTask
- extends AbstractAmpPackagingTask
-{
-
- private static final String LIB_PATH = "lib/";
-
- public void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException
- {
-
- /* AMP Files do not have a classes folder */
- generateJarArchive( context );
-
- }
-
- protected void generateJarArchive( AmpPackagingContext context )
- throws MojoExecutionException
- {
- //TODO use ArtifactFactory and resolve the final name the usual way instead
- final String archiveName = context.getProject().getBuild().getFinalName() + ".jar";
-
- final String targetFilename = LIB_PATH + archiveName;
-
- if ( context.getAmpStructure().registerFile( Overlay.currentProjectInstance().getId(), targetFilename ) )
- {
-
- final File libDirectory = new File( context.getAmpDirectory(), LIB_PATH );
- final File jarFile = new File( libDirectory, archiveName );
-
- try
- {
- final MavenArchiver archiver = new MavenArchiver();
- archiver.setArchiver( context.getJarArchiver() );
- archiver.setOutputFile( jarFile );
- archiver.getArchiver().addDirectory( context.getClassesDirectory(), context.getAmpJarIncludes(),
- context.getAmpJarExcludes());
- context.getLog().debug("Archiving AMP classes JAR with default excludes: " + context.getAmpJarExcludes());
- archiver.createArchive( context.getProject(), context.getArchive() );
- }
- catch ( ArchiverException e )
- {
- throw new MojoExecutionException( "Could not create classes archive", e );
- }
- catch ( ManifestException e )
- {
- throw new MojoExecutionException( "Could not create classes archive", e );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not create classes archive", e );
- }
- catch ( DependencyResolutionRequiredException e )
- {
- throw new MojoExecutionException( "Could not create classes archive", e );
- }
- }
- else
- {
- context.getLog().warn(
- "Could not generate archive classes file[" + targetFilename + "] has already been copied." );
- }
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/OverlayPackagingTask.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/OverlayPackagingTask.java
deleted file mode 100644
index 03616bff..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/OverlayPackagingTask.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-/*
- * 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.
- */
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.alfresco.maven.plugin.amp.Overlay;
-import org.alfresco.maven.plugin.amp.util.PathSet;
-import org.codehaus.plexus.util.FileUtils;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Handles an overlay.
- *
- * @author Stephane Nicoll
- */
-public class OverlayPackagingTask
- extends AbstractAmpPackagingTask
-{
- private final Overlay overlay;
-
-
- public OverlayPackagingTask( Overlay overlay )
- {
- if ( overlay == null )
- {
- throw new NullPointerException( "overlay could not be null." );
- }
- if ( overlay.equals( Overlay.currentProjectInstance() ) )
- {
- throw new IllegalStateException( "Could not handle the current project with this task." );
- }
- this.overlay = overlay;
- }
-
-
- public void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException
- {
- System.out.print( "OverlayPackagingTask performPackaging overlay.getTargetPath() " + overlay.getTargetPath());
- if ( overlay.shouldSkip() )
- {
- context.getLog().info( "Skipping overlay[" + overlay + "]" );
- }
- else
- {
- try
- {
- context.getLog().info( "Processing overlay[" + overlay + "]" );
-
- // Step1: Extract if necessary
- final File tmpDir = unpackOverlay( context, overlay );
-
- // Step2: setup
- final PathSet includes = getFilesToIncludes( tmpDir, overlay.getIncludes(), overlay.getExcludes() );
-
- // Copy
- if ( null == overlay.getTargetPath() )
- {
- copyFiles( overlay.getId(), context, tmpDir, includes );
- }
- else
- {
- // overlay.getTargetPath() must ended with /
- // if not we add it
- String targetPath = overlay.getTargetPath();
- if (!targetPath.endsWith( "/" ))
- {
- targetPath = targetPath + "/";
- }
- copyFiles( overlay.getId(), context, tmpDir, includes, targetPath );
- }
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Failed to copy file for overlay[" + overlay + "]", e );
- }
- }
- }
-
- /**
- * Unpacks the specified overlay.
- *
- * Makes sure to skip the unpack process if the overlay has
- * already been unpacked.
- *
- * @param context the packaging context
- * @param overlay the overlay
- * @return the directory containing the unpacked overlay
- * @throws MojoExecutionException if an error occured while unpacking the overlay
- */
- protected File unpackOverlay( AmpPackagingContext context, Overlay overlay )
- throws MojoExecutionException
- {
- final File tmpDir = getOverlayTempDirectory( context, overlay );
-
- // TODO: not sure it's good, we should reuse the markers of the dependency plugin
- if ( FileUtils.sizeOfDirectory( tmpDir ) == 0 ||
- overlay.getArtifact().getFile().lastModified() > tmpDir.lastModified() )
- {
- context.getLog().info( "Unpacking overlay[" + overlay + "]" );
- doUnpack( context, overlay.getArtifact().getFile(), tmpDir );
- }
- else
- {
- context.getLog().debug( "Overlay[" + overlay + "] was already unpacked" );
- }
- return tmpDir;
- }
-
- /**
- * Returns the directory to use to unpack the specified overlay.
- *
- * @param context the packaging context
- * @param overlay the overlay
- * @return the temp directory for the overlay
- */
- protected File getOverlayTempDirectory( AmpPackagingContext context, Overlay overlay )
- {
- final File groupIdDir = new File( context.getOverlaysWorkDirectory(), overlay.getGroupId() );
- if ( !groupIdDir.exists() )
- {
- groupIdDir.mkdir();
- }
- final File result = new File( groupIdDir, overlay.getArtifactId() );
- if ( !result.exists() )
- {
- result.mkdirs();
- }
- return result;
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/SaveAmpStructurePostPackagingTask.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/SaveAmpStructurePostPackagingTask.java
deleted file mode 100644
index 35a05877..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/packaging/SaveAmpStructurePostPackagingTask.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.alfresco.maven.plugin.amp.util.AmpStructureSerializer;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Saves the webapp structure cache.
- *
- * @author Stephane Nicoll
- */
-public class SaveAmpStructurePostPackagingTask
- implements AmpPostPackagingTask
-{
-
- private final File targetFile;
-
- private final AmpStructureSerializer serialier;
-
-
- public SaveAmpStructurePostPackagingTask( File targetFile )
- {
- this.targetFile = targetFile;
- this.serialier = new AmpStructureSerializer();
- }
-
- public void performPostPackaging( AmpPackagingContext context )
- throws MojoExecutionException, MojoFailureException
- {
- if ( targetFile == null )
- {
- context.getLog().debug( "Cache usage is disabled, not saving webapp structure." );
- }
- else
- {
- try
- {
- serialier.toXml( context.getAmpStructure(), targetFile );
- context.getLog().debug( "Cache saved successfully." );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not save webapp structure", e );
- }
- }
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructure.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructure.java
deleted file mode 100644
index 7805b5e4..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructure.java
+++ /dev/null
@@ -1,312 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Represents the structure of a web application composed of multiple
- * overlays. Each overlay is registered within this structure with the
- * set of files it holds.
- *
- * Note that this structure is persisted to disk at each invocation to
- * store wich owner holds which path (file).
- *
- * @author Stephane Nicoll
- */
-public class AmpStructure
-{
-
- private Map registeredFiles;
-
- private transient PathSet allFiles = new PathSet();
-
- private transient AmpStructure cache;
-
- /**
- * Creates a new empty instance.
- */
- public AmpStructure()
- {
- this.registeredFiles = new HashMap();
- this.cache = null;
- }
-
- /**
- * Creates a new instance with the specified cache.
- *
- * @param cache the cache
- */
- public AmpStructure( AmpStructure cache )
- {
- this.registeredFiles = new HashMap();
- if ( cache == null )
- {
- this.cache = new AmpStructure();
- }
- else
- {
- this.cache = cache;
- }
- }
-
-
- /**
- * Specify if the specified path is registered or not.
- *
- * @param path the relative path from the webapp root directory
- * @return true if the path is registered, false otherwise
- */
- public boolean isRegistered( String path )
- {
- return getFullStructure().contains( path );
-
- }
-
- /**
- * Registers the specified path for the specified owner. Returns true
- * if the path is not already registered, false otherwise.
- *
- * @param id the owner of the path
- * @param path the relative path from the webapp root directory
- * @return true if the file was registered successfully
- */
- public boolean registerFile( String id, String path )
- {
- if ( !isRegistered( path ) )
- {
- doRegister( id, path );
- return true;
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Registers the specified path for the specified owner. Invokes
- * the callback with the result of the registration.
- *
- * @param id the owner of the path
- * @param path the relative path from the webapp root directory
- * @param callback the callback to invoke with the result of the registration
- * @throws IOException if the callback invocation throws an IOException
- */
- public void registerFile( String id, String path, RegistrationCallback callback )
- throws IOException
- {
-
- // If the file is already in the current structure, rejects it with the current owner
- if ( isRegistered( path ) )
- {
- callback.refused( id, path, getOwner( path ) );
- }
- else
- {
- doRegister( id, path );
- // This is a new file
- if ( cache.getOwner( path ) == null )
- {
- callback.registered( id, path );
-
- } // The file already belonged to this owner
- else if ( cache.getOwner( path ).equals( id ) )
- {
- callback.alreadyRegistered( id, path );
- } // The file belongs to another owner and it's known currently
- else if ( getOwners().contains( cache.getOwner( path ) ) )
- {
- callback.superseded( id, path, cache.getOwner( path ) );
- } // The file belongs to another owner and it's unknown
- else
- {
- callback.supersededUnknownOwner( id, path, cache.getOwner( path ) );
- }
- }
- }
-
- /**
- * Returns the owner of the specified path. If the file is not
- * registered, returns null
- *
- * @param path the relative path from the webapp root directory
- * @return the owner or null.
- */
- public String getOwner( String path )
- {
- if ( !isRegistered( path ) )
- {
- return null;
- }
- else
- {
- final Iterator it = registeredFiles.keySet().iterator();
- while ( it.hasNext() )
- {
- final String owner = (String) it.next();
- final PathSet structure = getStructure( owner );
- if ( structure.contains( path ) )
- {
- return owner;
- }
-
- }
- throw new IllegalStateException(
- "Should not happen, path[" + path + "] is flagged as being registered but was not found." );
- }
-
- }
-
- /**
- * Returns the owners. Note that this the returned {@link Set} may be
- * inconsistent since it represents a persistent cache accross multiple
- * invocations.
- *
- * For instance, if an overlay was removed in this execution, it will be
- * still be there till the cache is cleaned. This happens when the clean
- * mojo is invoked.
- *
- * @return the list of owners
- */
- public Set getOwners()
- {
- return registeredFiles.keySet();
- }
-
- /**
- * Returns all paths that have been registered so far.
- *
- * @return all registered path
- */
- public PathSet getFullStructure()
- {
- return allFiles;
- }
-
- /**
- * Returns the list of registered files for the specified owner.
- *
- * @param id the owner
- * @return the list of files registered for that owner
- */
- public PathSet getStructure( String id )
- {
- PathSet pathSet = (PathSet) registeredFiles.get( id );
- if ( pathSet == null )
- {
- pathSet = new PathSet();
- registeredFiles.put( id, pathSet );
- }
- return pathSet;
- }
-
- private void doRegister( String id, String path )
- {
- getFullStructure().add( path );
- getStructure( id ).add( path );
- }
-
- private Object readResolve()
- {
- // the full structure should be resolved so let's rebuild it
- this.allFiles = new PathSet();
- final Iterator it = registeredFiles.values().iterator();
- while ( it.hasNext() )
- {
- PathSet pathSet = (PathSet) it.next();
- this.allFiles.addAll( pathSet );
- }
- return this;
- }
-
- /**
- * Callback interfce to handle events related to filepath registration in
- * the webapp.
- */
- public interface RegistrationCallback
- {
-
-
- /**
- * Called if the targetFilename for the specified ownerId
- * has been registered successfully.
- *
- * This means that the targetFilename was unknown and has been
- * registered successfully.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @throws IOException if an error occured while handling this event
- */
- void registered( String ownerId, String targetFilename )
- throws IOException;
-
- /**
- * Called if the targetFilename for the specified ownerId
- * has already been registered.
- *
- * This means that the targetFilename was known and belongs to the
- * specified owner.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @throws IOException if an error occured while handling this event
- */
- void alreadyRegistered( String ownerId, String targetFilename )
- throws IOException;
-
- /**
- * Called if the registration of the targetFilename for the
- * specified ownerId has been refused since the path already
- * belongs to the actualOwnerId.
- *
- * This means that the targetFilename was known and does not
- * belong to the specified owner.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @param actualOwnerId the actual owner
- * @throws IOException if an error occured while handling this event
- */
- void refused( String ownerId, String targetFilename, String actualOwnerId )
- throws IOException;
-
- /**
- * Called if the targetFilename for the specified ownerId
- * has been registered successfully by superseding a deprecatedOwnerId,
- * that is the previous owner of the file.
- *
- * This means that the targetFilename was known but for another
- * owner. This usually happens after a project's configuration change. As a
- * result, the file has been registered successfully to the new owner.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @param deprecatedOwnerId the previous owner that does not exist anymore
- * @throws IOException if an error occured while handling this event
- */
- void superseded( String ownerId, String targetFilename, String deprecatedOwnerId )
- throws IOException;
-
- /**
- * Called if the targetFilename for the specified ownerId
- * has been registered successfully by superseding a unknownOwnerId,
- * that is an owner that does not exist anymore in the current project.
- *
- * This means that the targetFilename was known but for an owner that
- * does not exist anymore. Hence the file has been registered successfully to
- * the new owner.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @param unknownOwnerId the previous owner that does not exist anymore
- * @throws IOException if an error occured while handling this event
- */
- void supersededUnknownOwner( String ownerId, String targetFilename, String unknownOwnerId )
- throws IOException;
-
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructureSerializer.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructureSerializer.java
deleted file mode 100644
index 2b8c0a05..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructureSerializer.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-import com.thoughtworks.xstream.XStream;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-
-/**
- * Serializes {@link AmpStructure} back and forth.
- *
- * @author Stephane Nicoll
- */
-public class AmpStructureSerializer
-{
-
- private final XStream xStream;
-
- /**
- * Creates a new instance of the serializer.
- */
- public AmpStructureSerializer()
- {
- this.xStream = new XStream();
-
- // Register aliases
- xStream.alias( "webapp-structure", AmpStructure.class );
- xStream.alias( "path-set", PathSet.class );
- }
-
-
- /**
- * Reads the {@link AmpStructure} from the specified file.
- *
- * @param file the file containing the webapp structure
- * @return the webapp structure
- * @throws IOException if an error occured while reading the structure
- */
- public AmpStructure fromXml( File file )
- throws IOException
- {
- FileReader reader = null;
-
- try
- {
- reader = new FileReader( file );
- return (AmpStructure) xStream.fromXML( reader );
- }
- finally
- {
- if ( reader != null )
- {
- reader.close();
- }
- }
- }
-
- /**
- * Saves the {@link AmpStructure} to the specified file.
- *
- * @param webappStructure the structure to save
- * @param targetFile the file to use to save the structure
- * @throws IOException if an error occured while saving the webapp structure
- */
- public void toXml( AmpStructure webappStructure, File targetFile )
- throws IOException
- {
- FileWriter writer = null;
- try
- {
- if ( !targetFile.getParentFile().exists() && !targetFile.getParentFile().mkdirs() )
- {
- throw new IOException(
- "Could not create parent[" + targetFile.getParentFile().getAbsolutePath() + "]" );
- }
-
- if ( !targetFile.exists() && !targetFile.createNewFile() )
- {
- throw new IOException( "Could not create file[" + targetFile.getAbsolutePath() + "]" );
- }
- writer = new FileWriter( targetFile );
- xStream.toXML( webappStructure, writer );
- }
- finally
- {
- if ( writer != null )
- {
- writer.close();
- }
- }
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/CompositeMap.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/CompositeMap.java
deleted file mode 100644
index 651ebc51..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/CompositeMap.java
+++ /dev/null
@@ -1,61 +0,0 @@
- package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import java.util.AbstractMap;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @version $Id: CompositeMap.java 565036 2007-08-12 10:26:14Z snicoll $
- * @todo merge with resources/assembly plugin
- */
-public class CompositeMap
- extends AbstractMap
-{
- private Map recessive;
-
- private Map dominant;
-
- public CompositeMap( Map dominant, Map recessive )
- {
- this.dominant = Collections.unmodifiableMap( dominant );
-
- this.recessive = Collections.unmodifiableMap( recessive );
- }
-
- public synchronized Object get( Object key )
- {
- Object value = dominant.get( key );
-
- if ( value == null )
- {
- value = recessive.get( key );
- }
-
- return value;
- }
-
- public Set entrySet()
- {
- throw new UnsupportedOperationException( "Cannot enumerate properties in a composite map" );
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/MappingUtils.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/MappingUtils.java
deleted file mode 100644
index 5f1c24f2..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/MappingUtils.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.util.interpolation.ObjectBasedValueSource;
-import org.codehaus.plexus.util.interpolation.RegexBasedInterpolator;
-import org.codehaus.plexus.util.interpolation.ValueSource;
-
-import java.util.Properties;
-
-/**
- * Utilities used to evaluate expression.
- *
- * TODO: this comes from the assembly plugin; refactor when it's shared.
- *
- * The expression might use any fied of the {@link Artifact} interface. Some
- * examples might be:
- *
- *
${artifactId}-${version}.${extension}
- *
${artifactId}.${extension}
- *
- *
- * @author Stephane Nicoll
- */
-public class MappingUtils
-{
-
- /**
- * Evaluates the specified expression for the given artifact.
- *
- * @param expression the expression to evaluate
- * @param artifact the artifact to use as value object for tokens
- * @return expression the evaluated expression
- */
- public static String evaluateFileNameMapping( String expression, Artifact artifact )
-
- {
- String value = expression;
-
- // FIXME: This is BAD! Accessors SHOULD NOT change the behavior of the object.
- artifact.isSnapshot();
-
- RegexBasedInterpolator interpolator = new RegexBasedInterpolator();
-
- interpolator.addValueSource( new ObjectBasedValueSource( artifact ) );
- interpolator.addValueSource( new ObjectBasedValueSource( artifact.getArtifactHandler() ) );
-
- Properties classifierMask = new Properties();
- classifierMask.setProperty( "classifier", "" );
-
- interpolator.addValueSource( new PropertiesInterpolationValueSource( classifierMask ) );
-
- value = interpolator.interpolate( value, "__artifact" );
-
- return value;
- }
-
-
- static class PropertiesInterpolationValueSource
- implements ValueSource
- {
-
- private final Properties properties;
-
- public PropertiesInterpolationValueSource( Properties properties )
- {
- this.properties = properties;
- }
-
- public Object getValue( String key )
- {
- return properties.getProperty( key );
- }
-
- }
-
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/PathSet.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/PathSet.java
deleted file mode 100644
index 0453db36..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/PathSet.java
+++ /dev/null
@@ -1,284 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * Set of file's paths.
- *
- * The class extends functionality of a "normal" set of strings by a process of
- * the paths normalization. All paths are converted to unix form (slashes) and
- * they don't start with starting /.
- *
- * @author Piotr Tabor
- */
-
-public class PathSet
-{
-
- /**
- * Set of normalized paths
- */
- private Set/* */pathsSet = new LinkedHashSet();
-
- /**
- * The method normalizes the path.
- *
- *
- *
changes directory separator to unix's separator(/)
- *
deletes all trailing slashes
- *
- *
- * @param path to normalization
- * @return normalized path
- */
- protected String normalizeFilePath( String path )
- {
- return normalizeFilePathStatic( path );
- }
-
- /*-------------------- Business interface ------------------------------*/
-
- /**
- * Creates an empty paths set
- */
- public PathSet()
- {
- /*Empty default constructor*/
- }
-
- /**
- * Creates paths set and normalizate and adds all 'paths'.
- * The source 'paths' will not be changed
- *
- * @param paths to be added
- */
- public PathSet( Collection/*String>*/ paths )
- {
- addAll( paths );
- }
-
- /**
- * Creates paths set and normalizate and adds all 'paths'.
- * The source 'paths' will not be changed
- *
- * @param paths to be added
- */
- public PathSet( String[] paths )
- {
- addAll( paths );
- }
-
- /**
- * Normalizes and adds given path to the set.
- *
- * @param path to be added
- */
- public void add( String path )
- {
- pathsSet.add( normalizeFilePath( path ) );
- }
-
- /**
- * Normalizes and adds given paths (collection of strings)
- * to the set. The source collection will not be changed
- *
- * @param paths - collection of strings to be added
- * @param prefix added to all given paths
- */
- public void addAll( Collection/**/ paths, String prefix )
- {
- for ( Iterator iter = paths.iterator(); iter.hasNext(); )
- {
- add( prefix + iter.next() );
- }
- }
-
- /**
- * Normalizes and adds given paths to the set.
- * The source collection will not be changed
- *
- * @param paths to be added
- * @param prefix added to all given paths
- */
- public void addAll( String[] paths, String prefix )
- {
- for ( int i = 0; i < paths.length; i++ )
- {
- add( prefix + paths[i] );
- }
- }
-
- /**
- * Adds given paths to the set.
- * The source collection will not be changed
- *
- * @param paths to be added
- * @param prefix added to all given paths
- */
- public void addAll( PathSet paths, String prefix )
- {
- for ( Iterator iter = paths.iterator(); iter.hasNext(); )
- {
- add( prefix + iter.next() );
- }
- }
-
- /**
- * Normalizes and adds given paths (collection of strings)
- * to the set. The source collection will not be changed
- *
- * @param paths - collection of strings to be added
- */
- public void addAll( Collection/**/ paths )
- {
- addAll( paths, "" );
- }
-
- /**
- * Normalizes and adds given paths to the set.
- * The source collection will not be changed
- *
- * @param paths to be added
- */
- public void addAll( String[] paths )
- {
- addAll( paths, "" );
- }
-
- /**
- * Adds given paths to the set.
- * The source collection will not be changed
- *
- * @param paths to be added
- */
- public void addAll( PathSet paths )
- {
- addAll( paths, "" );
- }
-
- /**
- * Checks if the set constains given path. The path is normalized
- * before check.
- *
- * @param path we are looking for in the set.
- * @return information if the set constains the path.
- */
- public boolean contains( String path )
- {
- return pathsSet.contains( normalizeFilePath( path ) );
- }
-
- /**
- * Returns iterator of normalized paths (strings)
- *
- * @return iterator of normalized paths (strings)
- */
- public Iterator iterator()
- {
- return pathsSet.iterator();
- }
-
- /**
- * Adds given prefix to all paths in the set.
- *
- * The prefix should be ended by '/'. The generated paths are normalized.
- *
- * @param prefix to be added to all items
- */
- public void addPrefix( String prefix )
- {
- final Set/**/ newSet = new HashSet();
- for ( Iterator iter = pathsSet.iterator(); iter.hasNext(); )
- {
- String path = (String) iter.next();
- newSet.add( normalizeFilePath( prefix + path ) );
- }
- pathsSet = newSet;
- }
-
- /**
- * Returns count of the paths in the set
- *
- * @return count of the paths in the set
- */
- public int size()
- {
- return pathsSet.size();
- }
-
- /**
- * Adds to the set all files in the given directory
- *
- * @param directory that will be searched for file's paths to add
- * @param prefix to be added to all found files
- */
- public void addAllFilesInDirectory( File directory, String prefix )
- {
- DirectoryScanner scanner = new DirectoryScanner();
- scanner.setBasedir( directory );
- scanner.scan();
- addAll( scanner.getIncludedFiles(), prefix );
- }
-
- /*-------------------- Universal static mathods ------------------------*/
- /**
- * The method normalizes the path.
- *
- *
- *
changes directory separator to unix's separator(/)
- *
deletes all trailing slashes
- *
- *
- * @param path to normalization
- * @return normalized path
- */
- public static String normalizeFilePathStatic( String path )
- {
- return trimTrailingSlashes( StringUtils.replace( path, '\\', '/' ) );
- }
-
- /**
- * The method deletes all trailing slashes from the given string
- *
- * @param str a string
- * @return trimed string
- */
- public static String trimTrailingSlashes( String str )
- {
- int i;
- for ( i = 0; i < str.length() && str.charAt( i ) == '/'; i++ )
- /* just calculate i */
- {
-
- }
- return str.substring( i );
- }
-
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/PropertyUtils.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/PropertyUtils.java
deleted file mode 100644
index b4f79ff6..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/PropertyUtils.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import org.codehaus.plexus.util.IOUtil;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Properties;
-
-/**
- * @author Kenney Westerhof
- * @version $Id: PropertyUtils.java 565036 2007-08-12 10:26:14Z snicoll $
- * @todo this is duplicated from the resources plugin - migrate to plexus-util
- */
-public final class PropertyUtils
-{
- private PropertyUtils()
- {
- // prevent instantiation
- }
-
- /**
- * Reads a property file, resolving all internal variables.
- *
- * @param propfile The property file to load
- * @param fail wheter to throw an exception when the file cannot be loaded or to return null
- * @param useSystemProps wheter to incorporate System.getProperties settings into the returned Properties object.
- * @return the loaded and fully resolved Properties object
- * @throws IOException if an error failed while loading the properties
- */
- public static Properties loadPropertyFile( File propfile, boolean fail, boolean useSystemProps )
- throws IOException
- {
- Properties props = new Properties();
-
- if ( useSystemProps )
- {
- props = new Properties( System.getProperties() );
- }
-
- if ( propfile.exists() )
- {
- FileInputStream inStream = new FileInputStream( propfile );
- try
- {
- props.load( inStream );
- }
- finally
- {
- IOUtil.close( inStream );
- }
- }
- else if ( fail )
- {
- throw new FileNotFoundException( propfile.toString() );
- }
-
- for ( Enumeration n = props.propertyNames(); n.hasMoreElements(); )
- {
- String k = (String) n.nextElement();
- props.setProperty( k, PropertyUtils.getPropertyValue( k, props ) );
- }
-
- return props;
- }
-
-
- /**
- * Retrieves a property value, replacing values like ${token}
- * using the Properties to look them up.
- *
- * It will leave unresolved properties alone, trying for System
- * properties, and implements reparsing (in the case that
- * the value of a property contains a key), and will
- * not loop endlessly on a pair like
- * test = ${test}.
- *
- * @param k the token
- * @param p the properties containing the filter values
- * @return the value
- */
- private static String getPropertyValue( String k, Properties p )
- {
- // This can also be done using InterpolationFilterReader,
- // but it requires reparsing the file over and over until
- // it doesn't change.
-
- String v = p.getProperty( k );
- String ret = "";
- int idx, idx2;
-
- while ( ( idx = v.indexOf( "${" ) ) >= 0 )
- {
- // append prefix to result
- ret += v.substring( 0, idx );
-
- // strip prefix from original
- v = v.substring( idx + 2 );
-
- // if no matching } then bail
- if ( ( idx2 = v.indexOf( '}' ) ) < 0 )
- {
- break;
- }
-
- // strip out the key and resolve it
- // resolve the key/value for the ${statement}
- String nk = v.substring( 0, idx2 );
- v = v.substring( idx2 + 1 );
- String nv = p.getProperty( nk );
-
- // try global environment..
- if ( nv == null )
- {
- nv = System.getProperty( nk );
- }
-
- // if the key cannot be resolved,
- // leave it alone ( and don't parse again )
- // else prefix the original string with the
- // resolved property ( so it can be parsed further )
- // taking recursion into account.
- if ( nv == null || nv.equals( k ) )
- {
- ret += "${" + nk + "}";
- }
- else
- {
- v = nv + v;
- }
- }
- return ret + v;
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/ReflectionProperties.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/ReflectionProperties.java
deleted file mode 100644
index 197df8d5..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/maven/plugin/amp/util/ReflectionProperties.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
-
-import java.util.AbstractMap;
-import java.util.Set;
-
-/**
- * @version $Id: ReflectionProperties.java 565036 2007-08-12 10:26:14Z snicoll $
- * @todo merge with resources/assembly plugin
- */
-public class ReflectionProperties
- extends AbstractMap
-{
- private MavenProject project;
-
- public ReflectionProperties( MavenProject project )
- {
- this.project = project;
- }
-
- public synchronized Object get( Object key )
- {
- Object value = null;
- try
- {
- value = ReflectionValueExtractor.evaluate( String.valueOf( key ), project );
- }
- catch ( Exception e )
- {
- //TODO: remove the try-catch block when ReflectionValueExtractor.evaluate() throws no more exceptions
- }
- return value;
- }
-
- public Set entrySet()
- {
- throw new UnsupportedOperationException( "Cannot enumerate properties in a project" );
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/plexus/archiver/AmpArchiver.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/plexus/archiver/AmpArchiver.java
deleted file mode 100644
index 7ea605ea..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/plexus/archiver/AmpArchiver.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package org.alfresco.plexus.archiver;
-
-import java.io.File;
-import java.io.IOException;
-import org.codehaus.plexus.archiver.*;
-import org.codehaus.plexus.archiver.jar.JarArchiver;
-import org.codehaus.plexus.archiver.zip.ZipOutputStream;
-
-public class AmpArchiver extends JarArchiver
-{
-
- public AmpArchiver()
- {
- super.archiveType = "amp";
- }
-
- public void setModuleProperties(File descr)
- throws ArchiverException
- {
-// deploymentDescriptor = descr;
-// if(!deploymentDescriptor.exists())
-// {
-// throw new ArchiverException("Deployment descriptor: " + deploymentDescriptor + " does not exist.");
-// } else
-// {
-// addFile(descr, "config/AMP-INF/module.properties");
-// return;
-// }
- }
-
- public void addLib(File fileName)
- throws ArchiverException
- {
- addDirectory(fileName.getParentFile(), "lib/", new String[] {
- fileName.getName()
- }, null);
- }
-
- public void addLibs(File directoryName, String includes[], String excludes[])
- throws ArchiverException
- {
- addDirectory(directoryName, "lib/", includes, excludes);
- }
-
- public void addClass(File fileName)
- throws ArchiverException
- {
- addDirectory(fileName.getParentFile(), "classes/", new String[] {
- fileName.getName()
- }, null);
- }
-
- public void addClasses(File directoryName, String includes[], String excludes[])
- throws ArchiverException
- {
- addDirectory(directoryName, "classes/", includes, excludes);
- }
-
-
- protected void initZipOutputStream(ZipOutputStream zOut)
- throws IOException, ArchiverException
- {
-// if(deploymentDescriptor == null && !isInUpdateMode())
-// {
-// throw new ArchiverException("module properies attribute is required");
-// }
-// else
-// {
- super.initZipOutputStream(zOut);
- return;
-// }
- }
-
- protected void zipFile(ArchiveEntry entry, ZipOutputStream zOut, String vPath, int mode)
- throws IOException, ArchiverException
- {
- if(vPath.equalsIgnoreCase("config/AMP-INF/module.properties"))
- {
- if(deploymentDescriptor == null || !deploymentDescriptor.getCanonicalPath().equals(entry.getFile().getCanonicalPath()) || descriptorAdded)
- {
- getLogger().warn("Warning: selected " + super.archiveType + " files include a config/AMP-INF/module.properites which will be ignored " + "(please use webxml attribute to " + super.archiveType + " task)");
- }
- else
- {
- super.zipFile(entry, zOut, vPath);
- descriptorAdded = true;
- }
- }
- else
- {
- super.zipFile(entry, zOut, vPath);
- }
- }
-
-
- protected void cleanUp()
- {
- descriptorAdded = false;
- super.cleanUp();
- }
-
- private File deploymentDescriptor;
- private boolean descriptorAdded;
- /**
- * @see org.codehaus.plexus.archiver.AbstractArchiver#addDirectory(java.io.File, java.lang.String, java.lang.String[], java.lang.String[])
- */
- public void addDirectory(File pArg0, String pArg1, String[] pArg2, String[] pArg3)
- throws ArchiverException
- {
- /* */
- getLogger().info("adding directory [ '"+pArg0+"' '"+pArg1+"']");
- super.addDirectory(pArg0, pArg1, pArg2, pArg3);
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/plexus/archiver/AmpUnArchiver.java b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/plexus/archiver/AmpUnArchiver.java
deleted file mode 100644
index 057830e8..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/java/org/alfresco/plexus/archiver/AmpUnArchiver.java
+++ /dev/null
@@ -1,279 +0,0 @@
-package org.alfresco.plexus.archiver;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.zip.ZipException;
-
-import org.codehaus.plexus.archiver.ArchiveFilterException;
-import org.codehaus.plexus.archiver.ArchiveFinalizer;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.util.FilterSupport;
-import org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver;
-import org.codehaus.plexus.archiver.zip.ZipEntry;
-import org.codehaus.plexus.archiver.zip.ZipFile;
-import org.codehaus.plexus.util.FileUtils;
-
-public class AmpUnArchiver extends AbstractZipUnArchiver {
-
- private static final String NATIVE_ENCODING = "native-encoding";
-
- private String encoding = "UTF8";
-
- private FilterSupport filterSupport;
-
- private List finalizers;
-
- private static String fileSeparator = System.getProperty("file.separator");
-
-
- public void setArchiveFilters( List filters )
- {
- filterSupport = new FilterSupport( filters, getLogger() );
- }
-
- /**
- * Sets the encoding to assume for file names and comments.
- *
- *
Set to native-encoding if you want your
- * platform's native encoding, defaults to UTF8.
- */
- public void setEncoding( String encoding )
- {
- if ( NATIVE_ENCODING.equals( encoding ) )
- {
- encoding = null;
- }
- this.encoding = encoding;
- }
-
-
- private static Map ampMapping = new HashMap();
-
- @Override
- protected void execute()
- throws ArchiverException, IOException
- {
-
- getLogger().info( "Expanding: " + getSourceFile() + " into " + getDestDirectory() );
- ZipFile zf = null;
-
-
-
- try
- {
- zf = new ZipFile( getSourceFile(), encoding );
- Enumeration e = zf.getEntries();
-
-
- String moduleId = getModuleId(zf);
-
- // Based on the current AMP name creates the appropriate mapping to alfresco/module/
- createAmpMapping(moduleId);
-
- while ( e.hasMoreElements() )
- {
- ZipEntry ze = (ZipEntry) e.nextElement();
- if (!ze.getName().startsWith("META-INF"))
- {
- String fileInAmp = getAmpMapping(ze.getName());
-
- extractFileIfIncluded( getSourceFile(), getDestDirectory(), zf.getInputStream( ze ), fileInAmp, new Date( ze.getTime() ), ze.isDirectory() );
- }
- }
-
- runArchiveFinalizers();
-
- getLogger().debug( "expand complete" );
- }
- catch ( IOException ioe )
- {
- throw new ArchiverException( "Error while expanding " + getSourceFile().getAbsolutePath(), ioe );
- }
- finally
- {
- if ( zf != null )
- {
- try
- {
- zf.close();
- }
- catch ( IOException e )
- {
- //ignore
- }
- }
- }
- }
-
- private String getModuleId(ZipFile zf) throws IOException, ZipException, ArchiverException {
- ZipEntry modulePropertiesEntry = zf.getEntry("module.properties");
- Properties moduleProperties = new Properties();
- moduleProperties.load(zf.getInputStream(modulePropertiesEntry));
- String moduleId = moduleProperties.getProperty("module.id");
- if(moduleId == null || "".equals(moduleId))
- throw new ArchiverException("module.id property not found in module.properties");
- return moduleId;
- }
-
-
- private String getAmpMapping(String name) {
- if(name.startsWith("web/") && !name.startsWith("web/licenses"))
- {
- return name.substring(4);
- }
-
- for (Map.Entry mapElelement : ampMapping.entrySet()) {
- if(name.startsWith(mapElelement.getKey()))
- {
- String relativePath = "";
-
- if((name.startsWith("config/")))
- {
- relativePath = name.substring(7);
- }
- else if((name.startsWith("lib/")))
- {
- relativePath = name.substring(4);
- }
- else
- relativePath = FileUtils.removePath(name);
-
- return mapElelement.getValue() + relativePath;
- }
-
- }
- return "";
- }
-
-
- private void createAmpMapping(String moduleId) {
- File zipFile = getSourceFile();
-
- String ampName = zipFile.getName();
- ampName = FileUtils.removeExtension(FileUtils.removePath(ampName));
- ampName = ampName.substring(0, ampName.lastIndexOf('-'));
-
- ampMapping.put("module.properties", "WEB-INF"+ fileSeparator +"classes" + fileSeparator +"alfresco" + fileSeparator +"module" + fileSeparator + moduleId + fileSeparator);
- ampMapping.put("config", "WEB-INF"+fileSeparator+"classes"+ fileSeparator);
- ampMapping.put("lib", "WEB-INF" + fileSeparator + "lib" +fileSeparator);
- ampMapping.put("web"+ fileSeparator +"licenses", "WEB-INF" +fileSeparator);
-
- }
-
- private void extractFileIfIncluded( File sourceFile, File destDirectory, InputStream inputStream, String name,
- Date time, boolean isDirectory )
- throws IOException, ArchiverException
- {
- try
- {
- if ( filterSupport == null || filterSupport.include( inputStream, name ) )
- {
- extractFile( sourceFile, destDirectory, inputStream, name, time, isDirectory );
- }
- }
- catch ( ArchiveFilterException e )
- {
- throw new ArchiverException( "Error verifying \'" + name + "\' for inclusion: " + e.getMessage(), e );
- }
- }
-
- protected void extractFile( File srcF, File dir, InputStream compressedInputStream, String entryName,
- Date entryDate, boolean isDirectory )
- throws IOException
- {
- File f = null;
- if (entryName != null && !"".equals(entryName))
- f = FileUtils.resolveFile( dir, entryName );
- else
- return;
-
- try
- {
- if ( !isOverwrite() && f.exists() && f.lastModified() >= entryDate.getTime() )
- {
- getLogger().debug( "Skipping " + f + " as it is up-to-date" );
- return;
- }
-
- getLogger().debug( "expanding " + entryName + " to " + f );
-// create intermediary directories - sometimes zip don't add them
- File dirF = f.getParentFile();
- if ( dirF != null )
- {
- dirF.mkdirs();
- }
-
- if ( isDirectory )
- {
- f.mkdirs();
- }
- else
- {
- byte[] buffer = new byte[1024];
- int length;
- FileOutputStream fos = null;
- try
- {
- fos = new FileOutputStream( f );
-
- while ( ( length = compressedInputStream.read( buffer ) ) >= 0 )
- {
- fos.write( buffer, 0, length );
- }
-
- fos.close();
- fos = null;
- }
- finally
- {
- if ( fos != null )
- {
- try
- {
- fos.close();
- }
- catch ( IOException e )
- {
-// ignore
- }
- }
- }
- }
-
- f.setLastModified( entryDate.getTime() );
- }
- catch ( FileNotFoundException ex )
- {
- getLogger().warn( "Unable to expand to file " + f.getPath() );
- }
- }
-
- public void setArchiveFinalizers( List archiveFinalizers )
- {
- this.finalizers = archiveFinalizers;
- }
-
- protected void runArchiveFinalizers()
- throws ArchiverException
- {
- if ( finalizers != null )
- {
- for ( Iterator it = finalizers.iterator(); it.hasNext(); )
- {
- ArchiveFinalizer finalizer = (ArchiveFinalizer) it.next();
-
- finalizer.finalizeArchiveExtraction( this );
- }
- }
- }
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/resources/META-INF/maven/lifecycle.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/resources/META-INF/maven/lifecycle.xml
deleted file mode 100644
index 0bf27002..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/resources/META-INF/maven/lifecycle.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- amp
-
-
- package
-
-
-
- amp
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/resources/META-INF/plexus/components.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index cd7b9b6d..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
- org.apache.maven.artifact.handler.ArtifactHandler
- amp
- org.apache.maven.artifact.handler.DefaultArtifactHandler
-
- amp
- zip
- zip
- java
- true
- true
-
-
-
-
- org.apache.maven.lifecycle.mapping.LifecycleMapping
- amp
- org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
-
-
- org.apache.maven.plugins:maven-resources-plugin:resources
- org.apache.maven.plugins:maven-compiler-plugin:compile
- org.apache.maven.plugins:maven-resources-plugin:testResources
- org.apache.maven.plugins:maven-compiler-plugin:testCompile
- org.apache.maven.plugins:maven-surefire-plugin:test
- org.alfresco.maven.plugin:maven-amp-plugin:amp
- org.apache.maven.plugins:maven-install-plugin:install
- org.apache.maven.plugins:maven-deploy-plugin:deploy
-
-
-
-
-
- org.codehaus.plexus.archiver.Archiver
- amp
- org.alfresco.plexus.archiver.AmpArchiver
- per-lookup
-
-
-
-
- org.codehaus.plexus.archiver.UnArchiver
- amp
- org.alfresco.plexus.archiver.AmpUnArchiver
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/site/apt/components.apt.vm b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/site/apt/components.apt.vm
deleted file mode 100644
index 0db45ded..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/site/apt/components.apt.vm
+++ /dev/null
@@ -1,37 +0,0 @@
- -----
- Maven AMP Plugin Plexus Components
- -----
-
-
-
-AMP Lifecycle Mapping
-
- This plugin provides support for amp type of projects. \
- Lifecycle of an Alfresco modules is mapped in the file:
-
- {{ ${site_tags_url}/${site_pom_artifactId}-${site_pom_version}/src/main/resources/META-INF/plexus/components.xml }}
-
- This build produces an Alfresco compatible AMP as main build product. It supports (being derived from maven-war-plugin)
- overlay of modules and transitive AMP dependency packing.
-
- An AMP depending on one ore more AMP will package those AMP in the final product of the build:
- overlays can be configured same as in {{ http://maven.apache.org/plugins/maven-war-plugin/overlays.html }}.
- A plain zip UnArchiver is used for this overlay.
-
-
-
-AMP -> WAR Unarchiver
-
- The default UnArchiver (role-hint="amp") used by the default maven infrastructure for .amp files is a custom UnArchiver
- which behaves as the MMT, unarchiving AMPs in the proper places as dictated by {{{http://wiki.alfresco.com/wiki/AMP_Files} Alfresco AMP convention}} .
- This little component allows any plugin to manage .amp dependencies in case the maven-amp-plugin is declared with true in
- the current POM, basically supporting AMPs in Maven with no need for custom external tools like MMT.
-
- See {{ ${site_tags_url}/${site_pom_artifactId}-${site_pom_version}/src/main/resources/META-INF/plexus/components.xml }}
-
-
-AMP Artifact Handler
-
- Instructs maven which type of Archive is the AMP, providing info about its inclusion in the classpath or the fact that already contains
- its dependencies.
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/site/apt/index.apt.vm b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/site/apt/index.apt.vm
deleted file mode 100644
index 495a0767..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/site/apt/index.apt.vm
+++ /dev/null
@@ -1,55 +0,0 @@
- -----
- Maven AMP Plugin
- -----
-
-
-
-
-Welcome to the Maven Alfresco AMP plugin home
-
- You've reached the ({{ ${site_pom_url} }}) Maven Alfresco Extension archetype home page (version: ${site_pom_version})
-
-
-
-Description
-
- ${site_pom_description}
-
-
-References
-
- Deployed at: {{ http://repository.sourcesense.com/maven2/org/alfresco/maven/plugin }}
-
- Maven usage:
-
-
-------------------------------------------
-
-
- ${site_pom_groupId}
- ${site_pom_artifactId}
- ${site_pom_version}
-
- true
-
-
--------------------------------------------
-
-
- using repository (either in POM or settings.xml) :
-
-
-------------------------------------------
-
-
- alfresco-public
- http://maven.alfresco.com/nexus/content/groups/public
-
-
--------------------------------------------
-
-
-Quick usage
-
- See {{https://wiki.alfresco.com/wiki/Maven_For_Dummies}}
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/site/site.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/site/site.xml
deleted file mode 100644
index 2ae769fd..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/src/site/site.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
- org.apache.maven.skins
- maven-stylus-skin
- 1.0
-
-
-
-
-
-
-
- Maven AMP Plugin - v. ${project.version}
- ${site_site_url}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/pom.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/pom.xml
deleted file mode 100644
index 23b1da30..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
- 4.0.0
- org.alfresco.maven
- maven-alfresco-share-archetype
- maven-archetype
- Maven Alfresco Share Extension Archetype
- Maven Archetype to allow Maven based customization of Alfresco SHARE
-
- org.alfresco
- maven-alfresco-archetypes
- 4.0.0-SNAPSHOT
- ../pom.xml
-
-
-
-
- org.apache.maven.archetype
- archetype-packaging
- 2.0
-
-
-
-
- maven-archetype-plugin
- 2.0
- true
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/changes/changes.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/changes/changes.xml
deleted file mode 100644
index 98817efa..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/changes/changes.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
- Maven Alfresco Share Archetype
- Gabriele Columbro
-
-
-
- FTL content was destroyed
- Documentation update
- Align groupId to org.alfresco
- application.properties not found when invoked from parent POM
-
-
-
- Updated samples and tested against 4.0
-
-
-
-
- Support for Alfresco Share Closes issue 17 (http://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=17")
-
-
- Addded 3.2r sample SHARE web extension
-
-
- Added base SHARE overlay structure
-
-
- Tested against a non localhost Alfresco server
-
-
- Added Share port configurability
-
-
- Incapsulated jetty run in the -Prun profile, which runs by default jetty during the integration-test phase
-
-
- Added basic docs
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
deleted file mode 100644
index e04fb48d..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
- src/main/properties
-
- **/*.properties
- **/*.txt
-
-
-
- src/main/resources
-
- **/*.xml
- **/*.properties
-
-
-
- src/main/resources
-
- **/*.keepme
- **/*.sample
-
-
-
- src/site
-
- **/*.vm
- **/*.xml
-
-
-
- src/site
-
- **/*.apt
- **/*.fml
-
-
-
- src/books
-
- **/*.xml
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/META-INF/maven/archetype.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/META-INF/maven/archetype.xml
deleted file mode 100644
index a2386881..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/META-INF/maven/archetype.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
- alfresco-share-extension
-
- src/main/properties/ci/application.properties
- src/main/properties/local/application.properties
- src/main/properties/local/README-properties.txt
- src/main/resources/alfresco/site-data/chrome/.keepme
- src/main/resources/alfresco/site-data/content-associations/.keepme
- src/main/resources/alfresco/site-data/page-associations/.keepme
- src/main/resources/alfresco/web-extension/2-column-edit-form.ftl.sample
- src/main/resources/alfresco/web-extension/custom-set-dublincore.ftl.sample
- src/main/resources/alfresco/web-extension/custom-slingshot-application-context.xml
- src/main/resources/alfresco/web-extension/ttl-forms-32-share.zip.sample
- src/main/resources/alfresco/web-extension/ttl-forms-32.amp.sample
- src/main/resources/alfresco/web-extension/web-framework-config-custom.xml.sample
- src/main/resources/alfresco/web-extension/webscript-framework-config-custom.xml
- src/main/resources/log4j.properties
- tools/cas/web.xml
-
-
- src/site/apt/book-index.apt
- src/site/apt/index.apt.vm
- src/site/fml/faq.fml
- src/site/site.xml
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/pom.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644
index 11d9d5d7..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/pom.xml
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
- 4.0.0
- ${groupId}
- ${artifactId}
- ${version}
- Alfresco Share client
- war
- SHARE customization meant to be the main Alfresco UI, which enables collaboration and easy ReST based remotable customization.
-
-
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
-
- alfresco-public-snapshots
- https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
-
-
- alfresco-maven-repo
- https://artifacts.alfresco.com/nexus/content/repository/enterprise-snapshots
-
- true
-
-
-
-
-
-
-
- local
- 4.0.b
- community
- info
- 8081
- development
-
-
-
-
-
-
- org.alfresco
- share
- war
- ${alfresco.version}
- ${alfresco.edition}
-
-
-
-
-
-
-
- ${project.basedir}/src/main/properties/${env}/application.properties
-
-
-
-
-
- src/main/resources
- true
-
-
-
- src/main/properties/${env}
-
- application.properties
-
-
- alfresco/web-extension
- true
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
-
- false
-
- ${project.basedir}/src/main/properties/${env}/application.properties
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 2.5
-
- UTF-8
-
-
- ftl
-
-
-
-
-
-
-
-
-
-
- run
-
-
-
- org.mortbay.jetty
- maven-jetty-plugin
- 6.1.21
-
-
-
- ${share.servlet.port}
-
-
-
-
-
- run-jetty
- pre-integration-test
-
- run-exploded
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/books/manual.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/books/manual.xml
deleted file mode 100644
index fa1e2fa9..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/books/manual.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-
-
-
- manual
- Alfresco Extension Manual
-
-
- introduction
- Introduction
-
-
- book-index
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/properties/ci/application.properties b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/properties/ci/application.properties
deleted file mode 100644
index f85c9cf0..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/properties/ci/application.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# SHARE continuous environment dependent properties ( build)
-share.server.scheme=http
-share.server.name=localhost
-share.server.port=${share.servlet.port}
-alfresco.server.scheme=http
-alfresco.server.name=192.168.48.1
-alfresco.server.port=8080
-alfresco.webapp.name=alfresco
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/properties/local/README-properties.txt b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/properties/local/README-properties.txt
deleted file mode 100644
index ca1531a6..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/properties/local/README-properties.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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.
-
-Ant/m2 runtime properties management
-------------------------------------
-
-Both build systems will comply to the following convention for properties:
-
-- if -Denv= property is specified at build time properties will be
- looked up in folder
-
- src/main/properties//application.properties
-
- and copied in the classpath under
-
- alfresco/extension/application.properties
-
-- if no "env" system property is specified env=local default value will be used
-
-
-Buildtime properties management - Note for Ant Users:
------------------------------------------------------
-Here you can also configure buildtime properties which will be loaded in ant
-build context with the same aforementioned convention.
-This is done for tomcat ATM.
-
-Buildtime properties management - Note for Maven Users:
------------------------------------------------------
-You should configure your buildtime properties as suggested by the maven
-cascading build properties system, i.e. externalizing them from the project
-by the means of settings.xml file.
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/properties/local/application.properties b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/properties/local/application.properties
deleted file mode 100644
index fd26dd43..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/properties/local/application.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# SHARE client environment dependent properties (local build)
-share.server.scheme=http
-share.server.name=localhost
-share.server.port=${share.servlet.port}
-alfresco.server.scheme=http
-alfresco.server.name=localhost
-alfresco.server.port=8080
-alfresco.webapp.name=alfresco
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-data/chrome/.keepme b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-data/chrome/.keepme
deleted file mode 100644
index e69de29b..00000000
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-data/content-associations/.keepme b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-data/content-associations/.keepme
deleted file mode 100644
index e69de29b..00000000
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-data/page-associations/.keepme b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-data/page-associations/.keepme
deleted file mode 100644
index e69de29b..00000000
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/awe-config-custom.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/awe-config-custom.xml
deleted file mode 100644
index 9726400a..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/awe-config-custom.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/custom-slingshot-application-context.xml.sample b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/custom-slingshot-application-context.xml.sample
deleted file mode 100644
index ae5828fc..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/custom-slingshot-application-context.xml.sample
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/share-config-custom.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/share-config-custom.xml
deleted file mode 100644
index d2b330fe..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/share-config-custom.xml
+++ /dev/null
@@ -1,331 +0,0 @@
-
-
-
-
-
- ${share.server.scheme}
- ${share.server.name}
- ${share.server.port}
-
-
-
-
-
-
-
- false
-
-
- false
-
-
-
-
-
-
-
-
-
- ${surf.development.mode}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${alfresco.server.scheme}://${alfresco.server.name}:${alfresco.server.port}/alfresco
-
-
-
-
- false
-
-
-
- application/msword
- application/vnd.ms-excel
- application/vnd.ms-powerpoint
-
-
-
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- location.path.documents
-
- slingshot/doclib/treenode/site/{site}/{container}{path}?children={evaluateChildFoldersSite}&max={maximumFolderCountSite}
-
-
-
-
-
-
-
- alfresco://company/home
-
-
-
- false
-
-
- 500
-
-
-
-
-
-
-
-
- secret
-
- ALFRESCO.ORG
-
- HTTP/repository.server.com@ALFRESCO.ORG
-
- ShareHTTP
-
-
-
-
-
-
-
-
- alfresco-noauth
- Alfresco - unauthenticated access
- Access to Alfresco Repository WebScripts that do not require authentication
- alfresco
- ${alfresco.server.scheme}://${alfresco.server.name}:${alfresco.server.port}/alfresco/s
- none
-
-
-
- alfresco
- Alfresco - user access
- Access to Alfresco Repository WebScripts that require user authentication
- alfresco
- ${alfresco.server.scheme}://${alfresco.server.name}:${alfresco.server.port}/alfresco/s
- user
-
-
-
- alfresco-feed
- Alfresco Feed
- Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet
- http
- ${alfresco.server.scheme}://${alfresco.server.name}:${alfresco.server.port}/alfresco/s
- true
- user
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties
deleted file mode 100644
index 9e529992..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,192 +0,0 @@
-# Set root logger level to error
-log4j.rootLogger=error, Console, File
-
-###### Console appender definition #######
-
-# All outputs currently set to be a ConsoleAppender.
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-
-# use log4j NDC to replace %x with tenant domain / username
-log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %x %-5p [%c{3}] %m%n
-#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
-
-###### File appender definition #######
-log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.File.File=share.log
-log4j.appender.File.Append=true
-log4j.appender.File.DatePattern='.'yyyy-MM-dd
-log4j.appender.File.layout=org.apache.log4j.PatternLayout
-log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
-
-###### Hibernate specific appender definition #######
-#log4j.appender.file=org.apache.log4j.FileAppender
-#log4j.appender.file.File=hibernate.log
-#log4j.appender.file.layout=org.apache.log4j.PatternLayout
-#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-###### Log level overrides #######
-
-# Commented-in loggers will be exposed as JMX MBeans (refer to org.alfresco.repo.admin.Log4JHierarchyInit)
-# Hence, generally useful loggers should be listed with at least ERROR level to allow simple runtime
-# control of the level via a suitable JMX Console. Also, any other loggers can be added transiently via
-# Log4j addLoggerMBean as long as the logger exists and has been loaded.
-
-# Hibernate
-log4j.logger.org.hibernate=error
-log4j.logger.org.hibernate.util.JDBCExceptionReporter=fatal
-log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=fatal
-#log4j.logger.org.hibernate.cache.EhCacheProvider=warn
-log4j.logger.org.hibernate.type=warn
-#log4j.logger.org.hibernate.persister.collection=DEBUG
-
-# Spring
-log4j.logger.org.springframework=warn
-# Turn off Spring remoting warnings that should really be info or debug.
-log4j.logger.org.springframework.remoting.support=error
-
-# Axis/WSS4J
-log4j.logger.org.apache.axis=info
-log4j.logger.org.apache.ws=info
-
-# CXF
-log4j.logger.org.apache.cxf=error
-
-# MyFaces
-log4j.logger.org.apache.myfaces.util.DebugUtils=info
-log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
-log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
-log4j.logger.org.apache.myfaces.taglib=error
-
-# OpenOfficeConnection
-log4j.logger.net.sf.jooreports.openoffice.connection=fatal
-
-# log prepared statement cache activity ###
-log4j.logger.org.hibernate.ps.PreparedStatementCache=info
-
-# Alfresco
-log4j.logger.org.alfresco=error
-log4j.logger.org.alfresco.repo.admin=info
-log4j.logger.org.alfresco.repo.model.filefolder=info
-log4j.logger.org.alfresco.repo.tenant=info
-log4j.logger.org.alfresco.repo.avm=info
-log4j.logger.org.alfresco.config=info
-log4j.logger.org.alfresco.sample=info
-log4j.logger.org.alfresco.web=info
-#log4j.logger.org.alfresco.web.app.AlfrescoNavigationHandler=debug
-#log4j.logger.org.alfresco.web.ui.repo.component.UIActions=debug
-#log4j.logger.org.alfresco.web.ui.repo.tag.PageTag=debug
-#log4j.logger.org.alfresco.web.bean.clipboard=debug
-log4j.logger.org.alfresco.repo.webservice=info
-log4j.logger.org.alfresco.cmis.ws=info
-log4j.logger.org.alfresco.service.descriptor.DescriptorService=info
-#log4j.logger.org.alfresco.web.page=debug
-
-log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=error
-#log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=info
-
-log4j.logger.org.alfresco.web.ui.common.Utils=error
-#log4j.logger.org.alfresco.web.ui.common.Utils=info
-
-log4j.logger.org.alfresco.repo.admin.patch.PatchExecuter=info
-log4j.logger.org.alfresco.repo.admin.patch.impl.DeploymentMigrationPatch=info
-log4j.logger.org.alfresco.repo.version.VersionMigrator=info
-log4j.logger.org.alfresco.repo.module.ModuleServiceImpl=info
-log4j.logger.org.alfresco.repo.domain.schema.SchemaBootstrap=info
-log4j.logger.org.alfresco.repo.admin.ConfigurationChecker=info
-log4j.logger.org.alfresco.repo.node.index.IndexTransactionTracker=info
-log4j.logger.org.alfresco.repo.node.index.FullIndexRecoveryComponent=info
-log4j.logger.org.alfresco.repo.node.index.AVMFullIndexRecoveryComponent=info
-log4j.logger.org.alfresco.util.OpenOfficeConnectionTester=info
-log4j.logger.org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl=warn
-log4j.logger.org.alfresco.repo.domain.hibernate.DirtySessionMethodInterceptor=warn
-log4j.logger.org.alfresco.repo.transaction.RetryingTransactionHelper=warn
-
-#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
-#log4j.logger.org.alfresco.repo.cache.EhCacheTracerJob=debug
-
-log4j.logger.org.alfresco.repo.workflow=error
-#log4j.logger.org.alfresco.repo.workflow=info
-
-# CIFS server debugging
-log4j.logger.org.alfresco.smb.protocol=error
-#log4j.logger.org.alfresco.smb.protocol.auth=debug
-#log4j.logger.org.alfresco.acegi=debug
-
-# FTP server debugging
-log4j.logger.org.alfresco.ftp.protocol=error
-#log4j.logger.org.alfresco.ftp.server=debug
-
-# WebDAV debugging
-#log4j.logger.org.alfresco.webdav.protocol=debug
-log4j.logger.org.alfresco.webdav.protocol=error
-
-# NTLM servlet filters
-#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
-#log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug
-
-# Integrity message threshold - if 'failOnViolation' is off, then WARNINGS are generated
-log4j.logger.org.alfresco.repo.node.integrity=ERROR
-
-# Indexer debugging
-log4j.logger.org.alfresco.repo.search.Indexer=error
-#log4j.logger.org.alfresco.repo.search.Indexer=debug
-
-log4j.logger.org.alfresco.repo.search.impl.lucene.index=error
-#log4j.logger.org.alfresco.repo.search.impl.lucene.index=DEBUG
-
-# Audit debugging
-# log4j.logger.org.alfresco.repo.audit=DEBUG
-# log4j.logger.org.alfresco.repo.audit.model=DEBUG
-
-# Forms debugging
-# log4j.logger.org.alfresco.web.forms=debug
-# log4j.logger.org.chiba.xml.xforms=debug
-log4j.logger.org.alfresco.web.forms.xforms.XFormsBean=error
-log4j.logger.org.alfresco.web.forms.XSLTRenderingEngine=error
-
-# Property sheet and modelling debugging
-# change to error to hide the warnings about missing properties and associations
-log4j.logger.alfresco.missingProperties=warn
-log4j.logger.org.alfresco.web.ui.repo.component.property.UIChildAssociation=warn
-log4j.logger.org.alfresco.web.ui.repo.component.property.UIAssociation=warn
-#log4j.logger.org.alfresco.web.ui.repo.component.property=debug
-
-# Dictionary/Model debugging
-log4j.logger.org.alfresco.repo.dictionary.DictionaryDAO=error
-#log4j.logger.org.alfresco.repo.dictionary.DictionaryDAO=info
-
-# Virtualization Server Registry
-log4j.logger.org.alfresco.mbeans.VirtServerRegistry=warn
-
-# Spring context runtime property setter
-log4j.logger.org.alfresco.util.RuntimeSystemPropertiesSetter=info
-
-# Link Validation debugging
-log4j.logger.org.alfresco.linkvalidation.LinkValidationServiceImpl=info
-log4j.logger.org.alfresco.linkvalidation.LinkValidationStoreCallbackHandler=warn
-
-# Debugging options for clustering
-log4j.logger.org.alfresco.repo.content.ReplicatingContentStore=error
-log4j.logger.org.alfresco.repo.content.replication=error
-
-#log4j.logger.org.alfresco.repo.deploy.DeploymentServiceImpl=debug
-
-# Activity service
-log4j.logger.org.alfresco.repo.activities=info
-
-# Sharepoint
-#log4j.logger.org.alfresco.module.vti=debug
-
-###### Scripting #######
-
-# Web Framework
-log4j.logger.org.alfresco.web.scripts=${share.log.level}
-log4j.logger.org.alfresco.web.scripts.AlfrescoScriptDebugger=off
-
-# Repository
-log4j.logger.org.alfresco.repo.web.scripts=${share.log.level}
-log4j.logger.org.alfresco.repo.web.scripts.BaseWebScriptTest=info
-log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=off
-log4j.logger.org.alfresco.repo.jscript=error
-log4j.logger.org.alfresco.repo.cmis.rest.CMISTest=info
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/apt/book-index.apt b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/apt/book-index.apt
deleted file mode 100644
index 3368415a..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/apt/book-index.apt
+++ /dev/null
@@ -1,76 +0,0 @@
- -----
- Maven Alfresco Extension Manual
- -----
- Sourcesense
- -----
-
-Introduction
-
- Welcome to the Maven Alfresco Extension Archetype manual
-
-
-How to edit this manual
-
- This page is generated from <<<$PROJECT_HOME/src/site/book-index.apt>>> file. \
- Book sections and chapters can be edited in the <<<$PROJECT_HOME/src/site/manual.xml>>> file. \
- While related POM configuration snippet follows>
-
-+-------------------------------------------
-
-
-
- org.apache.maven.doxia
- doxia-maven-plugin
- 1.0-alpha-10
-
-
- pre-site
-
- render-books
-
-
-
-
-
- target/site/books
-
-
- src/site
- src/books/manual.xml
-
-
- xdoc
-
-
- pdf
-
-
- rtf
-
-
-
-
-
-
-
-+-------------------------------------------
-
-Limitations
-
- * Book sections are matched on id, so a file named section.* must be found
- at any depth level withing the folder specified in the POM as book folder
-
- * Books cannot use property filtering
-
- * Books cannot use .vm files as filename cannot be specified, so this makes
- only static (no filtering needed) APT/XDOC/FML pages usable for both site
- and manual in a single sourcing fashion
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm
deleted file mode 100644
index d79dd49a..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm
+++ /dev/null
@@ -1,45 +0,0 @@
- -----
- Maven Alfresco SHARE archetype
- -----
- Sourcesense
- -----
-
-
-
-Welcome to the Maven Alfresco Extension Archetype manual
-
- You've reached the Sourcesense Maven Alfresco Extension archetype home page (version: ${site_pom_version}) .
-
-
-
-Description
-
- ${symbol_dollar}{site_pom_description}
-
-
-Full documentation
-
- You can also download the full application manual {{{books/pdf/manual/manual.pdf} PDF}} or {{{books/rtf/manual/manual.rtf} RTF}} format.
-
-
-Quick Start (maven2)
-
- For a quick start you can a run alfresco extension project by just running <<(maven 2.0.6+ required)>>:
-
---------------------------------------------
-
-mvn jetty:run-exploded
-
---------------------------------------------
-
-Quick Start (Ant)
-
- For a quick start you can package alfresco by running <<(Default target : package)>> :
-
---------------------------------------------
-ant
---------------------------------------------
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/fml/faq.fml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/fml/faq.fml
deleted file mode 100644
index fc6e5f94..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/fml/faq.fml
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
- General
-
- How do I configure Eclipse?
-
-
-
Run ' mvn eclipse:eclipse '
-
"Refresh" on your Eclipse project
-
-
-
-
- Why I cannot access db "alf_[jetty,tomcat,jboss] "?
-
-
- Remember to setup appropriate permissions for selected db / build profile. You have 2 methods to configure/remove your db:
-
-
- Properly edit
- tools/mysql/db_setup.sql
- and run from project home
- mysql -u root < tools/mysql/db_setup.sql
-
-
- if you use POM property 'alfresco.db.name' you have sql files already filtered (after process-resources phase), and run
- directly
- mysql -u root -p < target/classes/tools/[db_setup,db_remove].sql
-
-
-
-
-
-
- Why do I get memory errors running jetty?
-
-
- Run your build with :
- MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn jetty:[run-war,run-exploded]
-
-
-
-
-
- Release
-
- How do I release?
-
-
-
Uncommenting in generated POM svn.tags.url and maven-release-plugin configuration
-
Ensuring dryRun="false" element in that configuration
-
- Running a single command:
- mvn release:prepare release:perforn
-
-
-
-
-
- Why my release process complains about svn LC_ALL variable?
-
-
- 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)
-
-
-
-
- Why do I get Content integrity errors on restore running with jetty embedded/during release?
-
-
Did you remove also alf_data_jetty (or how you renamed it) apart from the alf_jetty (or how you renamed it) db ;) ?
-
-
-
-
- Dependency management
-
- Why JTA can't be properly found on maven repos?
-
-
- Due to redistribution problems you have to install JTA manuall when you need it with:
-
- - Download jta-1_0_1B-classes.zip from http://java.sun.com/products/jta/ - mvn install:install-file
- -Dfile=./jta-1_0_1B-classes.zip -DgroupId=jta -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar
-
-
-
-
-
-
- Documentation
-
- Why I have duplicated properties with '_' character in my POM?
-
-
- Due to maven/velocity filtering limitation,
- dot based properties will not work in filtered site files. That's why a '_' separator is needed.
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/site.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/site.xml
deleted file mode 100644
index dc2edda3..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/main/resources/archetype-resources/src/site/site.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
- org.apache.maven.skins
- maven-application-skin
- 1.0
-
-
- Maven Alfresco Share Customization Sample - v. ${site_pom_version}
- ${site_site_url}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/apt/index.apt.vm b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/apt/index.apt.vm
deleted file mode 100644
index 3caedf1b..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/apt/index.apt.vm
+++ /dev/null
@@ -1,59 +0,0 @@
- -----
- Maven Alfresco Extension Archetype
- -----
- Alfresco
- -----
-
-
-
-Welcome to the Maven Alfresco Share Archetype home
-
- You've reached the ({{ ${site_pom_url} }}) Maven Alfresco Extension archetype home page (version: ${site_pom_version})
-
-
-
-Description
-
- ${site_pom_description}
-
-
-
-Quick Start Project Creation
-
- For a quick start you can a maven alfresco extension project created by just running <<(maven 2.0.6+ required)>>:
-
---------------------------------------------
-mvn archetype:generate -DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
---------------------------------------------
-
- and then choose the option 'maven-alfresco-share-archetype' and fill your custom project information. You can also do this via Eclipse
- using the m2eclipse plugin.
-
-
-
-Run your project in 3 minutes
-
- The command below allows you to package your Share customization, run unit tests and eventually run jetty embedded with Alfresco
-
---------------------------------------------
-mvn install -Prun
---------------------------------------------
-
- You should be able to point your browser to http://localhost:8081/share and see your nice custom Alfresco Share running.
- You might need to raise the MAVEN_OPTS memory allocated to Maven.
-
- <>:
-
- The only prerequisite is to have a previously running Alfresco instance (by default at http://localhost:8080/alfresco/). \
- You can configure the Alfresco endpoint and runtime directly via the generated pom.xml using the following POM properties:
-
---------------------------------------------
- local
- 8081
---------------------------------------------
-
- The <<<>>>> property (default 'local') is used to switch between the different property files in <<>> allowing fully environment
- independent builds. You can tune your Share behavior using your custom env and configuring an additional <<>> file.
-
- The <<<>>> (default 8081) is the port bound by Jetty during run embedded.
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/apt/layout.apt.vm b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/apt/layout.apt.vm
deleted file mode 100644
index 82cd26be..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/apt/layout.apt.vm
+++ /dev/null
@@ -1,39 +0,0 @@
- -----
- Archetype Project Generated Layout
- -----
-
-
-What do I get when creating the project?
-
- You will encounter an Share 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/web-extension ---> alfresco overriding web Spring contexts
- | | ---> sample alfresco share customizations
- | |
- | |__ 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)
- | |
- | |__ Any web customization to be overlayed to the SHARE webapp (e.g. src/main/webapp/WEB-INF/web.xml)
- |
- |__ test
-
-
-target - Project build dir
-
-
-------------------------------------------------------------------
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/resources/images/Alfresco-logo-transparent.gif b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/resources/images/Alfresco-logo-transparent.gif
deleted file mode 100644
index ec36f987..00000000
Binary files a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/resources/images/Alfresco-logo-transparent.gif and /dev/null differ
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/resources/maven-base.css b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/resources/maven-base.css
deleted file mode 100644
index b1ea3713..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/resources/maven-base.css
+++ /dev/null
@@ -1 +0,0 @@
-.maven {}
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/site.xml b/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/site.xml
deleted file mode 100644
index 1a20c328..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-archetype/src/site/site.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
- org.apache.maven.skins
- maven-fluido-skin
- 1.2.1
-
-
-
- true
- true
-
- Maven Alfresco Lifecycle
- Maven Alfresco Lifecycle
- /img/Alfresco-logo-transparent.gif
- /index.html
-
-
- mindthegabz
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
- Maven alfresco Share archetype - v. ${project.version}
- ${site_site_url}
- images/Alfresco-logo-transparent.gif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/pom.xml b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/pom.xml
deleted file mode 100644
index b28a8c59..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/pom.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- 4.0.0
- org.alfresco.maven
- maven-alfresco-share-module-archetype
- maven-archetype
- Maven Archetype to build Alfresco Share JAR modules (dashlets,pages,etc.)
-
- org.alfresco
- maven-alfresco-archetypes
- 4.0.0-SNAPSHOT
- ../pom.xml
-
-
-
-
- org.apache.maven.archetype
- archetype-packaging
- 2.0
-
-
-
-
- maven-archetype-plugin
- 2.0
- true
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
deleted file mode 100644
index 75fad9ad..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- src/main/resources
-
- **/*.xml
- **/*.properties
-
-
-
- src/main/resources
-
- **/*.js
- **/*.ftl
- **/*.css
- **/*.png
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/META-INF/maven/archetype.xml b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/META-INF/maven/archetype.xml
deleted file mode 100644
index ac579b40..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/META-INF/maven/archetype.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
- maven-share-module
-
- src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.config.xml
- src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.desc.xml
- src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.head.ftl
- src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.html.ftl
- src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.js
- src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.properties
- src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get_cy.properties
- src/main/resources/META-INF/components/dashlets/images/refresh.png
- src/main/resources/META-INF/components/dashlets/site-tags.css
- src/main/resources/META-INF/components/dashlets/site-tags.js
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/pom.xml b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644
index 0b8eba33..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
- 4.0.0
- ${groupId}
- ${artifactId}
- jar
- ${version}
- ${artifactId} project
- http://share.alfresco.com
-
-
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
-
- alfresco-public-snapshots
- https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
-
- true
- daily
-
-
-
-
-
- junit
- junit
- 3.8.1
- test
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 2.5
-
- UTF-8
-
-
- ftl
-
-
-
-
-
-
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/images/refresh.png b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/images/refresh.png
deleted file mode 100644
index 71f0d4c1..00000000
Binary files a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/images/refresh.png and /dev/null differ
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/site-tags-min.js b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/site-tags-min.js
deleted file mode 100644
index 44bc1e7c..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/site-tags-min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var e=YAHOO.util.Dom,r=YAHOO.util.Event;var k=Alfresco.util.encodeHTML,i=Alfresco.util.combinePaths;var l="org.alfresco.share.dashlet",c=l+".siteTagsFilter";Alfresco.dashlet.SiteTags=function p(s){return Alfresco.dashlet.SiteTags.superclass.constructor.call(this,"Alfresco.dashlet.SiteTags",s)};YAHOO.extend(Alfresco.dashlet.SiteTags,Alfresco.component.Base,{options:{maxItems:50,activeFilter:"all"},tagsContainer:null,containerId:null,onReady:function m(){var w=this;this.tagsContainer=e.get(this.id+"-tags");r.addListener(this.id+"-refresh","click",this.onRefresh,this,true);this.services.preferences=new Alfresco.service.Preferences();this.widgets.all=new YAHOO.widget.Button(this.id+"-all",{type:"checkbox",value:"all",checked:true});this.widgets.all.on("checkedChange",this.onAllCheckedChanged,this.widgets.all,this);this.widgets.filter=new YAHOO.widget.Button(this.id+"-filter",{type:"split",menu:this.id+"-filter-menu",lazyloadmenu:false});this.widgets.filter.on("click",this.onFilterClicked,this,true);var x=this.widgets.filter.getMenu();x.subscribe("click",function(z,y){var A=y[1];if(A){w.widgets.filter.set("label",A.cfg.getProperty("text"));w.onFilterChanged.call(w,y[1])}});if(this.options.activeFilter=="all"){this.widgets.filter.value="documentLibrary";this.setActiveFilter("all")}else{this.widgets.filter.value=this.options.activeFilter;var t=x.getItems(),v,s,u;for(s=0,u=t.length;s'+this.msg("message.no-tags")+""}else{var F,s=function t(G){return G.count/(C/y)},A=function z(G){return(0.5+s(G)).toFixed(2)},B=function u(H,G){if(H.nameG.name){return 1}return 0};E.sort(B);for(v=0,D=E.length;v'+k(F.name)+" "}}this.tagsContainer.innerHTML=w;Alfresco.util.Anim.fadeIn(this.tagsContainer)},onTagsFailed:function o(){this.tagsContainer.innerHTML=this.msg("refresh-failed");Alfresco.util.Anim.fadeIn(this.tagsContainer)},getUriTemplate:function j(s){var t=Alfresco.constants.URL_CONTEXT+"page/site/"+this.options.siteId;switch(this.options.activeFilter){case"wiki":t+="/wiki";break;case"blog":t+="/blog-postlist";break;case"documentLibrary":t+="/documentlibrary#filter=tag|"+encodeURIComponent(s.name);break;case"calendar":t+="/calendar";break;case"links":t+="/links";break;case"discussions":t+="/discussions-topiclist";break;default:t+="/search?tag="+encodeURIComponent(s.name)+"&a=false"}return t},updateFilterUI:function b(){switch(this.options.activeFilter){case"all":e.removeClass(this.widgets.filter.get("element"),"yui-checkbox-button-checked");break;default:this.widgets.all.set("checked",false,true);e.addClass(this.widgets.filter.get("element"),"yui-checkbox-button-checked");break}},setActiveFilter:function f(s,t){this.options.activeFilter=s;this.containerId=s!=="all"?s:"";this.updateFilterUI();this.refreshTags();if(t!==true){this.services.preferences.set(c,s)}},onAllCheckedChanged:function h(s,t){this.setActiveFilter("all");t.set("checked",true,true)},onFilterClicked:function a(s){this.setActiveFilter(this.widgets.filter.value)},onFilterChanged:function q(t){var s=t.value;this.widgets.filter.value=s;this.setActiveFilter(s)}})})();
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/site-tags.css b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/site-tags.css
deleted file mode 100644
index 25c4baf3..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/site-tags.css
+++ /dev/null
@@ -1,27 +0,0 @@
-.site-tags .tag
-{
- display: inline-block;
- padding: 0.2em;
-}
-
-.site-tags .refresh
-{
- background-image: url(images/refresh.png);
- background-repeat: no-repeat;
- float: right;
- height: 16px;
- left: -8px;
- position: relative;
- top: -22px;
- width: 16px;
-}
-
-.site-tags .refresh a,
-.site-tags .refresh a:active,
-.site-tags .refresh a:hover
-{
- display: block;
- height: 16px;
- text-decoration: none;
- width: 16px;
-}
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/site-tags.js b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/site-tags.js
deleted file mode 100644
index cb71a7e7..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/components/dashlets/site-tags.js
+++ /dev/null
@@ -1,422 +0,0 @@
-/**
- * Copyright (C) 2005-2009 Alfresco Software Limited.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- * As a special exception to the terms and conditions of version 2.0 of
- * the GPL, you may redistribute this Program in connection with Free/Libre
- * and Open Source Software ("FLOSS") applications as described in Alfresco's
- * FLOSS exception. You should have recieved a copy of the text describing
- * the FLOSS exception, and it is also available here:
- * http://www.alfresco.com/legal/licensing
- */
-
-/**
- * Dashboard Site Tags component.
- *
- * @namespace Alfresco
- * @class Alfresco.dashlet.SiteTags
- */
-(function()
-{
- /**
- * YUI Library aliases
- */
- var Dom = YAHOO.util.Dom,
- Event = YAHOO.util.Event;
-
- /**
- * Alfresco Slingshot aliases
- */
- var $html = Alfresco.util.encodeHTML,
- $combine = Alfresco.util.combinePaths;
-
- /**
- * Preferences
- */
- var PREFERENCES_DASHLET = "org.alfresco.share.dashlet",
- PREF_SITE_TAGS_FILTER = PREFERENCES_DASHLET + ".siteTagsFilter";
-
-
- /**
- * Dashboard SiteTags constructor.
- *
- * @param {String} htmlId The HTML id of the parent element
- * @return {Alfresco.dashlet.SiteTags} The new component instance
- * @constructor
- */
- Alfresco.dashlet.SiteTags = function SiteTags_constructor(htmlId)
- {
- return Alfresco.dashlet.SiteTags.superclass.constructor.call(this, "Alfresco.dashlet.SiteTags", htmlId);
- };
-
- /**
- * Extend from Alfresco.component.Base and add class implementation
- */
- YAHOO.extend(Alfresco.dashlet.SiteTags, Alfresco.component.Base,
- {
- /**
- * Object container for initialization options
- *
- * @property options
- * @type object
- */
- options:
- {
- /**
- * Max items
- *
- * @property maxItems
- * @type integer
- * @default 50
- */
- maxItems: 50,
-
- /**
- * Currently active filter.
- *
- * @property activeFilter
- * @type string
- * @default "all"
- */
- activeFilter: "all"
- },
-
- /**
- * Tags DOM container.
- *
- * @property tagsContainer
- * @type object
- */
- tagsContainer: null,
-
- /**
- * ContainerId for tag scope query
- *
- * @property containerId
- * @type string
- * @default ""
- */
- containerId: null,
-
- /**
- * Fired by YUI when parent element is available for scripting
- * @method onReady
- */
- onReady: function SiteTags_onReady()
- {
- var me = this;
-
- // The tags container
- this.tagsContainer = Dom.get(this.id + "-tags");
-
- // Hook the refresh icon click
- Event.addListener(this.id + "-refresh", "click", this.onRefresh, this, true);
-
- // Preferences service
- this.services.preferences = new Alfresco.service.Preferences();
-
- // "All" filter
- this.widgets.all = new YAHOO.widget.Button(this.id + "-all",
- {
- type: "checkbox",
- value: "all",
- checked: true
- });
- this.widgets.all.on("checkedChange", this.onAllCheckedChanged, this.widgets.all, this);
-
- // Dropdown filter
- this.widgets.filter = new YAHOO.widget.Button(this.id + "-filter",
- {
- type: "split",
- menu: this.id + "-filter-menu",
- lazyloadmenu: false
- });
- this.widgets.filter.on("click", this.onFilterClicked, this, true);
- // Clear the lazyLoad flag and fire init event to get menu rendered into the DOM
- var menu = this.widgets.filter.getMenu();
- menu.subscribe("click", function (p_sType, p_aArgs)
- {
- var menuItem = p_aArgs[1];
- if (menuItem)
- {
- me.widgets.filter.set("label", menuItem.cfg.getProperty("text"));
- me.onFilterChanged.call(me, p_aArgs[1]);
- }
- });
-
- if (this.options.activeFilter == "all")
- {
- this.widgets.filter.value = "documentLibrary";
- this.setActiveFilter("all");
- }
- else
- {
- this.widgets.filter.value = this.options.activeFilter;
-
- // Loop through and find the menuItem corresponding to the default filter
- var menuItems = menu.getItems(),
- menuItem,
- i, ii;
-
- for (i = 0, ii = menuItems.length; i < ii; i++)
- {
- menuItem = menuItems[i];
- if (menuItem.value == this.options.activeFilter)
- {
- menu.clickEvent.fire(
- {
- type: "click"
- }, menuItem);
- break;
- }
- }
- }
- },
-
- /**
- * Event handler for refresh click
- * @method onRefresh
- * @param e {object} Event
- */
- onRefresh: function SiteTags_onRefresh(e)
- {
- if (e)
- {
- // Stop browser's default click behaviour for the link
- Event.preventDefault(e);
- }
- this.refreshTags();
- },
-
- /**
- * Refresh tags
- * @method refreshTags
- */
- refreshTags: function SiteTags_refreshTags()
- {
- // Hide the existing content
- Dom.setStyle(this.tagsContainer, "display", "none");
-
- // Make an AJAX request to the Tag Service REST API
- Alfresco.util.Ajax.jsonGet(
- {
- url: Alfresco.constants.PROXY_URI + "api/tagscopes/site/" + $combine(this.options.siteId, this.containerId, "tags"),
- successCallback:
- {
- fn: this.onTagsSuccess,
- scope: this
- },
- failureCallback:
- {
- fn: this.onTagsFailed,
- scope: this
- },
- scope: this,
- noReloadOnAuthFailure: true
- });
- },
-
- /**
- * Tags retrieved successfully
- * @method onTagsSuccess
- * @param p_response {object} Response object from request
- */
- onTagsSuccess: function SiteTags_onTagsSuccess(p_response)
- {
- // Retrieve the tags list from the JSON response and trim accordingly
- var tags = p_response.json.tags.slice(0, this.options.maxItems),
- numTags = tags.length,
- totalTags = 0,
- html = "",
- i, ii;
-
- // Work out total number of tags for scaling
- for (i = 0, ii = tags.length; i < ii; i++)
- {
- totalTags += tags[i].count;
- }
-
- // Tags to show?
- if (tags.length === 0)
- {
- html = '
' + this.msg("message.no-tags") + '
';
- }
- else
- {
- // Define inline scaling functions
- var tag,
- fnTagWeighting = function tagWeighting(thisTag)
- {
- return thisTag.count / (totalTags / numTags);
- },
- fnTagFontSize = function tagFontSize(thisTag)
- {
- return (0.5 + fnTagWeighting(thisTag)).toFixed(2);
- },
- fnSortByTagAlphabetical = function sortByTagAlphabetical(tag1, tag2)
- {
- if (tag1.name < tag2.name)
- return -1;
-
- if (tag1.name > tag2.name)
- return 1;
-
- return 0;
- };
-
- // Sort tags alphabetically - standard for tag clouds
- tags.sort(fnSortByTagAlphabetical);
-
- // Generate HTML mark-up for each tag
- for (i = 0, ii = tags.length; i < ii; i++)
- {
- tag = tags[i];
- html += '
';
- }
- }
- this.tagsContainer.innerHTML = html;
-
- // Fade the new content in
- Alfresco.util.Anim.fadeIn(this.tagsContainer);
- },
-
- /**
- * Tags request failed
- * @method onTagsFailed
- */
- onTagsFailed: function SiteTags_onTagsFailed()
- {
- this.tagsContainer.innerHTML = this.msg("refresh-failed");
- Alfresco.util.Anim.fadeIn(this.tagsContainer);
- },
-
- /**
- * Generate Uri template based on current active filter
- * @method getUriTemplate
- * @param tag {object} Tag object literal
- */
- getUriTemplate: function SiteTags_getUriTemplate(tag)
- {
- var uri = Alfresco.constants.URL_CONTEXT + 'page/site/' + this.options.siteId;
- switch (this.options.activeFilter)
- {
- case "wiki":
- uri += '/wiki';
- break;
-
- case "blog":
- uri += '/blog-postlist';
- break;
-
- case "documentLibrary":
- uri += '/documentlibrary#filter=tag|' + encodeURIComponent(tag.name);
- break;
-
- case "calendar":
- uri += '/calendar';
- break;
-
- case "links":
- uri += '/links';
- break;
-
- case "discussions":
- uri += '/discussions-topiclist';
- break;
-
- default:
- uri += '/search?tag=' + encodeURIComponent(tag.name) + '&a=false';
- }
- return uri;
- },
-
- /**
- * Sets the active filter highlight in the UI
- * @method updateFilterUI
- */
- updateFilterUI: function SiteTags_updateFilterUI()
- {
- switch (this.options.activeFilter)
- {
- case "all":
- Dom.removeClass(this.widgets.filter.get("element"), "yui-checkbox-button-checked");
- break;
-
- default:
- this.widgets.all.set("checked", false, true);
- Dom.addClass(this.widgets.filter.get("element"), "yui-checkbox-button-checked");
- break;
- }
- },
-
- /**
- * Saves active filter to user preferences
- * @method saveActiveFilter
- * @param filter {string} New filter to set
- * @param noPersist {boolean} [Optional] If set, preferences are not updated
- */
- setActiveFilter: function SiteTags_saveActiveFilter(filter, noPersist)
- {
- this.options.activeFilter = filter;
- this.containerId = filter !== "all" ? filter : "";
- this.updateFilterUI();
- this.refreshTags();
- if (noPersist !== true)
- {
- this.services.preferences.set(PREF_SITE_TAGS_FILTER, filter);
- }
- },
-
- /**
- * YUI WIDGET EVENT HANDLERS
- * Handlers for standard events fired from YUI widgets, e.g. "click"
- */
-
- /**
- * All tasks
- * @method onAllCheckedChanged
- * @param p_oEvent {object} Button event
- * @param p_obj {object} Button
- */
- onAllCheckedChanged: function Sitetags_onAllCheckedChanged(p_oEvent, p_obj)
- {
- this.setActiveFilter("all");
- p_obj.set("checked", true, true);
- },
-
- /**
- * Filter button clicked event handler
- * @method onFilterClicked
- * @param p_oEvent {object} Dom event
- */
- onFilterClicked: function SiteTags_onFilterClicked(p_oEvent)
- {
- this.setActiveFilter(this.widgets.filter.value);
- },
-
- /**
- * Filter drop-down changed event handler
- * @method onFilterChanged
- * @param p_oMenuItem {object} Selected menu item
- */
- onFilterChanged: function SiteTags_onFilterChanged(p_oMenuItem)
- {
- var filter = p_oMenuItem.value;
- this.widgets.filter.value = filter;
- this.setActiveFilter(filter);
- }
- });
-})();
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.config.xml b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.config.xml
deleted file mode 100644
index 923d230a..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.config.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- 50
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.desc.xml b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.desc.xml
deleted file mode 100644
index 2f4381a3..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.desc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
- Tag Cloud
- Displays a cloud of all the tags defined in this site
- site-dashlet
- /components/dashlets/site-tags
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.head.ftl b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.head.ftl
deleted file mode 100644
index 42124fc9..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.head.ftl
+++ /dev/null
@@ -1,4 +0,0 @@
-<#include "../component.head.inc">
-
-<@link rel="stylesheet" type="text/css" href="${page.url.context}/res/components/dashlets/site-tags.css" />
-<@script type="text/javascript" src="${page.url.context}/res/components/dashlets/site-tags.js">@script>
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.html.ftl b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.html.ftl
deleted file mode 100644
index d11ea3af..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.html.ftl
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
${msg("header")}
-
-
-
-
-
-
-
style="height: ${args.height}px;"#if>>
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.js b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.js
deleted file mode 100644
index 35404b05..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.js
+++ /dev/null
@@ -1,32 +0,0 @@
-const PREFERENCES_ROOT = "org.alfresco.share.dashlet";
-
-function main()
-{
- var s = new XML(config.script);
- model.maxItems = parseInt(s.maxitems, 10);
-
- var result, preferences = {};
-
- // Request the current user's preferences
- var result = remote.call("/api/people/" + stringUtils.urlEncode(user.name) + "/preferences?pf=" + PREFERENCES_ROOT);
- if (result.status == 200 && result != "{}")
- {
- var prefs = eval('(' + result + ')');
- try
- {
- // Populate the preferences object literal for easy look-up later
- preferences = eval('(prefs.' + PREFERENCES_ROOT + ')');
- if (typeof preferences != "object")
- {
- preferences = {};
- }
- }
- catch (e)
- {
- }
- }
-
- model.preferences = preferences;
-}
-
-main();
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.properties b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.properties
deleted file mode 100644
index 437f82d2..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-header=Site Tags
-message.no-tags=No tags found
-message.error=Error: Could not retrieve tags list.
-
-filter.all=All
-filter.wiki=Wiki
-filter.blog=Blog
-filter.documentLibrary=Document Library
-filter.calendar=Calendar
-filter.links=Links
-filter.discussions=Discussions
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get_cy.properties b/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get_cy.properties
deleted file mode 100644
index 2e2ea1da..00000000
--- a/maven-alfresco-archetypes/maven-alfresco-share-module-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/site-webscripts/org/alfresco/components/dashlets/site-tags.get_cy.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-header.siteTags=Tagiau Safle
-header.noTags=Dim tagiau wedi canfod
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/pom.xml b/maven-alfresco-archetypes/pom.xml
deleted file mode 100644
index 1b541dfc..00000000
--- a/maven-alfresco-archetypes/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
- 4.0.0
- org.alfresco
- maven-alfresco-archetypes
- pom
- Maven Alfresco Archetypes base project
-
- This project is meant to gather all commons configurations and settings between the two maven-alfresco-*-archetypes, i.e. maven-alfresco-extension-archetype and maven-alfresco-amp-archetype
-
-
- org.alfresco
- maven-alfresco-lifecycle
- 4.0.0-SNAPSHOT
- ../pom.xml
-
-
- Maven Alfresco Community
- http://www.alfresco.com
-
-
- maven-alfresco-amp-archetype
- maven-alfresco-extension-archetype
- maven-alfresco-share-archetype
- maven-alfresco-share-module-archetype/
-
-
-
-
- org.apache.maven.wagon
- wagon-http-shared
- 1.0
-
-
-
-
- maven-archetype-plugin
- 2.0
- true
-
-
-
-
diff --git a/maven-alfresco-archetypes/src/site/fml/faq.fml b/maven-alfresco-archetypes/src/site/fml/faq.fml
deleted file mode 100644
index 2503a0c1..00000000
--- a/maven-alfresco-archetypes/src/site/fml/faq.fml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- Backward compatibility
-
- I'm lost in versions and repositories. Which one I should use?
-
-
-
As the introduction of the parent project maven-alfresco-lifecycle you can refer to it as the latest working version of the full support
-
You might (optionally) want to tweak specific modules versions (archetypes, plugins) in order to match the latest features
-
-
-
-
- I see many project aroud Maven and Alfresco (m2alfresco, maven4alfresco, this project). Is there a reference one?
-
-
- The maven-alfresco-lifecycle project gathers all efforts made in previous projects and gather them
- under a common application lifecycle management suite.
-
-
-
-
-
\ No newline at end of file
diff --git a/maven-alfresco-archetypes/src/site/resources/css/maven-base.css b/maven-alfresco-archetypes/src/site/resources/css/maven-base.css
deleted file mode 100644
index b1ea3713..00000000
--- a/maven-alfresco-archetypes/src/site/resources/css/maven-base.css
+++ /dev/null
@@ -1 +0,0 @@
-.maven {}
diff --git a/maven-alfresco-archetypes/src/site/resources/css/site.css b/maven-alfresco-archetypes/src/site/resources/css/site.css
deleted file mode 100644
index b1ea3713..00000000
--- a/maven-alfresco-archetypes/src/site/resources/css/site.css
+++ /dev/null
@@ -1 +0,0 @@
-.maven {}
diff --git a/plugins/maven-amp-plugin-test/module.properties b/plugins/maven-amp-plugin-test/module.properties
deleted file mode 100755
index c54f8b38..00000000
--- a/plugins/maven-amp-plugin-test/module.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-# 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.
-
-
-
-# SDK Sample module
-
-# ==== Beginning of Alfresco required/optional properties ====== #
-
-module.id=${alfresco.module.id}
-#module.aliases=myModule-123, my-module
-module.title=${project.name}
-module.description=${project.description}
-module.version=${alfresco.module.version}
-
-# The following optional properties can be used to prevent the module from being added
-# to inappropriate versions of the WAR file.
-# module.repo.version.min=2.0
-# module.repo.version.max=2.1
-
-# FIXME: This dependencies should come out of mvn dependencies on amp
-
-# The following describe dependencies on other modules
-# Depends on net.sf.myproject.module.SupportModuleA version ${version} or later
-# module.depends.net.sf.myproject.module.SupportModuleA=${version}-*
-# Depends on net.sf.myproject.module.SupportModuleA version ${version} to 2.0
-# module.depends.net.sf.myproject.module.SupportModuleB=${version}-2.0
-# Depends on net.sf.myproject.module.SupportModuleC - any version
-# module.depends.net.sf.myproject.module.SupportModuleB=*
-
-
-# ==== End of Alfresco required/optional properties ======= #
-
-
-# ==== Beginning of module required properties/optional ====== #
\ No newline at end of file
diff --git a/plugins/maven-amp-plugin-test/pom.xml b/plugins/maven-amp-plugin-test/pom.xml
deleted file mode 100755
index af8073dc..00000000
--- a/plugins/maven-amp-plugin-test/pom.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
- 4.0.0
- org.alfresco.maven.plugin
- maven-amp-plugin-test
- amp
- Test project for Maven AMP Plugin
- 1.0.0
-
- org.alfresco
- maven-alfresco-lifecycle
- 4.0.0-SNAPSHOT
- ../../pom.xml
-
-
- UTF-8
- 3.4.a
- community
- 3.0.0.RELEASE
- 3.0.3-SNAPSHOT
- ${project.artifactId}
- 0.0.999
-
-
-
- org.alfresco
- alfresco-repository
- ${alfresco.version}
- provided
- ${alfresco.edition}
-
-
- org.springframework
- spring-context
- 3.0.3.RELEASE
-
-
-
-
-
- org.alfresco.maven.plugin
- maven-amp-plugin
- ${amp-plugin.version}
- true
-
-
-
- src/main/ampResources
-
- **/*.png
- **/*.gif
- **/*.jpg
-
- true
-
-
- src/main/ampResources
-
- **/*.png
- **/*.gif
- **/*.jpg
-
- false
-
-
- src/main/module
- config/alfresco/module/${alfresco.module.id}
-
- **README-*
-
- true
-
-
-
- false
-
-
-
-
-
-
- true
- src/main/resources
-
-
-
-
diff --git a/plugins/maven-amp-plugin-test/src/main/java/org/alfresco/maven/plugin/amp/patch/SayHelloPatch.java b/plugins/maven-amp-plugin-test/src/main/java/org/alfresco/maven/plugin/amp/patch/SayHelloPatch.java
deleted file mode 100644
index 6c096e28..00000000
--- a/plugins/maven-amp-plugin-test/src/main/java/org/alfresco/maven/plugin/amp/patch/SayHelloPatch.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.alfresco.maven.plugin.amp.patch;
-
-import org.alfresco.repo.admin.patch.AbstractPatch;
-
-public class SayHelloPatch extends AbstractPatch {
-
- @Override
- protected String applyInternal() throws Exception {
- return "Hello";
- }
-
-}
diff --git a/plugins/maven-amp-plugin-test/src/main/resources/META-INF/web-client-config-custom.xml b/plugins/maven-amp-plugin-test/src/main/resources/META-INF/web-client-config-custom.xml
deleted file mode 100755
index 9e1842b2..00000000
--- a/plugins/maven-amp-plugin-test/src/main/resources/META-INF/web-client-config-custom.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- Français
-
-
-
diff --git a/plugins/maven-amp-plugin/pom.xml b/plugins/maven-amp-plugin/pom.xml
deleted file mode 100644
index 148e7be2..00000000
--- a/plugins/maven-amp-plugin/pom.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-
- 4.0.0
- org.alfresco.maven.plugin
- maven-amp-plugin
- maven-plugin
- Alfresco AMP Plugin
- 3.0.5-SNAPSHOT
-
- org.alfresco
- maven-alfresco-lifecycle
- 4.0.0-SNAPSHOT
- ../../pom.xml
-
-
- This plugin defines a lifecycle for Alfresco ECM Modules packaging (.amp), handles AMP transitive dependencies
- from AMP and WAR projects,
- providing a more enterprise oriented support alternative to the Alfresco MMT (module management tool) usage. It
- is used by
- maven-alfresco-amp-archetype in order to package and test run an AMP and by the
- maven-alfresco-extension-archetype to depend transitively upon
- AMPs and WARs. It is a modification of the org.apache.maven.plugins:maven-war-plugin of which it uses the whole
- core infrastructure. See
- ${site.url} for more info
-
-
- ${project.description}
- ${project.url}
- ${project.groupId}
- ${project.artifactId}
- ${project.version}
- ${svn.tags.url}
-
-
-
- columbro
- Gabriele Columbro
- gabriele.columbro@alfresco.com
-
- Alfresco
- http://www.alfresco.com
-
-
- rdanner
- Russ Danner
-
- Rivet Logic
-
-
-
-
-
- org.apache.maven
- maven-plugin-api
- 3.0.3
-
-
- org.apache.maven
- maven-compat
- 3.0-alpha-4
-
-
- org.apache.maven
- maven-artifact
- 3.0.3
-
-
- org.apache.maven
- maven-project
- 3.0-alpha-2
-
-
- org.apache.maven
- maven-archiver
- 2.4.1
-
-
- org.codehaus.plexus
- plexus-interpolation
- 1.13
-
-
- com.thoughtworks.xstream
- xstream
- 1.3.1
-
-
- junit
- junit
- 4.8.2
- test
-
-
- org.apache.maven.plugin-testing
- maven-plugin-testing-harness
- 2.0-alpha-1
- test
-
-
-
diff --git a/plugins/maven-amp-plugin/src/changes/changes.xml b/plugins/maven-amp-plugin/src/changes/changes.xml
deleted file mode 100644
index 9bba0285..00000000
--- a/plugins/maven-amp-plugin/src/changes/changes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
- Maven AMP plugin
-
-
-
- Support for file-mappings.properties
- Proper inclusion of META-INF
- mAmpResources was ignored
- Align groupId to org.alfresco
-
-
-
-
-
-
-
-
-
-
-
- Now consistent maven plugin properties usage and support for AMP overlays and full AMP lifecycle
-
-
- Added UnArchiver to mimic MMT behavior. Not needed anymore as AMPs gets properly unpacked into a WAR artifact.
-
-
- Added plugin site documentation
-
-
- Deployed on maven repository: http://repository.sourcesense.com/maven2/org/alfresco/maven/plugins
-
-
-
-
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/AbstractAmpMojo.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/AbstractAmpMojo.java
deleted file mode 100644
index 85acf857..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/AbstractAmpMojo.java
+++ /dev/null
@@ -1,781 +0,0 @@
-package org.alfresco.maven.plugin.amp;
-
-/*
- * 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.
- */
-
-import org.alfresco.maven.plugin.amp.overlay.OverlayManager;
-import org.alfresco.maven.plugin.amp.packaging.AmpPackagingContext;
-import org.alfresco.maven.plugin.amp.packaging.AmpPackagingTask;
-import org.alfresco.maven.plugin.amp.packaging.AmpPostPackagingTask;
-import org.alfresco.maven.plugin.amp.packaging.AmpProjectPackagingTask;
-import org.alfresco.maven.plugin.amp.packaging.OverlayPackagingTask;
-import org.alfresco.maven.plugin.amp.packaging.SaveAmpStructurePostPackagingTask;
-import org.alfresco.maven.plugin.amp.util.AmpStructure;
-import org.alfresco.maven.plugin.amp.util.AmpStructureSerializer;
-import org.alfresco.maven.plugin.amp.util.CompositeMap;
-import org.alfresco.maven.plugin.amp.util.PropertyUtils;
-import org.alfresco.maven.plugin.amp.util.ReflectionProperties;
-
-
-import org.apache.maven.archiver.MavenArchiveConfiguration;
-import org.apache.maven.model.Resource;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.archiver.jar.JarArchiver;
-import org.codehaus.plexus.archiver.manager.ArchiverManager;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-public abstract class AbstractAmpMojo extends AbstractMojo
-{
-
- /**
- * Returns a string array of the classes and resources to be excluded from the jar excludes to be used
- * when assembling/copying the AMP.
- *
- * @return an array of tokens to exclude
- */
- protected String[] getExcludes()
- {
- List excludeList = new ArrayList();
- if ( StringUtils.isNotEmpty( mAmpJarExcludes ) )
- {
- excludeList.addAll( Arrays.asList( StringUtils.split( mAmpJarExcludes, "," ) ) );
- }
-
- return (String[]) excludeList.toArray( EMPTY_STRING_ARRAY );
- }
-
- /**
- * Returns a string array of the classes and resources to be included from the jar assembling/copying the war.
- *
- * @return an array of tokens to include
- */
- protected String[] getIncludes()
- {
- return StringUtils.split( StringUtils.defaultString( mAmpJarIncludes ), "," );
- }
-
- /**
- * Returns a string array of the resources to be included in the AMP web/ folder.
- *
- * @return an array of tokens to include
- */
- protected String[] getWebIncludes()
- {
- return StringUtils.split( StringUtils.defaultString( mAmpWebIncludes ), "," );
- }
-
- /**
- * Returns a string array of the resources to be excluded in the AMP web/ folder.
- *
- * @return an array of tokens to exclude
- */
- protected String[] getWebExcludes()
- {
- List excludeList = new ArrayList();
- if ( StringUtils.isNotEmpty( mAmpWebExcludes ) )
- {
- excludeList.addAll( Arrays.asList( StringUtils.split( mAmpWebExcludes, "," ) ) );
- }
-
- return (String[]) excludeList.toArray( EMPTY_STRING_ARRAY );
-
- }
-
-
- /**
- * Returns a string array of the excludes to be used
- * when adding dependent AMPs as an overlay onto this AMP.
- *
- * @return an array of tokens to exclude
- */
- protected String[] getDependentAmpExcludes()
- {
- String[] excludes;
- if ( StringUtils.isNotEmpty( dependentAmpExcludes ) )
- {
- excludes = StringUtils.split( dependentAmpExcludes, "," );
- }
- else
- {
- excludes = EMPTY_STRING_ARRAY;
- }
- return excludes;
- }
-
- /**
- * Returns a string array of the includes to be used
- * when adding dependent AMP as an overlay onto this AMP.
- *
- * @return an array of tokens to include
- */
- protected String[] getDependentAmpIncludes()
- {
- return StringUtils.split( StringUtils.defaultString( dependentAmpIncludes ), "," );
- }
-
- public void buildExplodedAmp( File webappDirectory )
- throws MojoExecutionException, MojoFailureException
- {
- webappDirectory.mkdirs();
-
- try
- {
- buildAmp( mProject, webappDirectory );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not build AMP", e );
- }
- }
-
-
- /**
- * Builds the webapp for the specified project with the new packaging task
- * thingy
- *
- * Classes, libraries and tld files are copied to
- * the webappDirectory during this phase.
- *
- * @param project the maven project
- * @param webappDirectory the target directory
- * @throws MojoExecutionException if an error occured while packaging the webapp
- * @throws MojoFailureException if an unexpected error occured while packaging the webapp
- * @throws IOException if an error occured while copying the files
- */
- public void buildAmp( MavenProject project, File webappDirectory )
- throws MojoExecutionException, MojoFailureException, IOException
- {
-
- AmpStructure cache;
- if ( mUseCache && mCacheFile.exists() )
- {
- cache = new AmpStructure( webappStructureSerialier.fromXml( mCacheFile ) );
- }
- else
- {
- cache = new AmpStructure( null );
- }
-
- final long startTime = System.currentTimeMillis();
- getLog().info( "Assembling AMP [" + project.getArtifactId() + "] in [" + webappDirectory + "]" );
-
- final OverlayManager overlayManager =
- new OverlayManager( mOverlays, project, dependentAmpIncludes, dependentAmpExcludes );
- final List packagingTasks = getPackagingTasks( overlayManager );
- final AmpPackagingContext context = new DefaultAmpPackagingContext( webappDirectory, cache, overlayManager );
- final Iterator it = packagingTasks.iterator();
- while ( it.hasNext() )
- {
- AmpPackagingTask ampPackagingTask = (AmpPackagingTask) it.next();
- ampPackagingTask.performPackaging( context );
- }
-
- // Post packaging
- final List postPackagingTasks = getPostPackagingTasks();
- final Iterator it2 = postPackagingTasks.iterator();
- while ( it2.hasNext() )
- {
- AmpPostPackagingTask task = (AmpPostPackagingTask) it2.next();
- task.performPostPackaging( context );
-
- }
- getLog().info( "AMP assembled in[" + ( System.currentTimeMillis() - startTime ) + " msecs]" );
-
- }
-
- /**
- * Returns a List of the {@link org.alfresco.maven.plugin.amp.packaging.AmpPackagingTask}
- * instances to invoke to perform the packaging.
- *
- * @param overlayManager the overlay manager
- * @return the list of packaging tasks
- * @throws MojoExecutionException if the packaging tasks could not be built
- */
- private List getPackagingTasks( OverlayManager overlayManager )
- throws MojoExecutionException
- {
- final List packagingTasks = new ArrayList();
- final List resolvedOverlays = overlayManager.getOverlays();
- final Iterator it = resolvedOverlays.iterator();
- while ( it.hasNext() )
- {
- Overlay overlay = (Overlay) it.next();
- if ( overlay.isCurrentProject() )
- {
- packagingTasks.add( new AmpProjectPackagingTask( mAmpResources, mModuleProperties, mFileMappingProperties) );
- }
- else
- {
- packagingTasks.add( new OverlayPackagingTask( overlay ) );
- }
- }
- return packagingTasks;
- }
-
-
- /**
- * Returns a List of the {@link org.alfresco.maven.plugin.amp.packaging.AmpPostPackagingTask}
- * instances to invoke to perform the post-packaging.
- *
- * @return the list of post packaging tasks
- */
- private List getPostPackagingTasks()
- {
- final List postPackagingTasks = new ArrayList();
- if ( mUseCache )
- {
- postPackagingTasks.add( new SaveAmpStructurePostPackagingTask( mCacheFile ) );
- }
- // TODO add lib scanning to detect duplicates
- return postPackagingTasks;
- }
-
-
- /**
- * The maven project.
- *
- * @parameter expression="${project}"
- * @required
- * @readonly
- */
- private MavenProject mProject;
-
- /**
- * The directory containing generated classes.
- *
- * @parameter expression="${project.build.outputDirectory}"
- * @required
- * @readonly
- */
- private File mClassesDirectory;
-
-
- /**
- * The Jar archiver needed for archiving classes directory into jar file under WEB-INF/lib.
- *
- * @component role="org.codehaus.plexus.archiver.Archiver" role-hint="jar"
- * @required
- */
- private JarArchiver mJarArchiver;
-
-
- /**
- * The directory where the webapp is built.
- *
- * @parameter expression="${project.build.directory}/${project.build.finalName}"
- * @required
- */
- private File mAmpDirectory;
-
- /**
- * Single directory for extra files to include in the AMP.
- *
- * @parameter expression="${project.build.outputDirectory}"
- * @required
- */
- private File mAmpConfigDirectory;
-
- /**
- * Single directory for extra files to include in the AMP.
- *
- * @parameter expression="${basedir}/src/main/webapp"
- * @required
- */
- private File mAmpWebDirectory;
-
- /**
- * The list of webResources we want to transfer.
- *
- * @parameter
- */
- private Resource[] mAmpResources;
-
- /**
- * Filters (property files) to include during the interpolation of the pom.xml.
- *
- * @parameter expression="${project.build.filters}"
- */
- private List filters;
-
- /**
- * The path to the web.xml file to use.
- *
- * @parameter expression="${maven.amp.moduleProperties}" default-value="${project.basedir}/module.properties"
- */
- private File mModuleProperties;
-
- /**
- * The path to the file-mapping.properties file to use.
- *
- * @parameter expression="${maven.amp.fileMappingProperties}" default-value="${project.basedir}/file-mapping.properties"
- */
- private File mFileMappingProperties;
-
- /**
- * Directory to unpack dependent AMPs into if needed
- *
- * @parameter expression="${project.build.directory}/amp/work"
- * @required
- */
- private File mWorkDirectory;
-
- /**
- * The file name mapping to use to copy libraries and tlds. If no file mapping is
- * set (default) the file is copied with its standard name.
- *
- * @parameter
- * @since 2.0.3
- */
- private String mOutputFileNameMapping;
-
- /**
- * The file containing the webapp structure cache.
- *
- * @parameter expression="${project.build.directory}/amp/work/amp-cache.xml"
- * @required
- * @since 2.1
- */
- private File mCacheFile;
-
- /**
- * Whether the cache should be used to save the status of the webapp
- * accross multiple runs.
- *
- * @parameter expression="${useCache}" default-value="true"
- * @since 2.1
- */
- private boolean mUseCache = true;
-
-
-
- /**
- * To look up Archiver/UnArchiver implementations
- *
- * @component role="org.codehaus.plexus.archiver.manager.ArchiverManager"
- * @required
- */
- protected ArchiverManager mArchiverManager;
-
- private static final String META_INF = "META-INF";
-
- public static final String DEFAULT_FILE_NAME_MAPPING_CLASSIFIER =
- "${artifactId}-${version}-${classifier}.${extension}";
-
- public static final String DEFAULT_FILE_NAME_MAPPING = "${artifactId}-${version}.${extension}";
-
- /**
- * The comma separated list of tokens to include in the AMP internal JAR. Default **.
- * Default is '**'.
- *
- * @parameter alias="includes"
- */
- private String mAmpJarIncludes = "**/*.class,META-INF/**";
-
- /**
- * The comma separated list of tokens to exclude from the AMP created JAR file
- *
- * @parameter alias="excludes" default-value=""
- */
- private String mAmpJarExcludes;
-
-
- /**
- * The comma separated list of tokens to include in the AMP internal JAR. Default **.
- * Default is '**'.
- *
- * @parameter alias="webIncludes" default-value="**"
- */
- private String mAmpWebIncludes;
-
- /**
- * The comma separated list of tokens to exclude from the AMP created JAR file. By default module configuration is left outside jars.
- *
- * @parameter alias="webExcludes"
- */
- private String mAmpWebExcludes;
-
- /**
- * The comma separated list of tokens to include when doing
- * a AMP overlay.
- * Default is '**'
- *
- * @parameter
- */
- private String dependentAmpIncludes = "**/**";
-
- /**
- * The comma separated list of tokens to exclude when doing
- * a AMP overlay.
- *
- * @parameter
- */
- private String dependentAmpExcludes = "META-INF/**";
-
- /**
- * The overlays to apply.
- *
- * @parameter
- * @since 2.1
- */
- private List mOverlays = new ArrayList();
-
- /**
- * The maven archive configuration to use.
- *
- * @parameter
- */
- protected MavenArchiveConfiguration archive = new MavenArchiveConfiguration();
-
- private static final String[] EMPTY_STRING_ARRAY = {};
-
- private final AmpStructureSerializer webappStructureSerialier = new AmpStructureSerializer();
-
-
-
-
- // AMP packaging implementation
-
- private class DefaultAmpPackagingContext
- implements AmpPackagingContext
- {
-
-
- private final AmpStructure webappStructure;
-
- private final File mAmpDirectory;
-
- private final OverlayManager overlayManager;
-
- public DefaultAmpPackagingContext( File webappDirectory, final AmpStructure webappStructure,
- final OverlayManager overlayManager )
- {
- this.mAmpDirectory = webappDirectory;
- this.webappStructure = webappStructure;
- this.overlayManager = overlayManager;
-
- // This is kinda stupid but if we loop over the current overlays and we request the path structure
- // it will register it. This will avoid wrong warning messages in a later phase
- final Iterator it = overlayManager.getOverlayIds().iterator();
- while ( it.hasNext() )
- {
- String overlayId = (String) it.next();
- webappStructure.getStructure( overlayId );
- }
- }
-
- public MavenProject getProject()
- {
- return mProject;
- }
-
- public File getAmpDirectory()
- {
- return mAmpDirectory;
- }
-
- public File getClassesDirectory()
- {
- return mClassesDirectory;
- }
-
- public Log getLog()
- {
- return AbstractAmpMojo.this.getLog();
- }
-
- public String getOutputFileNameMapping()
- {
- return mOutputFileNameMapping;
- }
-
- public File getAmpWebDirectory()
- {
- return mAmpWebDirectory;
- }
-
- public String[] getAmpJarIncludes()
- {
- return getIncludes();
- }
-
- public String[] getAmpJarExcludes()
- {
- return getExcludes();
- }
-
- public File getOverlaysWorkDirectory()
- {
- return mWorkDirectory;
- }
-
- public ArchiverManager getArchiverManager()
- {
- return mArchiverManager;
- }
-
- public MavenArchiveConfiguration getArchive()
- {
- return archive;
- }
-
- public JarArchiver getJarArchiver()
- {
- return mJarArchiver;
- }
-
- public List getFilters()
- {
- return filters;
- }
-
- public Map getFilterProperties()
- throws MojoExecutionException
- {
- Map filterProperties = new Properties();
-
- // System properties
- filterProperties.putAll( System.getProperties() );
-
- // Project properties
- filterProperties.putAll( mProject.getProperties() );
-
- for ( Iterator i = filters.iterator(); i.hasNext(); )
- {
- String filtersfile = (String) i.next();
-
- try
- {
- Properties properties = PropertyUtils.loadPropertyFile( new File( filtersfile ), true, true );
-
- filterProperties.putAll( properties );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error loading property file '" + filtersfile + "'", e );
- }
- }
-
- // can't putAll, as ReflectionProperties doesn't enumerate - so we make a composite map with the project variables as dominant
- return new CompositeMap( new ReflectionProperties( mProject ), filterProperties );
- }
-
- public AmpStructure getAmpStructure()
- {
- return webappStructure;
- }
-
- public List getOwnerIds()
- {
- return overlayManager.getOverlayIds();
- }
-
- /**
- * @see org.alfresco.maven.plugin.amp.packaging.AmpPackagingContext#getAmpConfigDirectory()
- */
- public File getAmpConfigDirectory()
- {
- return mAmpConfigDirectory;
- }
-
- public String[] getAmpWebExcludes() {
- return getWebExcludes();
- }
-
- public String[] getAmpWebIncludes() {
- return getWebIncludes();
- }
-
- }
-
- public MavenProject getProject()
- {
- return mProject;
- }
-
- public void setProject( MavenProject project )
- {
- this.mProject = project;
- }
-
- public File getClassesDirectory()
- {
- return mClassesDirectory;
- }
-
- public void setClassesDirectory( File classesDirectory )
- {
- this.mClassesDirectory = classesDirectory;
- }
-
- public File getAmpDirectory()
- {
- return mAmpDirectory;
- }
-
- public void setAmpDirectory( File webappDirectory )
- {
- this.mAmpDirectory = webappDirectory;
- }
-
- public File getAmpSourceDirectory()
- {
- return mAmpWebDirectory;
- }
-
- public void setAmpSourceDirectory( File ampSourceDirectory )
- {
- this.mAmpWebDirectory = ampSourceDirectory;
- }
-
- public File getWebXml()
- {
- return mModuleProperties;
- }
-
- public void setWebXml( File webXml )
- {
- this.mModuleProperties = webXml;
- }
-
-
- public File getmFileMappingProperties()
- {
- return mFileMappingProperties;
- }
-
- public void setmFileMappingProperties(File mFileMappingProperties)
- {
- this.mFileMappingProperties = mFileMappingProperties;
- }
-
- public String getOutputFileNameMapping()
- {
- return mOutputFileNameMapping;
- }
-
- public void setOutputFileNameMapping( String outputFileNameMapping )
- {
- this.mOutputFileNameMapping = outputFileNameMapping;
- }
-
- public List getOverlays()
- {
- return mOverlays;
- }
-
- public void setOverlays( List overlays )
- {
- this.mOverlays = overlays;
- }
-
- public void addOverlay( Overlay overlay )
- {
- mOverlays.add( overlay );
- }
-
-
- public JarArchiver getJarArchiver()
- {
- return mJarArchiver;
- }
-
- public void setJarArchiver( JarArchiver jarArchiver )
- {
- this.mJarArchiver = jarArchiver;
- }
-
- public Resource[] getAmpResources()
- {
- return mAmpResources;
- }
-
- public void setAmpResources( Resource[] webResources )
- {
- this.mAmpResources = webResources;
- }
-
- public List getFilters()
- {
- return filters;
- }
-
- public void setFilters( List filters )
- {
- this.filters = filters;
- }
-
- public File getWorkDirectory()
- {
- return mWorkDirectory;
- }
-
- public void setWorkDirectory( File workDirectory )
- {
- this.mWorkDirectory = workDirectory;
- }
-
- public File getCacheFile()
- {
- return mCacheFile;
- }
-
- public void setCacheFile( File cacheFile )
- {
- this.mCacheFile = cacheFile;
- }
-
- public void setAmpSourceIncludes( String ampSourceIncludes )
- {
- this.mAmpJarIncludes = ampSourceIncludes;
- }
-
- public String getAmpJarExcludes()
- {
- return mAmpJarExcludes;
- }
-
- public void setAmpJarExcludes( String ampJarExcludes )
- {
- this.mAmpJarExcludes = ampJarExcludes;
- }
-
-
- public boolean isUseCache()
- {
- return mUseCache;
- }
-
- public void setUseCache( boolean useCache )
- {
- this.mUseCache = useCache;
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/AmpExplodedMojo.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/AmpExplodedMojo.java
deleted file mode 100644
index 9ac9880a..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/AmpExplodedMojo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.alfresco.maven.plugin.amp;
-
-/*
- * 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.
- */
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * Generate the exploded webapp
- *
- * @goal explodedAmp
- * @phase package
- * @requiresDependencyResolution runtime
- */
-public class AmpExplodedMojo extends AbstractAmpMojo
-{
- public void execute()
- throws MojoExecutionException, MojoFailureException
- {
- getLog().info( "Exploding AMP" );
-
- this.buildExplodedAmp( this.getAmpDirectory() );
- }
-
-}
\ No newline at end of file
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/AmpMojo.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/AmpMojo.java
deleted file mode 100644
index 9eba6dc5..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/AmpMojo.java
+++ /dev/null
@@ -1,347 +0,0 @@
-package org.alfresco.maven.plugin.amp;
-
-/*
- * 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.
- */
-
-import org.alfresco.plexus.archiver.AmpArchiver;
-import org.apache.maven.archiver.MavenArchiver;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProjectHelper;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.jar.ManifestException;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Build a amp/webapp.
- *
- * Note this is a modification of Emmanuel Venisse's (evenisse@apache.org) WAR
- * Mojo and has been adapted to build an Alfresco AMP.
- * @version $Id:$
- * @goal amp
- * @phase package
- * @requiresDependencyResolution runtime
- */
-public class AmpMojo extends AbstractAmpMojo
-{
- /* ====================================================================== */
- // constructors
- /* ====================================================================== */
-
- /**
- * default constructor
- */
- public AmpMojo()
- {
- this.setAmpArchiver(null);
- this.setAmpName(null);
- this.setOutputDirectory(null);
- }
-
- /* ====================================================================== */
- // properties
- /* ====================================================================== */
-
- /**
- * Whether this is the main artifact being built. Set to false if you don't want to install or
- * deploy it to the local repository instead of the default one in an execution.
- *
- * @parameter expression="${primaryArtifact}" default-value="true"
- */
- private boolean mPrimaryArtifact;
-
- /**
- * get the the internal value for the ampArchiver property.
- *
- * The ampArchiver property
- * @return Returns the internal value for the ampArchiver property.
- */
- protected AmpArchiver getAmpArchiver()
- {
- return this.mAmpArchiver;
- }
-
- /**
- * set the internal value for the ampArchiver property
- * @param pAmpArchiver The ampArchiver to set.
- */
- protected void setAmpArchiver(AmpArchiver pAmpArchiver)
- {
- this.mAmpArchiver = pAmpArchiver;
- }
-
- /**
- * get the the internal value for the ampName property.
- *
- * The ampName property
- * @return Returns the internal value for the ampName property.
- */
- protected String getAmpName()
- {
- return this.mAmpName;
- }
-
- /**
- * set the internal value for the ampName property
- * @param pAmpName The ampName to set.
- */
- protected void setAmpName(String pAmpName)
- {
- this.mAmpName = pAmpName;
- }
-
- /**
- * get the the internal value for the outputDirectory property.
- *
- * The outputDirectory property
- * @return Returns the internal value for the outputDirectory property.
- */
- protected String getOutputDirectory()
- {
- return this.mOutputDirectory;
- }
-
- /**
- * set the internal value for the outputDirectory property
- * @param pOutputDirectory The outputDirectory to set.
- */
- protected void setOutputDirectory(String pOutputDirectory)
- {
- this.mOutputDirectory = pOutputDirectory;
- }
-
- /**
- * get the the internal value for the primaryArtifact property.
- *
- * The primaryArtifact property
- * @return Returns the internal value for the primaryArtifact property.
- */
- protected boolean isPrimaryArtifact()
- {
- return this.mPrimaryArtifact;
- }
-
- /**
- * set the internal value for the primaryArtifact property
- * @param pPrimaryArtifact The primaryArtifact to set.
- */
- protected void setPrimaryArtifact(boolean pPrimaryArtifact)
- {
- this.mPrimaryArtifact = pPrimaryArtifact;
- }
-
- /**
- * get the the internal value for the projectHelper property.
- *
- * The projectHelper property
- * @return Returns the internal value for the projectHelper property.
- */
- protected MavenProjectHelper getProjectHelper()
- {
- return this.mProjectHelper;
- }
-
- /**
- * set the internal value for the projectHelper property
- * @param pProjectHelper The projectHelper to set.
- */
- protected void setProjectHelper(MavenProjectHelper pProjectHelper)
- {
- this.mProjectHelper = pProjectHelper;
- }
-
- /**
- * Overload this to produce a test-war, for example.
- */
- protected String getClassifier()
- {
- return mClassifier;
- }
-
- /**
- * set the internal value for the classifier property
- * @param pClassifier The classifier to set.
- */
- protected void setClassifier(String pClassifier)
- {
- this.mClassifier = pClassifier;
- }
-
- /* ====================================================================== */
- // public methods
- /* ====================================================================== */
-
- /**
- * Executes the WarMojo on the current project.
- *
- * @throws MojoExecutionException if an error occured while building the webapp
- */
- public void execute()
- throws MojoExecutionException,
- MojoFailureException
- {
-
- File vAmpFile = AmpMojo.getAmpFile(new File( getOutputDirectory() ), getAmpName(), getClassifier());
-
- try
- {
- this.performPackaging(vAmpFile);
- }
- catch (Exception eAssemblyFailure)
- {
- /* behavior is the same for the following exceptions:
- * DependencyResolutionRequiredException
- * ManifestException
- * IOException
- * ArchiverException
- */
- throw new MojoExecutionException( "Error assembling AMP: " + eAssemblyFailure.getMessage(), eAssemblyFailure );
- }
- }
-
- /* ====================================================================== */
- // protected methods
- /* ====================================================================== */
-
-
- /**
- * composes the full file name for the AMP and gets a file handle for that file
- * TODO: what happens when nulls are passed in
- * TODO: what does a null response mean?
- * @param pBasedir Base directory for AMP
- * @param pFinalName Final Name of AMP
- * @param pClassifier TODO: fill this in
- */
- protected static File getAmpFile( File pBasedir, String pFinalName, String pClassifier )
- {
- String vClassifier = pClassifier;
-
- if (vClassifier == null)
- {
- vClassifier = "";
- }
- else if (vClassifier.trim().length() > 0 && !vClassifier.startsWith( "-" ) )
- {
- vClassifier = "-" + vClassifier;
- }
-
- return new File(pBasedir, pFinalName + vClassifier + ".amp" );
- }
-
-
- /**
- * Generates the webapp according to the mode attribute.
- *
- * @param pAmpFile the target AMP file
- * @throws IOException
- * @throws ArchiverException
- * @throws ManifestException
- * @throws DependencyResolutionRequiredException
- *
- */
- protected void performPackaging(File pAmpFile)
- throws IOException,
- ArchiverException,
- ManifestException,
- DependencyResolutionRequiredException,
- MojoExecutionException, MojoFailureException
- {
- getLog().info( "Packaging Alfresco AMP (" + this.getAmpName() + ")" );
-
-
- this.buildExplodedAmp(this.getAmpDirectory());
-
- /* create and setup an archiver */
- MavenArchiver vArchiver = new MavenArchiver();
- vArchiver.setArchiver(this.getAmpArchiver());
- vArchiver.setOutputFile(pAmpFile);
-
- /* setup amp Archiver */
- this.getAmpArchiver().addDirectory(this.getAmpDirectory(), null, null);
-
- // create archive
- vArchiver.createArchive(this.getProject(), archive );
-
- String vClassifier = this.getClassifier();
-
- if ( vClassifier != null )
- {
- this.getProjectHelper().attachArtifact( this.getProject(), "amp", vClassifier, pAmpFile );
- }
- else
- {
- Artifact vArtifact = this.getProject().getArtifact();
-
- if ( this.isPrimaryArtifact() )
- {
- vArtifact.setFile(pAmpFile);
- }
- else if(vArtifact.getFile() == null || vArtifact.getFile().isDirectory() )
- {
- vArtifact.setFile(pAmpFile);
- }
- }
- }
-
-
- /* ====================================================================== */
- // member fields
- /* ====================================================================== */
-
- /**
- * The directory for the generated AMP.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- */
- private String mOutputDirectory;
-
- /**
- * The name of the generated AMP.
- *
- * @parameter expression="${project.build.finalName}"
- * @required
- */
- private String mAmpName;
-
- /**
- * Classifier to add to the artifact generated. If given, the artifact will be an attachment instead.
- *
- * @parameter
- */
- private String mClassifier;
-
- /**
- * The AMP archiver.
- * @component role="org.codehaus.plexus.archiver.Archiver" role-hint="amp"
- * @required
- */
- private AmpArchiver mAmpArchiver;
-
-
- /**
- * @component
- */
- private MavenProjectHelper mProjectHelper;
-}
-
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/Overlay.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/Overlay.java
deleted file mode 100644
index 84d4d708..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/Overlay.java
+++ /dev/null
@@ -1,309 +0,0 @@
-package org.alfresco.maven.plugin.amp;
-
-/*
- * 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.
- */
-
-import org.apache.maven.artifact.Artifact;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * An overlay is a skeleton war added to another war project in order to inject a
- * functionnality, resources or any other shared component.
- *
- * Note that a particlar war dependency can be added multiple times as an overlay
- * with different includes/excludes filter; this allows building a fine grained
- * overwriting policy.
- *
- * The current project can also be described as an overlay and could not be specified
- * twice. An overlay with no groupId and no artifactId is detected as defining the
- * current project.
- *
- * @author Stephane Nicoll
- */
-public class Overlay
-{
-
- public static final String[] DEFAULT_INCLUDES = new String[]{"**/**"};
-
- public static final String[] DEFAULT_EXCLUDES = new String[]{"META-INF/MANIFEST.MF"};
-
- private static Overlay currentProjectInstance;
-
- private String id;
-
- private String groupId;
-
- private String artifactId;
-
- private String classifier = null;
-
- private String[] includes = DEFAULT_INCLUDES;
-
- private String[] excludes = DEFAULT_EXCLUDES;
-
- private boolean filtered = false;
-
- private boolean skip = false;
-
- private Artifact artifact;
-
- private String targetPath;
-
- /** default overlay type is war */
- private String type = "amp";
-
- public Overlay()
- {
- super();
- }
-
-
- public Overlay( String groupId, String artifactId )
- {
- this();
- this.groupId = groupId;
- this.artifactId = artifactId;
- }
-
- /**
- * Specify whether this overlay represents the current project or not.
- *
- * @return true if the overlay represents the current project, false otherwise
- */
- public boolean isCurrentProject()
- {
- return ( groupId == null && artifactId == null );
- }
-
- /**
- * Creates an overlay of the current project.
- *
- * @return the current project as an overlay
- */
- public static Overlay currentProjectInstance()
- {
- if ( currentProjectInstance == null )
- {
- currentProjectInstance = new Overlay();
- currentProjectInstance.setId( "currentBuild" );
- }
- return currentProjectInstance;
- }
-
- // Getters and Setters
-
- public String getId()
- {
- if ( id == null )
- {
- final StringBuffer sb = new StringBuffer();
- sb.append( getGroupId() ).append( ":" ).append( getArtifactId() );
- if ( getClassifier() != null )
- {
- sb.append( ":" ).append( getClassifier() );
- }
- id = sb.toString();
- }
- return id;
- }
-
- public void setId( String id )
- {
- this.id = id;
- }
-
- public String getGroupId()
- {
- return groupId;
- }
-
- public void setGroupId( String groupId )
- {
- this.groupId = groupId;
- }
-
- public String getArtifactId()
- {
- return artifactId;
- }
-
- public void setArtifactId( String artifactId )
- {
- this.artifactId = artifactId;
- }
-
- public String getClassifier()
- {
- return classifier;
- }
-
- public void setClassifier( String classifier )
- {
- this.classifier = classifier;
- }
-
- public String[] getIncludes()
- {
- return includes;
- }
-
- public void setIncludes( String includes )
- {
- this.includes = parse( includes );
- }
-
- public void setIncludes( String[] includes )
- {
- this.includes = includes;
- }
-
- public String[] getExcludes()
- {
- return excludes;
- }
-
- public void setExcludes( String excludes )
- {
- this.excludes = parse( excludes );
- }
-
- public void setExcludes( String[] excludes )
- {
- this.excludes = excludes;
- }
-
- public boolean isFiltered()
- {
- return filtered;
- }
-
- public void setFiltered( boolean filtered )
- {
- this.filtered = filtered;
- }
-
- public boolean shouldSkip()
- {
- return skip;
- }
-
- public void setSkip( boolean skip )
- {
- this.skip = skip;
- }
-
- public Artifact getArtifact()
- {
- return artifact;
- }
-
- public void setArtifact( Artifact artifact )
- {
- this.artifact = artifact;
- }
-
- public String getTargetPath()
- {
- return targetPath;
- }
-
-
- public void setTargetPath( String targetPath )
- {
- this.targetPath = targetPath;
- }
-
- public String getType()
- {
- return type;
- }
-
-
- public void setType( String type )
- {
- this.type = type;
- }
-
- public String toString()
- {
- return " id " + getId();
- }
-
-
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
- if ( o == null || getClass() != o.getClass() )
- {
- return false;
- }
-
- Overlay overlay = (Overlay) o;
-
- if ( excludes != null ? !Arrays.equals( excludes, overlay.excludes ) : overlay.excludes != null )
- {
- return false;
- }
- if ( getId() != null ? !getId().equals( overlay.getId() ) : overlay.getId() != null )
- {
- return false;
- }
- if ( includes != null ? !Arrays.equals( includes, overlay.includes ) : overlay.includes != null )
- {
- return false;
- }
-
- return true;
- }
-
- public int hashCode()
- {
- int result;
- result = ( getId() != null ? getId().hashCode() : 0 );
- result = 31 * result + ( includes != null ? includes.hashCode() : 0 );
- result = 31 * result + ( excludes != null ? excludes.hashCode() : 0 );
- return result;
- }
-
- private String[] parse( String s )
- {
- final List result = new ArrayList();
- if ( s == null )
- {
- return (String[]) result.toArray( new String[result.size()] );
- }
- else
- {
- String[] tokens = s.split( "," );
- for ( int i = 0; i < tokens.length; i++ )
- {
- String token = tokens[i];
- result.add( token.trim() );
- }
- return (String[]) result.toArray( new String[result.size()] );
- }
- }
-
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/overlay/DefaultOverlay.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/overlay/DefaultOverlay.java
deleted file mode 100644
index fa372807..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/overlay/DefaultOverlay.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.alfresco.maven.plugin.amp.overlay;
-
-/*
- * 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.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.alfresco.maven.plugin.amp.Overlay;
-
-/**
- * A default overlay implementation based on an {@link Artifact}.
- *
- * @author Stephane Nicoll
- */
-public class DefaultOverlay
- extends Overlay
-{
-
- /**
- * Creates an overlay for the specified artifact.
- *
- * @param a the artifact
- */
- public DefaultOverlay( Artifact a )
- {
- super();
- setGroupId( a.getGroupId() );
- setArtifactId( a.getArtifactId() );
- setClassifier( a.getClassifier() );
- setArtifact( a );
- setType( a.getType() );
- }
-
- /**
- * Creates an overlay for the specified artifact.
- *
- * @param a the artifact
- * @param includes the includes to use
- * @param excludes the excludes to use
- */
- public DefaultOverlay( Artifact a, String includes, String excludes )
- {
- this( a );
- setIncludes( includes );
- setExcludes( excludes );
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/overlay/InvalidOverlayConfigurationException.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/overlay/InvalidOverlayConfigurationException.java
deleted file mode 100644
index 6f03e751..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/overlay/InvalidOverlayConfigurationException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.alfresco.maven.plugin.amp.overlay;
-
-import org.apache.maven.plugin.MojoExecutionException;
-
-/*
- * 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.
- */
-
-/**
- * Thrown if the overlay configuration is invalid.
- *
- * @author Stephane Nicoll
- */
-public class InvalidOverlayConfigurationException
- extends MojoExecutionException
-{
-
- private static final long serialVersionUID = 1L;
-
- public InvalidOverlayConfigurationException( String string )
- {
- super( string );
- }
-
- public InvalidOverlayConfigurationException( String string, Throwable throwable )
- {
- super( string, throwable );
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/overlay/OverlayManager.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/overlay/OverlayManager.java
deleted file mode 100644
index 4a00119d..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/overlay/OverlayManager.java
+++ /dev/null
@@ -1,257 +0,0 @@
-package org.alfresco.maven.plugin.amp.overlay;
-
-/*
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
-import org.alfresco.maven.plugin.amp.Overlay;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * Manages the overlays.
- *
- *
- * @author Stephane Nicoll
- */
-public class OverlayManager
-{
- private final List overlays;
-
- private final MavenProject project;
-
- private final List artifactsOverlays;
-
- /**
- * Creates a manager with the specified overlays.
- *
- * Note that the list is potentially updated by the
- * manager so a new list is created based on the overlays.
- *
- * @param overlays the overlays
- * @param project the maven project
- * @param defaultIncludes the default includes to use
- * @param defaultExcludes the default excludes to use
- * @throws InvalidOverlayConfigurationException
- * if the config is invalid
- */
- public OverlayManager( List overlays, MavenProject project, String defaultIncludes, String defaultExcludes )
- throws InvalidOverlayConfigurationException
- {
- this.overlays = new ArrayList();
- if ( overlays != null )
- {
- this.overlays.addAll( overlays );
- }
- this.project = project;
-
- this.artifactsOverlays = getOverlaysAsArtifacts();
-
- // Initialize
- initialize( defaultIncludes, defaultExcludes );
-
- }
-
-
- /**
- * Returns the resolved overlays.
- *
- * @return the overlays
- */
- public List getOverlays()
- {
- return overlays;
- }
-
- /**
- * Returns the id of the resolved overlays.
- *
- * @return the overlay ids
- */
- public List getOverlayIds()
- {
- final Iterator it = overlays.iterator();
- final List result = new ArrayList();
- while ( it.hasNext() )
- {
- Overlay overlay = (Overlay) it.next();
- result.add( overlay.getId() );
- }
- return result;
-
- }
-
- /**
- * Intializes the manager and validates the overlays configuration.
- *
- * @param defaultIncludes the default includes to use
- * @param defaultExcludes the default excludes to use
- * @throws InvalidOverlayConfigurationException
- * if the configuration is invalid
- */
- void initialize( String defaultIncludes, String defaultExcludes )
- throws InvalidOverlayConfigurationException
- {
-
- // Build the list of configured artifacts and makes sure that each overlay
- // refer to a valid artifact
- final List configuredWarArtifacts = new ArrayList();
- final ListIterator it = overlays.listIterator();
- while ( it.hasNext() )
- {
- Overlay overlay = (Overlay) it.next();
- if ( overlay == null )
- {
- throw new InvalidOverlayConfigurationException( "overlay could not be null." );
- }
- // If it's the current project, return the project instance
- if ( overlay.isCurrentProject() )
- {
- overlay = Overlay.currentProjectInstance();
- it.set( overlay );
- }
- // default includes/excludes - only if the overlay uses the default settings
- if ( Overlay.DEFAULT_INCLUDES.equals( overlay.getIncludes() ) &&
- Overlay.DEFAULT_EXCLUDES.equals( overlay.getExcludes() ) )
- {
- overlay.setIncludes( defaultIncludes );
- overlay.setExcludes( defaultExcludes );
- }
-
- final Artifact artifact = getAssociatedArtifact( overlay );
- if ( artifact != null )
- {
- configuredWarArtifacts.add( artifact );
- overlay.setArtifact( artifact );
- }
- }
-
- // Build the list of missing overlays
- final Iterator it2 = artifactsOverlays.iterator();
- while ( it2.hasNext() )
- {
- Artifact artifact = (Artifact) it2.next();
- if ( !configuredWarArtifacts.contains( artifact ) )
- {
- // Add a default overlay for the given artifact which will be applied after
- // the ones that have been configured
- overlays.add( new DefaultOverlay( artifact, defaultIncludes, defaultExcludes ) );
- }
- }
-
- // Final validation, make sure that the current project is in there. Otherwise add it first
- final Iterator it3 = overlays.iterator();
- while ( it3.hasNext() )
- {
- Overlay overlay = (Overlay) it3.next();
- if ( overlay.equals( Overlay.currentProjectInstance() ) )
- {
- return;
- }
- }
- overlays.add( 0, Overlay.currentProjectInstance() );
- }
-
- /**
- * Returns the Artifact associated to the specified overlay.
- *
- * If the overlay defines the current project, null is
- * returned. If no artifact could not be found for the overlay
- * a InvalidOverlayConfigurationException is thrown.
- *
- * @param overlay an overlay
- * @return the artifact associated to the overlay
- * @throws org.apache.maven.plugin.war.overlay.InvalidOverlayConfigurationException
- * if the overlay does not have an associated artifact
- */
- Artifact getAssociatedArtifact( final Overlay overlay )
- throws InvalidOverlayConfigurationException
- {
- if ( overlay.isCurrentProject() )
- {
- return null;
- }
-
- for ( Iterator iterator = artifactsOverlays.iterator(); iterator.hasNext(); )
- {
- // Handle classifier dependencies properly (clash management)
- Artifact artifact = (Artifact) iterator.next();
- if ( compareOverlayWithArtifact(overlay, artifact) )
- {
- return artifact;
- }
- }
-
- // maybe its a project dependencies zip or an other type
- Set projectArtifacts = this.project.getDependencyArtifacts();
- if (projectArtifacts != null)
- {
- for( Iterator iterator = projectArtifacts.iterator();iterator.hasNext();)
- {
- Artifact artifact = (Artifact) iterator.next();
- if ( compareOverlayWithArtifact(overlay, artifact) )
- {
- return artifact;
- }
- }
- }
- throw new InvalidOverlayConfigurationException(
- "overlay[" + overlay + "] is not a dependency of the project." );
-
- }
-
- private boolean compareOverlayWithArtifact(Overlay overlay, Artifact artifact)
- {
- return ( StringUtils.equals( overlay.getGroupId(), artifact.getGroupId() )
- && StringUtils.equals( overlay.getArtifactId(), artifact.getArtifactId() )
- && StringUtils.equals( overlay.getType(), artifact.getType() ) && ( overlay.getClassifier() == null || ( StringUtils
- .equals( overlay.getClassifier(), artifact.getClassifier() ) ) ) );
- }
-
- /**
- * Returns a list of war {@link org.apache.maven.artifact.Artifact} describing
- * the overlays of the current project.
- *
- * @return the overlays as artifacts objects
- */
- private List getOverlaysAsArtifacts()
- {
- ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME );
- final Set artifacts = project.getArtifacts();
- final Iterator it = artifacts.iterator();
-
- final List result = new ArrayList();
- while ( it.hasNext() )
- {
- Artifact artifact = (Artifact) it.next();
- if ( !artifact.isOptional() && filter.include( artifact ) && ( "amp".equals( artifact.getType() ) ) )
- {
- result.add( artifact );
- }
- }
- return result;
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AbstractAmpPackagingTask.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AbstractAmpPackagingTask.java
deleted file mode 100644
index 6293a8f6..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AbstractAmpPackagingTask.java
+++ /dev/null
@@ -1,404 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-/*
- * 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.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.alfresco.maven.plugin.amp.AbstractAmpMojo;
-
-import org.alfresco.maven.plugin.amp.util.MappingUtils;
-import org.alfresco.maven.plugin.amp.util.PathSet;
-import org.alfresco.maven.plugin.amp.util.AmpStructure;
-
-
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.UnArchiver;
-import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.InterpolationFilterReader;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * @author Stephane Nicoll
- */
-public abstract class AbstractAmpPackagingTask
- implements AmpPackagingTask
-{
- public static final String[] DEFAULT_INCLUDES = {"**/**"};
-
-
- public static final String META_INF_PATH = "META-INF";
-
-
- /**
- * Copies the files if possible with an optional target prefix.
- *
- * Copy uses a first-win strategy: files that have already been copied by previous
- * tasks are ignored. This method makes sure to update the list of protected files
- * which gives the list of files that have already been copied.
- *
- * If the structure of the source directory is not the same as the root of the
- * webapp, use the targetPrefix parameter to specify in which particular
- * directory the files should be copied. Use null to copy the files with
- * the same structure
- *
- * @param sourceId the source id
- * @param context the context to use
- * @param sourceBaseDir the base directory from which the sourceFilesSet will be copied
- * @param sourceFilesSet the files to be copied
- * @param targetPrefix the prefix to add to the target file name
- * @throws IOException if an error occured while copying the files
- */
- protected void copyFiles( String sourceId, AmpPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet,
- String targetPrefix )
- throws IOException
- {
- for ( Iterator iter = sourceFilesSet.iterator(); iter.hasNext(); )
- {
- final String fileToCopyName = (String) iter.next();
- final File sourceFile = new File( sourceBaseDir, fileToCopyName );
-
- String destinationFileName;
- if ( targetPrefix == null )
- {
- destinationFileName = fileToCopyName;
- }
- else
- {
- destinationFileName = targetPrefix + fileToCopyName;
- }
-
- copyFile( sourceId, context, sourceFile, destinationFileName );
- }
- }
-
- /**
- * Copies the files if possible as is.
- *
- * Copy uses a first-win strategy: files that have already been copied by previous
- * tasks are ignored. This method makes sure to update the list of protected files
- * which gives the list of files that have already been copied.
- *
- * @param sourceId the source id
- * @param context the context to use
- * @param sourceBaseDir the base directory from which the sourceFilesSet will be copied
- * @param sourceFilesSet the files to be copied
- * @throws IOException if an error occured while copying the files
- */
- protected void copyFiles( String sourceId, AmpPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet )
- throws IOException
- {
- copyFiles( sourceId, context, sourceBaseDir, sourceFilesSet, null );
- }
-
- /**
- * Copy the specified file if the target location has not yet already been used.
- *
- * The targetFileName is the relative path according to the root of
- * the generated web application.
- *
- * @param sourceId the source id
- * @param context the context to use
- * @param file the file to copy
- * @param targetFilename the relative path according to the root of the webapp
- * @throws IOException if an error occured while copying
- */
- protected void copyFile( String sourceId, final AmpPackagingContext context, final File file,
- String targetFilename )
- throws IOException
- {
- final File targetFile = new File( context.getAmpDirectory(), targetFilename );
- context.getAmpStructure().registerFile( sourceId, targetFilename, new AmpStructure.RegistrationCallback()
- {
- public void registered( String ownerId, String targetFilename )
- throws IOException
- {
- copyFile( context, file, targetFile, targetFilename, false );
- }
-
- public void alreadyRegistered( String ownerId, String targetFilename )
- throws IOException
- {
- copyFile( context, file, targetFile, targetFilename, true );
- }
-
- public void refused( String ownerId, String targetFilename, String actualOwnerId )
- throws IOException
- {
- context.getLog().debug( " - " + targetFilename + " wasn't copied because it has " +
- "already been packaged for overlay[" + actualOwnerId + "]." );
- }
-
- public void superseded( String ownerId, String targetFilename, String deprecatedOwnerId )
- throws IOException
- {
- context.getLog().info( "File[" + targetFilename + "] belonged to overlay[" + deprecatedOwnerId +
- "] so it will be overwritten." );
- copyFile( context, file, targetFile, targetFilename, false );
- }
-
- public void supersededUnknownOwner( String ownerId, String targetFilename, String unknownOwnerId )
- throws IOException
- {
- context.getLog().warn( "File[" + targetFilename + "] belonged to overlay[" + unknownOwnerId +
- "] which does not exist anymore in the current project. It is recommended to invoke " +
- "clean if the dependencies of the project changed." );
- copyFile( context, file, targetFile, targetFilename, false );
- }
- } );
- }
-
- /**
- * Copy the specified file if the target location has not yet already been
- * used and filter its content with the configureed filter properties.
- *
- * The targetFileName is the relative path according to the root of
- * the generated web application.
- *
- * @param sourceId the source id
- * @param context the context to use
- * @param file the file to copy
- * @param targetFilename the relative path according to the root of the webapp
- * @return true if the file has been copied, false otherwise
- * @throws IOException if an error occured while copying
- * @throws MojoExecutionException if an error occured while retrieving the filter properties
- */
- protected boolean copyFilteredFile( String sourceId, AmpPackagingContext context, File file, String targetFilename )
- throws IOException, MojoExecutionException
- {
-
- if ( context.getAmpStructure().registerFile( sourceId, targetFilename ) )
- {
- final File targetFile = new File( context.getAmpDirectory(), targetFilename );
- // buffer so it isn't reading a byte at a time!
- Reader fileReader = null;
- Writer fileWriter = null;
- try
- {
- // fix for MWAR-36, ensures that the parent dir are created first
- targetFile.getParentFile().mkdirs();
-
- fileReader = new BufferedReader( new FileReader( file ) );
- fileWriter = new FileWriter( targetFile );
-
- Reader reader = fileReader;
- for ( int i = 0; i < getFilterWrappers().length; i++ )
- {
- FilterWrapper wrapper = getFilterWrappers()[i];
- reader = wrapper.getReader( reader, context.getFilterProperties() );
- }
-
- IOUtil.copy( reader, fileWriter );
- }
- finally
- {
- IOUtil.close( fileReader );
- IOUtil.close( fileWriter );
- }
- // Add the file to the protected list
- context.getLog().debug( " + " + targetFilename + " has been copied." );
- return true;
- }
- else
- {
- context.getLog().debug( " - " + targetFilename + " wasn't copied because it has already been packaged." );
- return false;
- }
- }
-
-
- /**
- * Unpacks the specified file to the specified directory.
- *
- * @param context the packaging context
- * @param file the file to unpack
- * @param unpackDirectory the directory to use for th unpacked file
- * @throws MojoExecutionException if an error occured while unpacking the file
- */
- protected void doUnpack( AmpPackagingContext context, File file, File unpackDirectory )
- throws MojoExecutionException
- {
- String archiveExt = FileUtils.getExtension( file.getAbsolutePath() ).toLowerCase();
-
- // Uncompressing an AMP into another AMP does not require any
- // special treatment so we just use a zip unarchiver
- if ("amp".equals(archiveExt))
- {
- archiveExt = "zip";
- }
-
- try
- {
- UnArchiver unArchiver = context.getArchiverManager().getUnArchiver( archiveExt );
- unArchiver.setSourceFile( file );
- unArchiver.setDestDirectory( unpackDirectory );
- unArchiver.setOverwrite( true );
- unArchiver.extract();
- }
- catch ( ArchiverException e )
- {
- throw new MojoExecutionException( "Error unpacking file[" + file.getAbsolutePath() + "]" + "to[" +
- unpackDirectory.getAbsolutePath() + "]", e );
- }
- catch ( NoSuchArchiverException e )
- {
- context.getLog().warn( "Skip unpacking dependency file[" + file.getAbsolutePath() +
- " with unknown extension[" + archiveExt + "]" );
- }
- }
-
- /**
- * Copy file from source to destination. The directories up to destination
- * will be created if they don't already exist. if the onlyIfModified flag
- * is false, destination will be overwritten if it already exists. If the
- * flag is true destination will be overwritten if it's not up to date.
- *
- *
- * @param context the packaging context
- * @param source an existing non-directory File to copy bytes from
- * @param destination a non-directory File to write bytes to (possibly overwriting).
- * @param targetFilename the relative path of the file from the webapp root directory
- * @param onlyIfModified if true, copy the file only if the source has changed, always copy otherwise
- * @return true if the file has been copied/updated, false otherwise
- * @throws IOException if source does not exist, destination cannot
- * be written to, or an IO error occurs during copying
- */
- protected boolean copyFile( AmpPackagingContext context, File source, File destination, String targetFilename,
- boolean onlyIfModified )
- throws IOException
- {
- if ( onlyIfModified && destination.lastModified() >= source.lastModified() )
- {
- context.getLog().debug( " * " + targetFilename + " is up to date." );
- return false;
- }
- else
- {
- FileUtils.copyFile( source.getCanonicalFile(), destination );
- // preserve timestamp
- destination.setLastModified( source.lastModified() );
- context.getLog().debug( " + " + targetFilename + " has been copied." );
- return true;
- }
- }
-
- /**
- * Returns the file to copy. If the includes are null or empty, the
- * default includes are used.
- *
- * @param baseDir the base directory to start from
- * @param includes the includes
- * @param excludes the excludes
- * @return the files to copy
- */
- protected PathSet getFilesToIncludes( File baseDir, String[] includes, String[] excludes )
- {
- final DirectoryScanner scanner = new DirectoryScanner();
- scanner.setBasedir( baseDir );
-
- if ( excludes != null )
- {
- scanner.setExcludes( excludes );
- }
- scanner.addDefaultExcludes();
-
- if ( includes != null && includes.length > 0 )
- {
- scanner.setIncludes( includes );
- }
- else
- {
- scanner.setIncludes( DEFAULT_INCLUDES );
- }
-
- scanner.scan();
-
- return new PathSet( scanner.getIncludedFiles() );
-
- }
-
- /**
- * Returns the final name of the specified artifact.
- *
- * If the outputFileNameMapping is set, it is used, otherwise
- * the standard naming scheme is used.
- *
- * @param context the packaging context
- * @param artifact the artifact
- * @return the converted filename of the artifact
- */
- protected String getArtifactFinalName( AmpPackagingContext context, Artifact artifact )
- {
- if ( context.getOutputFileNameMapping() != null )
- {
- return MappingUtils.evaluateFileNameMapping( context.getOutputFileNameMapping(), artifact );
- }
-
- String classifier = artifact.getClassifier();
- if ( ( classifier != null ) && !( "".equals( classifier.trim() ) ) )
- {
- return MappingUtils.evaluateFileNameMapping( AbstractAmpMojo.DEFAULT_FILE_NAME_MAPPING_CLASSIFIER,
- artifact );
- }
- else
- {
- return MappingUtils.evaluateFileNameMapping( AbstractAmpMojo.DEFAULT_FILE_NAME_MAPPING, artifact );
- }
-
- }
-
- private FilterWrapper[] getFilterWrappers()
- {
- return new FilterWrapper[]{
- // support ${token}
- new FilterWrapper()
- {
- public Reader getReader( Reader fileReader, Map filterProperties )
- {
- return new InterpolationFilterReader( fileReader, filterProperties, "${", "}" );
- }
- },
- // support @token@
- new FilterWrapper()
- {
- public Reader getReader( Reader fileReader, Map filterProperties )
- {
- return new InterpolationFilterReader( fileReader, filterProperties, "@", "@" );
- }
- }};
- }
-
- private interface FilterWrapper
- {
- Reader getReader( Reader fileReader, Map filterProperties );
- }
-
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingContext.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingContext.java
deleted file mode 100644
index cee7bca2..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingContext.java
+++ /dev/null
@@ -1,189 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-/*
- * 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.
- */
-
-import org.apache.maven.archiver.MavenArchiveConfiguration;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.logging.Log;
-import org.alfresco.maven.plugin.amp.util.AmpStructure;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.archiver.jar.JarArchiver;
-import org.codehaus.plexus.archiver.manager.ArchiverManager;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The packaging context of the AMP
- *
- * @author Stephane Nicoll - Modified version for AMP
- *
- */
-public interface AmpPackagingContext
-{
- /**
- * Returns the maven project.
- *
- * @return the project
- */
- MavenProject getProject();
-
- /**
- * Returns the webapp directory. Packaging tasks should use this
- * directory to generate the webapp.
- *
- * @return the webapp directory
- */
- File getAmpDirectory();
-
- /**
- * Returns the AMP classes + resources folder
- *
- * @return the webapp source directory
- */
- File getAmpConfigDirectory();
-
-
- /**
- * Returns the AMP web directory.
- *
- * @return the webapp source directory
- */
- File getAmpWebDirectory();
-
- /**
- * Returns the webapp source includes.
- *
- * @return the webapp source includes
- */
- String[] getAmpJarIncludes();
-
- /**
- * Returns the webapp source excludes.
- *
- * @return the webapp source excludes
- */
- String[] getAmpJarExcludes();
-
-
- /**
- * Returns the AMP web/ includes.
- *
- * @return the AMP web/ includes
- */
- String[] getAmpWebIncludes();
-
- /**
- * Returns the AMP web/ excludes.
- *
- * @return the AMP web/ excludes
- */
- String[] getAmpWebExcludes();
-
-
- /**
- * Returns the directory holding generated classes to be packed in the jar - By default is the same of the AMP configuration
- *
- * @return the classes directory
- */
- File getClassesDirectory();
-
-
- /**
- * Returns the logger to use to output logging event.
- *
- * @return the logger
- */
- Log getLog();
-
- /**
- * Returns the directory to unpack dependent WARs into if needed.
- *
- * @return the overlays work directory
- */
- File getOverlaysWorkDirectory();
-
- /**
- * Returns the archiver manager to use.
- *
- * @return the archiver manager
- */
- ArchiverManager getArchiverManager();
-
- /**
- * The maven archive configuration to use.
- *
- * @return the maven archive configuration
- */
- MavenArchiveConfiguration getArchive();
-
- /**
- * Returns the Jar archiver needed for archiving classes directory into
- * jar file under WEB-INF/lib.
- *
- * @return the jar archiver to user
- */
- JarArchiver getJarArchiver();
-
- /**
- * Returns the output file name mapping to use, if any. Returns null
- * if no file name mapping is set.
- *
- * @return the output file name mapping or null
- */
- String getOutputFileNameMapping();
-
- /**
- * Returns the list of filter files to use.
- *
- * @return a list of filter files
- */
- List getFilters();
-
- /**
- * Returns the filter properties to use to filter resources.
- *
- * TODO: this needs to be refactored to use the resource plugin somehow.
- *
- * @return a map of filter properties
- * @throws MojoExecutionException if an error occured while reading a filter file
- */
- Map getFilterProperties()
- throws MojoExecutionException;
-
- /**
- * Returns the {@link AmpStructure}.
- *
- * @return the webapp structure
- */
- AmpStructure getAmpStructure();
-
- /**
- * Returns the list of registered overlays for this session. This list might
- * differ from the one returned by the cache; in this case, it means that the
- * project's configuration has changed. The plugin will handle thos cases nicely
- * but it would be better in general to invoke the clean goal.
- *
- * @return the list of registered overlays, including the current project
- */
- List getOwnerIds();
-
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingTask.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingTask.java
deleted file mode 100644
index bc9b81ac..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPackagingTask.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-/*
- * 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.
- */
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * The base packaging task.
- *
- * @author Stephane Nicoll
- */
-public interface AmpPackagingTask
-{
-
- /**
- * Performs the packaging for the specified task.
- *
- * The task is responsible to update the packaging context, namely
- * with the files that have been copied.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if an error occured
- * @throws MojoFailureException if the project configuration is invalid
- */
- void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException, MojoFailureException;
-
-
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPostPackagingTask.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPostPackagingTask.java
deleted file mode 100644
index a37edcf3..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpPostPackagingTask.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * Defines tasks that should be performed after the packaging.
- *
- * @author Stephane Nicoll
- */
-public interface AmpPostPackagingTask
-{
-
- /**
- * Executes the post packaging task.
- *
- * The packaging context hold all information regarding the webapp that
- * has been packaged.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if an error occured
- * @throws MojoFailureException if a falure occured
- */
- void performPostPackaging( AmpPackagingContext context )
- throws MojoExecutionException, MojoFailureException;
-
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java
deleted file mode 100644
index 24f6863d..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java
+++ /dev/null
@@ -1,388 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.alfresco.maven.plugin.amp.Overlay;
-import org.alfresco.maven.plugin.amp.util.PathSet;
-
-import org.apache.maven.model.Resource;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Handles the project own resources, that is:
- *
The list of web resources, if any
- *
The content of the webapp directory if it exists
- *
The custom deployment descriptor(s), if any
- *
The content of the classes directory if it exists
- *
The dependencies of the project
- *
- *
- * @author Stephane Nicoll
- */
-public class AmpProjectPackagingTask
- extends AbstractAmpPackagingTask
-{
- private static final String MODULE_PROPERTIES = "module.properties";
- private static final String FILE_MAPPING = "file-mapping.properties";
-
- private static final String WEB_PATH = "web/";
-
- private static final String CONFIG_PATH = "config/";
-
- private static final String FILE_MAPPING_CONTENT = "# Add mapping for /WEB-INF/, since MMT doesn't support it by default\n" +
- "/web/WEB-INF=/WEB-INF\n";
-
-
- private Resource[] webResources = new Resource[0];
-
- private final File moduleProperties;
-
- private final File fileMappingProperties;
-
- private final String id;
-
-
- public AmpProjectPackagingTask( Resource[] webResources, File moduleProperties, File fileMappingProperties)
- {
- if ( webResources != null )
- {
- this.webResources = webResources;
- }
- this.moduleProperties = moduleProperties;
- this.fileMappingProperties = fileMappingProperties;
- this.id = Overlay.currentProjectInstance().getId();
- }
-
- public void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException, MojoFailureException
- {
-
- context.getLog().info( "Processing amp project" );
-
- File metainfDir = new File( context.getAmpDirectory(), META_INF_PATH );
-
- metainfDir.mkdirs();
-
- handleArtifacts( context );
-
- handleWebResources( context );
-
- handleClassesDirectory( context );
-
- handeAmpConfigDirectory( context );
-
- handeWebAppSourceDirectory( context );
-
- synthesiseFileMapping(context);
-
-
- // Notice: this will work only in case we are copying only this AMP or this AMP is
- // set as last overlay of the maven-amp-plugin
- handleDeploymentDescriptors(context);
-
- }
-
-
- /**
- * Handles the web resources.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if a resource could not be copied
- */
- protected void handleWebResources( AmpPackagingContext context )
- throws MojoExecutionException
- {
- for ( int i = 0; i < webResources.length; i++ )
- {
- Resource resource = webResources[i];
- if ( !( new File( resource.getDirectory() ) ).isAbsolute() )
- {
- resource.setDirectory( context.getProject().getBasedir() + File.separator + resource.getDirectory() );
- }
-
- // Make sure that the resource directory is not the same as the webappDirectory
- if ( !resource.getDirectory().equals( context.getAmpDirectory().getPath() ) )
- {
-
- try
- {
- copyResources( context, resource );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not copy resource[" + resource.getDirectory() + "]", e );
- }
- }
- }
- }
-
- /**
- * Handles the webapp sources.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if the sources could not be copied
- */
- protected void handeWebAppSourceDirectory( AmpPackagingContext context )
- throws MojoExecutionException
- {
- if ( !context.getAmpWebDirectory().exists() )
- {
- context.getLog().debug( "AMP sources directory does not exist - skipping." );
- }
- else
- if ( !context.getAmpWebDirectory().getAbsolutePath().equals( context.getAmpDirectory().getPath() ) )
- {
- final PathSet sources = getFilesToIncludes( context.getAmpWebDirectory(),
- context.getAmpWebIncludes(),
- context.getAmpWebExcludes() );
-
- try
- {
- context.getLog().info("Copying AMP web data into " + WEB_PATH);
- copyFiles( id, context, context.getAmpWebDirectory(), sources, WEB_PATH );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException(
- "Could not copy AMP sources[" + context.getAmpDirectory().getAbsolutePath() + "]", e );
- }
- }
- }
-
-
- /**
- * Synthesizes (creates) a standard file-mapping.properties file so that resources in webapp/WEB-INF
- * get written to the correct location by the MMT.
- *
- * @param context The packaging context
- * @throws MojoExecutionException if the file could not be created
- */
- protected void synthesiseFileMapping(final AmpPackagingContext context)
- throws MojoExecutionException
- {
- try
- {
- if ( fileMappingProperties != null && StringUtils.isNotEmpty( fileMappingProperties.getName() ) )
- {
- if ( fileMappingProperties.exists() )
- {
- context.getLog().info("Existing " + FILE_MAPPING + " found, performing property expansion");
- copyFilteredFile(id, context, fileMappingProperties, FILE_MAPPING);
- return;
- }
- }
- File fileMapping = new File(context.getAmpDirectory(), FILE_MAPPING);
- context.getLog().info("No " + FILE_MAPPING + " found, synthesizing one");
- OutputStream out = null;
-
- fileMapping.createNewFile(); // Note: ignore if the file already exists - we simply overwrite its existing contents
-
- try
- {
- out = new FileOutputStream(fileMapping, false);
-
- out.write(FILE_MAPPING_CONTENT.getBytes());
- }
- finally
- {
- if (out != null)
- {
- out.flush();
- out.close();
- }
- }
- }
- catch (final IOException ioe)
- {
- throw new MojoExecutionException("Could not create file-mapping.properties in [" + context.getAmpDirectory().getAbsolutePath() + "]", ioe);
- }
- }
-
-
- /**
- * Handles the webapp sources.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if the sources could not be copied
- */
- protected void handeAmpConfigDirectory( AmpPackagingContext context )
- throws MojoExecutionException
- {
- if ( !context.getAmpConfigDirectory().exists() )
- {
- context.getLog().debug( "AMP config directory does not exist - skipping." );
- }
- else
- {
- if ( !context.getAmpConfigDirectory().getAbsolutePath().equals( context.getAmpDirectory().getPath() ) )
- {
- final PathSet sources = getFilesToIncludes( context.getAmpConfigDirectory(),
- new String[0],
- new String[] {"**/*.class","META-INF/**"} );
-
- try
- {
- context.getLog().info("packaging AMP config items into " + CONFIG_PATH);
- copyFiles( id, context, context.getAmpConfigDirectory(), sources, CONFIG_PATH );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException(
- "Could not copy AMP config [" + context.getAmpDirectory().getAbsolutePath() + "]", e );
- }
-
-
- }
-
-
- }
- }
-
- /**
- * Handles the webapp artifacts.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if the artifacts could not be packaged
- */
- protected void handleArtifacts( AmpPackagingContext context )
- throws MojoExecutionException
- {
- ArtifactsPackagingTask task = new ArtifactsPackagingTask( context.getProject().getArtifacts() );
- task.performPackaging( context );
- }
-
- /**
- * Handles the webapp classes.
- *
- * @param context the packaging context
- * @throws MojoExecutionException if the classes could not be packaged
- */
- protected void handleClassesDirectory( AmpPackagingContext context )
- throws MojoExecutionException
- {
- ClassesPackagingTask task = new ClassesPackagingTask();
- task.performPackaging( context );
- }
-
- /**
- * Handles the deployment descriptors, if specified. Note that the behavior
- * here is slightly different since the customized entry always win, even if
- * an overlay has already packaged a web.xml previously.
- *
- * @param context the packaging context
- * @param webinfDir the web-inf directory
- * @param metainfDir the meta-inf directory
- * @throws MojoFailureException if the web.xml is specified but does not exist
- * @throws MojoExecutionException if an error occured while copying the descriptors
- */
- protected void handleDeploymentDescriptors( AmpPackagingContext context)
- throws MojoFailureException, MojoExecutionException
- {
- try
- {
- if ( moduleProperties != null && StringUtils.isNotEmpty( moduleProperties.getName() ) )
- {
- if ( !moduleProperties.exists() )
- {
- throw new MojoFailureException( "The specified module.properties file '" + moduleProperties + "' does not exist" );
- }
-
- if(new File(context.getAmpDirectory().getPath() + "/module.properties").exists())
- {
- context.getLog().warn("A module.properties was already present, possibly due to previous overlay. Unexpected results may happen, check your target dir");
- }
-
- //rename to module.properties
- context.getLog().info("copying " + moduleProperties + " into " + MODULE_PROPERTIES);
- copyFilteredFile(id, context, moduleProperties, MODULE_PROPERTIES);
- }
-
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Failed to copy deployment descriptor", e );
- }
- }
-
-
- /**
- * Copies webapp webResources from the specified directory.
- *
- * @param context the war packaging context to use
- * @param resource the resource to copy
- * @throws IOException if an error occured while copying the resources
- * @throws MojoExecutionException if an error occured while retrieving the filter properties
- */
- public void copyResources( AmpPackagingContext context, Resource resource )
- throws IOException, MojoExecutionException
- {
- if ( !context.getAmpDirectory().exists() )
- {
- context.getLog().warn( "Not copying AMP ampResources[" + resource.getDirectory() +
- "]: amp directory[" + context.getAmpDirectory().getAbsolutePath() + "] does not exist!" );
- }
-
- context.getLog().info( "Copy AMP ampResources[" + resource.getDirectory() + "] to[" +
- context.getAmpDirectory().getAbsolutePath() + "]" );
- String[] fileNames = getFilesToCopy( resource );
- for ( int i = 0; i < fileNames.length; i++ )
- {
- String targetFileName = fileNames[i];
- if ( resource.getTargetPath() != null )
- {
- //TODO make sure this thing is 100% safe
- targetFileName = resource.getTargetPath() + File.separator + targetFileName;
- }
- if ( resource.isFiltering() )
- {
- copyFilteredFile( id, context, new File( resource.getDirectory(), fileNames[i] ), targetFileName );
- }
- else
- {
- copyFile( id, context, new File( resource.getDirectory(), fileNames[i] ), targetFileName );
- }
- }
- }
-
-
- /**
- * Returns a list of filenames that should be copied
- * over to the destination directory.
- *
- * @param resource the resource to be scanned
- * @return the array of filenames, relative to the sourceDir
- */
- private String[] getFilesToCopy( Resource resource )
- {
- DirectoryScanner scanner = new DirectoryScanner();
- scanner.setBasedir( resource.getDirectory() );
- if ( resource.getIncludes() != null && !resource.getIncludes().isEmpty() )
- {
- scanner.setIncludes(
- (String[]) resource.getIncludes().toArray( new String[resource.getIncludes().size()] ) );
- }
- else
- {
- scanner.setIncludes( DEFAULT_INCLUDES );
- }
- if ( resource.getExcludes() != null && !resource.getExcludes().isEmpty() )
- {
- scanner.setExcludes(
- (String[]) resource.getExcludes().toArray( new String[resource.getExcludes().size()] ) );
- }
-
- scanner.addDefaultExcludes();
-
- scanner.scan();
-
- return scanner.getIncludedFiles();
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/ArtifactsPackagingTask.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/ArtifactsPackagingTask.java
deleted file mode 100644
index ee9bbd86..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/ArtifactsPackagingTask.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.alfresco.maven.plugin.amp.Overlay;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Handles the artifacts that needs to be packaged in the web application.
- *
- * @author Stephane Nicoll
- */
-public class ArtifactsPackagingTask
- extends AbstractAmpPackagingTask
-{
-
- public static final String LIB_PATH = "lib/";
-
- private final Set artifacts;
-
- private final String id;
-
-
- public ArtifactsPackagingTask( Set artifacts )
- {
- this.artifacts = artifacts;
- this.id = Overlay.currentProjectInstance().getId();
- }
-
-
- public void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException
- {
-
- final ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME );
- final List duplicates = findDuplicates( context, artifacts );
-
- for ( Iterator iter = artifacts.iterator(); iter.hasNext(); )
- {
- Artifact artifact = (Artifact) iter.next();
- String targetFileName = getArtifactFinalName( context, artifact );
-
- context.getLog().debug( "Processing: " + targetFileName );
-
- if ( duplicates.contains( targetFileName ) )
- {
- context.getLog().debug( "Duplicate found: " + targetFileName );
- targetFileName = artifact.getGroupId() + "-" + targetFileName;
- context.getLog().debug( "Renamed to: " + targetFileName );
- }
-
- if ( !artifact.isOptional() && filter.include( artifact ) )
- {
- try
- {
- String type = artifact.getType();
- if ( "tld".equals( type ) )
- {
- // copyFile( id, context, artifact.getFile(), TLD_PATH + targetFileName );
- }
- else if ( "aar".equals( type ) )
- {
- //copyFile( id, context, artifact.getFile(), SERVICES_PATH + targetFileName );
- }
- else if ( "jar".equals( type ) || "ejb".equals( type ) || "ejb-client".equals( type ) ||
- "test-jar".equals( type ) )
- {
- copyFile( id, context, artifact.getFile(), LIB_PATH + targetFileName );
- context.getLog().debug("addng " + artifact.getId() + " to AMP in " + LIB_PATH );
- }
- else if ( "par".equals( type ) )
- {
- targetFileName = targetFileName.substring( 0, targetFileName.lastIndexOf( '.' ) ) + ".jar";
- copyFile( id, context, artifact.getFile(), LIB_PATH + targetFileName );
- }
- else if ( "war".equals( type ) )
- {
- // Nothing to do here, it is an overlay and it's already handled
- }
- else if ("zip".equals( type ))
- {
- // Nothing to do here, it is an overlay and it's already handled
- }
- else if ("amp".equals( type ))
- {
- context.getLog().debug("skipping " + artifact.getId() + " in artifacts packaging phase. Will be processed in overlay");
- }
- else
- {
- context.getLog().debug(
- "Artifact of type[" + type + "] is not supported, ignoring[" + artifact + "]" );
- }
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Failed to copy file for artifact[" + artifact + "]", e );
- }
- }
- }
- }
-
- /**
- * Searches a set of artifacts for duplicate filenames and returns a list
- * of duplicates.
- *
- * @param context the packaging context
- * @param artifacts set of artifacts
- * @return List of duplicated artifacts as bundling file names
- */
- private List findDuplicates( AmpPackagingContext context, Set artifacts )
- {
- List duplicates = new ArrayList();
- List identifiers = new ArrayList();
- for ( Iterator iter = artifacts.iterator(); iter.hasNext(); )
- {
- Artifact artifact = (Artifact) iter.next();
- String candidate = getArtifactFinalName( context, artifact );
- if ( identifiers.contains( candidate ) )
- {
- duplicates.add( candidate );
- }
- else
- {
- identifiers.add( candidate );
- }
- }
- return duplicates;
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/ClassesPackagingTask.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/ClassesPackagingTask.java
deleted file mode 100644
index 24ca863c..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/ClassesPackagingTask.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.apache.maven.archiver.MavenArchiver;
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.alfresco.maven.plugin.amp.Overlay;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.jar.ManifestException;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Handles the classes directory that needs to be packaged in the web application.
- *
- * Based on the {@link AmpPackagingContext#archiveClasses()} flag the resources
- * either copied into to WEB-INF/classes directory or archived in a jar
- * within the WEB-INF/lib directory.
- *
- * @author Stephane Nicoll
- */
-public class ClassesPackagingTask
- extends AbstractAmpPackagingTask
-{
-
- private static final String LIB_PATH = "lib/";
-
- public void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException
- {
-
- /* AMP Files do not have a classes folder */
- generateJarArchive( context );
-
- }
-
- protected void generateJarArchive( AmpPackagingContext context )
- throws MojoExecutionException
- {
- //TODO use ArtifactFactory and resolve the final name the usual way instead
- final String archiveName = context.getProject().getBuild().getFinalName() + ".jar";
-
- final String targetFilename = LIB_PATH + archiveName;
-
- if ( context.getAmpStructure().registerFile( Overlay.currentProjectInstance().getId(), targetFilename ) )
- {
-
- final File libDirectory = new File( context.getAmpDirectory(), LIB_PATH );
- final File jarFile = new File( libDirectory, archiveName );
-
- try
- {
- final MavenArchiver archiver = new MavenArchiver();
- archiver.setArchiver( context.getJarArchiver() );
- archiver.setOutputFile( jarFile );
- archiver.getArchiver().addDirectory( context.getClassesDirectory(), context.getAmpJarIncludes(),
- context.getAmpJarExcludes());
- context.getLog().debug("Archiving AMP classes JAR with default excludes: " + context.getAmpJarExcludes());
- archiver.createArchive( context.getProject(), context.getArchive() );
- }
- catch ( ArchiverException e )
- {
- throw new MojoExecutionException( "Could not create classes archive", e );
- }
- catch ( ManifestException e )
- {
- throw new MojoExecutionException( "Could not create classes archive", e );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not create classes archive", e );
- }
- catch ( DependencyResolutionRequiredException e )
- {
- throw new MojoExecutionException( "Could not create classes archive", e );
- }
- }
- else
- {
- context.getLog().warn(
- "Could not generate archive classes file[" + targetFilename + "] has already been copied." );
- }
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/OverlayPackagingTask.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/OverlayPackagingTask.java
deleted file mode 100644
index 03616bff..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/OverlayPackagingTask.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-/*
- * 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.
- */
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.alfresco.maven.plugin.amp.Overlay;
-import org.alfresco.maven.plugin.amp.util.PathSet;
-import org.codehaus.plexus.util.FileUtils;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Handles an overlay.
- *
- * @author Stephane Nicoll
- */
-public class OverlayPackagingTask
- extends AbstractAmpPackagingTask
-{
- private final Overlay overlay;
-
-
- public OverlayPackagingTask( Overlay overlay )
- {
- if ( overlay == null )
- {
- throw new NullPointerException( "overlay could not be null." );
- }
- if ( overlay.equals( Overlay.currentProjectInstance() ) )
- {
- throw new IllegalStateException( "Could not handle the current project with this task." );
- }
- this.overlay = overlay;
- }
-
-
- public void performPackaging( AmpPackagingContext context )
- throws MojoExecutionException
- {
- System.out.print( "OverlayPackagingTask performPackaging overlay.getTargetPath() " + overlay.getTargetPath());
- if ( overlay.shouldSkip() )
- {
- context.getLog().info( "Skipping overlay[" + overlay + "]" );
- }
- else
- {
- try
- {
- context.getLog().info( "Processing overlay[" + overlay + "]" );
-
- // Step1: Extract if necessary
- final File tmpDir = unpackOverlay( context, overlay );
-
- // Step2: setup
- final PathSet includes = getFilesToIncludes( tmpDir, overlay.getIncludes(), overlay.getExcludes() );
-
- // Copy
- if ( null == overlay.getTargetPath() )
- {
- copyFiles( overlay.getId(), context, tmpDir, includes );
- }
- else
- {
- // overlay.getTargetPath() must ended with /
- // if not we add it
- String targetPath = overlay.getTargetPath();
- if (!targetPath.endsWith( "/" ))
- {
- targetPath = targetPath + "/";
- }
- copyFiles( overlay.getId(), context, tmpDir, includes, targetPath );
- }
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Failed to copy file for overlay[" + overlay + "]", e );
- }
- }
- }
-
- /**
- * Unpacks the specified overlay.
- *
- * Makes sure to skip the unpack process if the overlay has
- * already been unpacked.
- *
- * @param context the packaging context
- * @param overlay the overlay
- * @return the directory containing the unpacked overlay
- * @throws MojoExecutionException if an error occured while unpacking the overlay
- */
- protected File unpackOverlay( AmpPackagingContext context, Overlay overlay )
- throws MojoExecutionException
- {
- final File tmpDir = getOverlayTempDirectory( context, overlay );
-
- // TODO: not sure it's good, we should reuse the markers of the dependency plugin
- if ( FileUtils.sizeOfDirectory( tmpDir ) == 0 ||
- overlay.getArtifact().getFile().lastModified() > tmpDir.lastModified() )
- {
- context.getLog().info( "Unpacking overlay[" + overlay + "]" );
- doUnpack( context, overlay.getArtifact().getFile(), tmpDir );
- }
- else
- {
- context.getLog().debug( "Overlay[" + overlay + "] was already unpacked" );
- }
- return tmpDir;
- }
-
- /**
- * Returns the directory to use to unpack the specified overlay.
- *
- * @param context the packaging context
- * @param overlay the overlay
- * @return the temp directory for the overlay
- */
- protected File getOverlayTempDirectory( AmpPackagingContext context, Overlay overlay )
- {
- final File groupIdDir = new File( context.getOverlaysWorkDirectory(), overlay.getGroupId() );
- if ( !groupIdDir.exists() )
- {
- groupIdDir.mkdir();
- }
- final File result = new File( groupIdDir, overlay.getArtifactId() );
- if ( !result.exists() )
- {
- result.mkdirs();
- }
- return result;
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/SaveAmpStructurePostPackagingTask.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/SaveAmpStructurePostPackagingTask.java
deleted file mode 100644
index 35a05877..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/SaveAmpStructurePostPackagingTask.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.alfresco.maven.plugin.amp.packaging;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.alfresco.maven.plugin.amp.util.AmpStructureSerializer;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Saves the webapp structure cache.
- *
- * @author Stephane Nicoll
- */
-public class SaveAmpStructurePostPackagingTask
- implements AmpPostPackagingTask
-{
-
- private final File targetFile;
-
- private final AmpStructureSerializer serialier;
-
-
- public SaveAmpStructurePostPackagingTask( File targetFile )
- {
- this.targetFile = targetFile;
- this.serialier = new AmpStructureSerializer();
- }
-
- public void performPostPackaging( AmpPackagingContext context )
- throws MojoExecutionException, MojoFailureException
- {
- if ( targetFile == null )
- {
- context.getLog().debug( "Cache usage is disabled, not saving webapp structure." );
- }
- else
- {
- try
- {
- serialier.toXml( context.getAmpStructure(), targetFile );
- context.getLog().debug( "Cache saved successfully." );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not save webapp structure", e );
- }
- }
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructure.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructure.java
deleted file mode 100644
index 7805b5e4..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructure.java
+++ /dev/null
@@ -1,312 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Represents the structure of a web application composed of multiple
- * overlays. Each overlay is registered within this structure with the
- * set of files it holds.
- *
- * Note that this structure is persisted to disk at each invocation to
- * store wich owner holds which path (file).
- *
- * @author Stephane Nicoll
- */
-public class AmpStructure
-{
-
- private Map registeredFiles;
-
- private transient PathSet allFiles = new PathSet();
-
- private transient AmpStructure cache;
-
- /**
- * Creates a new empty instance.
- */
- public AmpStructure()
- {
- this.registeredFiles = new HashMap();
- this.cache = null;
- }
-
- /**
- * Creates a new instance with the specified cache.
- *
- * @param cache the cache
- */
- public AmpStructure( AmpStructure cache )
- {
- this.registeredFiles = new HashMap();
- if ( cache == null )
- {
- this.cache = new AmpStructure();
- }
- else
- {
- this.cache = cache;
- }
- }
-
-
- /**
- * Specify if the specified path is registered or not.
- *
- * @param path the relative path from the webapp root directory
- * @return true if the path is registered, false otherwise
- */
- public boolean isRegistered( String path )
- {
- return getFullStructure().contains( path );
-
- }
-
- /**
- * Registers the specified path for the specified owner. Returns true
- * if the path is not already registered, false otherwise.
- *
- * @param id the owner of the path
- * @param path the relative path from the webapp root directory
- * @return true if the file was registered successfully
- */
- public boolean registerFile( String id, String path )
- {
- if ( !isRegistered( path ) )
- {
- doRegister( id, path );
- return true;
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Registers the specified path for the specified owner. Invokes
- * the callback with the result of the registration.
- *
- * @param id the owner of the path
- * @param path the relative path from the webapp root directory
- * @param callback the callback to invoke with the result of the registration
- * @throws IOException if the callback invocation throws an IOException
- */
- public void registerFile( String id, String path, RegistrationCallback callback )
- throws IOException
- {
-
- // If the file is already in the current structure, rejects it with the current owner
- if ( isRegistered( path ) )
- {
- callback.refused( id, path, getOwner( path ) );
- }
- else
- {
- doRegister( id, path );
- // This is a new file
- if ( cache.getOwner( path ) == null )
- {
- callback.registered( id, path );
-
- } // The file already belonged to this owner
- else if ( cache.getOwner( path ).equals( id ) )
- {
- callback.alreadyRegistered( id, path );
- } // The file belongs to another owner and it's known currently
- else if ( getOwners().contains( cache.getOwner( path ) ) )
- {
- callback.superseded( id, path, cache.getOwner( path ) );
- } // The file belongs to another owner and it's unknown
- else
- {
- callback.supersededUnknownOwner( id, path, cache.getOwner( path ) );
- }
- }
- }
-
- /**
- * Returns the owner of the specified path. If the file is not
- * registered, returns null
- *
- * @param path the relative path from the webapp root directory
- * @return the owner or null.
- */
- public String getOwner( String path )
- {
- if ( !isRegistered( path ) )
- {
- return null;
- }
- else
- {
- final Iterator it = registeredFiles.keySet().iterator();
- while ( it.hasNext() )
- {
- final String owner = (String) it.next();
- final PathSet structure = getStructure( owner );
- if ( structure.contains( path ) )
- {
- return owner;
- }
-
- }
- throw new IllegalStateException(
- "Should not happen, path[" + path + "] is flagged as being registered but was not found." );
- }
-
- }
-
- /**
- * Returns the owners. Note that this the returned {@link Set} may be
- * inconsistent since it represents a persistent cache accross multiple
- * invocations.
- *
- * For instance, if an overlay was removed in this execution, it will be
- * still be there till the cache is cleaned. This happens when the clean
- * mojo is invoked.
- *
- * @return the list of owners
- */
- public Set getOwners()
- {
- return registeredFiles.keySet();
- }
-
- /**
- * Returns all paths that have been registered so far.
- *
- * @return all registered path
- */
- public PathSet getFullStructure()
- {
- return allFiles;
- }
-
- /**
- * Returns the list of registered files for the specified owner.
- *
- * @param id the owner
- * @return the list of files registered for that owner
- */
- public PathSet getStructure( String id )
- {
- PathSet pathSet = (PathSet) registeredFiles.get( id );
- if ( pathSet == null )
- {
- pathSet = new PathSet();
- registeredFiles.put( id, pathSet );
- }
- return pathSet;
- }
-
- private void doRegister( String id, String path )
- {
- getFullStructure().add( path );
- getStructure( id ).add( path );
- }
-
- private Object readResolve()
- {
- // the full structure should be resolved so let's rebuild it
- this.allFiles = new PathSet();
- final Iterator it = registeredFiles.values().iterator();
- while ( it.hasNext() )
- {
- PathSet pathSet = (PathSet) it.next();
- this.allFiles.addAll( pathSet );
- }
- return this;
- }
-
- /**
- * Callback interfce to handle events related to filepath registration in
- * the webapp.
- */
- public interface RegistrationCallback
- {
-
-
- /**
- * Called if the targetFilename for the specified ownerId
- * has been registered successfully.
- *
- * This means that the targetFilename was unknown and has been
- * registered successfully.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @throws IOException if an error occured while handling this event
- */
- void registered( String ownerId, String targetFilename )
- throws IOException;
-
- /**
- * Called if the targetFilename for the specified ownerId
- * has already been registered.
- *
- * This means that the targetFilename was known and belongs to the
- * specified owner.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @throws IOException if an error occured while handling this event
- */
- void alreadyRegistered( String ownerId, String targetFilename )
- throws IOException;
-
- /**
- * Called if the registration of the targetFilename for the
- * specified ownerId has been refused since the path already
- * belongs to the actualOwnerId.
- *
- * This means that the targetFilename was known and does not
- * belong to the specified owner.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @param actualOwnerId the actual owner
- * @throws IOException if an error occured while handling this event
- */
- void refused( String ownerId, String targetFilename, String actualOwnerId )
- throws IOException;
-
- /**
- * Called if the targetFilename for the specified ownerId
- * has been registered successfully by superseding a deprecatedOwnerId,
- * that is the previous owner of the file.
- *
- * This means that the targetFilename was known but for another
- * owner. This usually happens after a project's configuration change. As a
- * result, the file has been registered successfully to the new owner.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @param deprecatedOwnerId the previous owner that does not exist anymore
- * @throws IOException if an error occured while handling this event
- */
- void superseded( String ownerId, String targetFilename, String deprecatedOwnerId )
- throws IOException;
-
- /**
- * Called if the targetFilename for the specified ownerId
- * has been registered successfully by superseding a unknownOwnerId,
- * that is an owner that does not exist anymore in the current project.
- *
- * This means that the targetFilename was known but for an owner that
- * does not exist anymore. Hence the file has been registered successfully to
- * the new owner.
- *
- * @param ownerId the ownerId
- * @param targetFilename the relative path according to the root of the webapp
- * @param unknownOwnerId the previous owner that does not exist anymore
- * @throws IOException if an error occured while handling this event
- */
- void supersededUnknownOwner( String ownerId, String targetFilename, String unknownOwnerId )
- throws IOException;
-
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructureSerializer.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructureSerializer.java
deleted file mode 100644
index 2b8c0a05..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/AmpStructureSerializer.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-import com.thoughtworks.xstream.XStream;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-
-/**
- * Serializes {@link AmpStructure} back and forth.
- *
- * @author Stephane Nicoll
- */
-public class AmpStructureSerializer
-{
-
- private final XStream xStream;
-
- /**
- * Creates a new instance of the serializer.
- */
- public AmpStructureSerializer()
- {
- this.xStream = new XStream();
-
- // Register aliases
- xStream.alias( "webapp-structure", AmpStructure.class );
- xStream.alias( "path-set", PathSet.class );
- }
-
-
- /**
- * Reads the {@link AmpStructure} from the specified file.
- *
- * @param file the file containing the webapp structure
- * @return the webapp structure
- * @throws IOException if an error occured while reading the structure
- */
- public AmpStructure fromXml( File file )
- throws IOException
- {
- FileReader reader = null;
-
- try
- {
- reader = new FileReader( file );
- return (AmpStructure) xStream.fromXML( reader );
- }
- finally
- {
- if ( reader != null )
- {
- reader.close();
- }
- }
- }
-
- /**
- * Saves the {@link AmpStructure} to the specified file.
- *
- * @param webappStructure the structure to save
- * @param targetFile the file to use to save the structure
- * @throws IOException if an error occured while saving the webapp structure
- */
- public void toXml( AmpStructure webappStructure, File targetFile )
- throws IOException
- {
- FileWriter writer = null;
- try
- {
- if ( !targetFile.getParentFile().exists() && !targetFile.getParentFile().mkdirs() )
- {
- throw new IOException(
- "Could not create parent[" + targetFile.getParentFile().getAbsolutePath() + "]" );
- }
-
- if ( !targetFile.exists() && !targetFile.createNewFile() )
- {
- throw new IOException( "Could not create file[" + targetFile.getAbsolutePath() + "]" );
- }
- writer = new FileWriter( targetFile );
- xStream.toXML( webappStructure, writer );
- }
- finally
- {
- if ( writer != null )
- {
- writer.close();
- }
- }
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/CompositeMap.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/CompositeMap.java
deleted file mode 100644
index 651ebc51..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/CompositeMap.java
+++ /dev/null
@@ -1,61 +0,0 @@
- package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import java.util.AbstractMap;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @version $Id: CompositeMap.java 565036 2007-08-12 10:26:14Z snicoll $
- * @todo merge with resources/assembly plugin
- */
-public class CompositeMap
- extends AbstractMap
-{
- private Map recessive;
-
- private Map dominant;
-
- public CompositeMap( Map dominant, Map recessive )
- {
- this.dominant = Collections.unmodifiableMap( dominant );
-
- this.recessive = Collections.unmodifiableMap( recessive );
- }
-
- public synchronized Object get( Object key )
- {
- Object value = dominant.get( key );
-
- if ( value == null )
- {
- value = recessive.get( key );
- }
-
- return value;
- }
-
- public Set entrySet()
- {
- throw new UnsupportedOperationException( "Cannot enumerate properties in a composite map" );
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/MappingUtils.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/MappingUtils.java
deleted file mode 100644
index af1a3141..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/MappingUtils.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.interpolation.InterpolationException;
-import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
-import org.codehaus.plexus.interpolation.ObjectBasedValueSource;
-import org.codehaus.plexus.interpolation.ValueSource;
-
-import java.util.List;
-import java.util.Properties;
-
-/**
- * Utilities used to evaluate expression.
- *
- * TODO: this comes from the assembly plugin; refactor when it's shared.
- *
- * The expression might use any fied of the {@link Artifact} interface. Some
- * examples might be:
- *
- *
${artifactId}-${version}.${extension}
- *
${artifactId}.${extension}
- *
- *
- * @author Stephane Nicoll
- */
-public class MappingUtils
-{
-
- /**
- * Evaluates the specified expression for the given artifact.
- *
- * @param expression the expression to evaluate
- * @param artifact the artifact to use as value object for tokens
- * @return expression the evaluated expression
- */
- public static String evaluateFileNameMapping( String expression, Artifact artifact )
-
- {
- String value = expression;
-
- // FIXME: This is BAD! Accessors SHOULD NOT change the behavior of the object.
- artifact.isSnapshot();
-
- RegexBasedInterpolator interpolator = new RegexBasedInterpolator();
-
- interpolator.addValueSource( new ObjectBasedValueSource( artifact ) );
- interpolator.addValueSource( new ObjectBasedValueSource( artifact.getArtifactHandler() ) );
-
- Properties classifierMask = new Properties();
- classifierMask.setProperty( "classifier", "" );
-
- interpolator.addValueSource( new PropertiesInterpolationValueSource( classifierMask ) );
-
- try {
- value = interpolator.interpolate( value, "__artifact" );
- } catch (InterpolationException e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
- }
-
- return value;
- }
-
-
- static class PropertiesInterpolationValueSource
- implements ValueSource
- {
-
- private final Properties properties;
-
- public PropertiesInterpolationValueSource( Properties properties )
- {
- this.properties = properties;
- }
-
- public Object getValue( String key )
- {
- return properties.getProperty( key );
- }
-
- @Override
- public List getFeedback() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- @Override
- public void clearFeedback() {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- }
-
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/PathSet.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/PathSet.java
deleted file mode 100644
index 0453db36..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/PathSet.java
+++ /dev/null
@@ -1,284 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * Set of file's paths.
- *
- * The class extends functionality of a "normal" set of strings by a process of
- * the paths normalization. All paths are converted to unix form (slashes) and
- * they don't start with starting /.
- *
- * @author Piotr Tabor
- */
-
-public class PathSet
-{
-
- /**
- * Set of normalized paths
- */
- private Set/* */pathsSet = new LinkedHashSet();
-
- /**
- * The method normalizes the path.
- *
- *
- *
changes directory separator to unix's separator(/)
- *
deletes all trailing slashes
- *
- *
- * @param path to normalization
- * @return normalized path
- */
- protected String normalizeFilePath( String path )
- {
- return normalizeFilePathStatic( path );
- }
-
- /*-------------------- Business interface ------------------------------*/
-
- /**
- * Creates an empty paths set
- */
- public PathSet()
- {
- /*Empty default constructor*/
- }
-
- /**
- * Creates paths set and normalizate and adds all 'paths'.
- * The source 'paths' will not be changed
- *
- * @param paths to be added
- */
- public PathSet( Collection/*String>*/ paths )
- {
- addAll( paths );
- }
-
- /**
- * Creates paths set and normalizate and adds all 'paths'.
- * The source 'paths' will not be changed
- *
- * @param paths to be added
- */
- public PathSet( String[] paths )
- {
- addAll( paths );
- }
-
- /**
- * Normalizes and adds given path to the set.
- *
- * @param path to be added
- */
- public void add( String path )
- {
- pathsSet.add( normalizeFilePath( path ) );
- }
-
- /**
- * Normalizes and adds given paths (collection of strings)
- * to the set. The source collection will not be changed
- *
- * @param paths - collection of strings to be added
- * @param prefix added to all given paths
- */
- public void addAll( Collection/**/ paths, String prefix )
- {
- for ( Iterator iter = paths.iterator(); iter.hasNext(); )
- {
- add( prefix + iter.next() );
- }
- }
-
- /**
- * Normalizes and adds given paths to the set.
- * The source collection will not be changed
- *
- * @param paths to be added
- * @param prefix added to all given paths
- */
- public void addAll( String[] paths, String prefix )
- {
- for ( int i = 0; i < paths.length; i++ )
- {
- add( prefix + paths[i] );
- }
- }
-
- /**
- * Adds given paths to the set.
- * The source collection will not be changed
- *
- * @param paths to be added
- * @param prefix added to all given paths
- */
- public void addAll( PathSet paths, String prefix )
- {
- for ( Iterator iter = paths.iterator(); iter.hasNext(); )
- {
- add( prefix + iter.next() );
- }
- }
-
- /**
- * Normalizes and adds given paths (collection of strings)
- * to the set. The source collection will not be changed
- *
- * @param paths - collection of strings to be added
- */
- public void addAll( Collection/**/ paths )
- {
- addAll( paths, "" );
- }
-
- /**
- * Normalizes and adds given paths to the set.
- * The source collection will not be changed
- *
- * @param paths to be added
- */
- public void addAll( String[] paths )
- {
- addAll( paths, "" );
- }
-
- /**
- * Adds given paths to the set.
- * The source collection will not be changed
- *
- * @param paths to be added
- */
- public void addAll( PathSet paths )
- {
- addAll( paths, "" );
- }
-
- /**
- * Checks if the set constains given path. The path is normalized
- * before check.
- *
- * @param path we are looking for in the set.
- * @return information if the set constains the path.
- */
- public boolean contains( String path )
- {
- return pathsSet.contains( normalizeFilePath( path ) );
- }
-
- /**
- * Returns iterator of normalized paths (strings)
- *
- * @return iterator of normalized paths (strings)
- */
- public Iterator iterator()
- {
- return pathsSet.iterator();
- }
-
- /**
- * Adds given prefix to all paths in the set.
- *
- * The prefix should be ended by '/'. The generated paths are normalized.
- *
- * @param prefix to be added to all items
- */
- public void addPrefix( String prefix )
- {
- final Set/**/ newSet = new HashSet();
- for ( Iterator iter = pathsSet.iterator(); iter.hasNext(); )
- {
- String path = (String) iter.next();
- newSet.add( normalizeFilePath( prefix + path ) );
- }
- pathsSet = newSet;
- }
-
- /**
- * Returns count of the paths in the set
- *
- * @return count of the paths in the set
- */
- public int size()
- {
- return pathsSet.size();
- }
-
- /**
- * Adds to the set all files in the given directory
- *
- * @param directory that will be searched for file's paths to add
- * @param prefix to be added to all found files
- */
- public void addAllFilesInDirectory( File directory, String prefix )
- {
- DirectoryScanner scanner = new DirectoryScanner();
- scanner.setBasedir( directory );
- scanner.scan();
- addAll( scanner.getIncludedFiles(), prefix );
- }
-
- /*-------------------- Universal static mathods ------------------------*/
- /**
- * The method normalizes the path.
- *
- *
- *
changes directory separator to unix's separator(/)
- *
deletes all trailing slashes
- *
- *
- * @param path to normalization
- * @return normalized path
- */
- public static String normalizeFilePathStatic( String path )
- {
- return trimTrailingSlashes( StringUtils.replace( path, '\\', '/' ) );
- }
-
- /**
- * The method deletes all trailing slashes from the given string
- *
- * @param str a string
- * @return trimed string
- */
- public static String trimTrailingSlashes( String str )
- {
- int i;
- for ( i = 0; i < str.length() && str.charAt( i ) == '/'; i++ )
- /* just calculate i */
- {
-
- }
- return str.substring( i );
- }
-
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/PropertyUtils.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/PropertyUtils.java
deleted file mode 100644
index b4f79ff6..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/PropertyUtils.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import org.codehaus.plexus.util.IOUtil;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Properties;
-
-/**
- * @author Kenney Westerhof
- * @version $Id: PropertyUtils.java 565036 2007-08-12 10:26:14Z snicoll $
- * @todo this is duplicated from the resources plugin - migrate to plexus-util
- */
-public final class PropertyUtils
-{
- private PropertyUtils()
- {
- // prevent instantiation
- }
-
- /**
- * Reads a property file, resolving all internal variables.
- *
- * @param propfile The property file to load
- * @param fail wheter to throw an exception when the file cannot be loaded or to return null
- * @param useSystemProps wheter to incorporate System.getProperties settings into the returned Properties object.
- * @return the loaded and fully resolved Properties object
- * @throws IOException if an error failed while loading the properties
- */
- public static Properties loadPropertyFile( File propfile, boolean fail, boolean useSystemProps )
- throws IOException
- {
- Properties props = new Properties();
-
- if ( useSystemProps )
- {
- props = new Properties( System.getProperties() );
- }
-
- if ( propfile.exists() )
- {
- FileInputStream inStream = new FileInputStream( propfile );
- try
- {
- props.load( inStream );
- }
- finally
- {
- IOUtil.close( inStream );
- }
- }
- else if ( fail )
- {
- throw new FileNotFoundException( propfile.toString() );
- }
-
- for ( Enumeration n = props.propertyNames(); n.hasMoreElements(); )
- {
- String k = (String) n.nextElement();
- props.setProperty( k, PropertyUtils.getPropertyValue( k, props ) );
- }
-
- return props;
- }
-
-
- /**
- * Retrieves a property value, replacing values like ${token}
- * using the Properties to look them up.
- *
- * It will leave unresolved properties alone, trying for System
- * properties, and implements reparsing (in the case that
- * the value of a property contains a key), and will
- * not loop endlessly on a pair like
- * test = ${test}.
- *
- * @param k the token
- * @param p the properties containing the filter values
- * @return the value
- */
- private static String getPropertyValue( String k, Properties p )
- {
- // This can also be done using InterpolationFilterReader,
- // but it requires reparsing the file over and over until
- // it doesn't change.
-
- String v = p.getProperty( k );
- String ret = "";
- int idx, idx2;
-
- while ( ( idx = v.indexOf( "${" ) ) >= 0 )
- {
- // append prefix to result
- ret += v.substring( 0, idx );
-
- // strip prefix from original
- v = v.substring( idx + 2 );
-
- // if no matching } then bail
- if ( ( idx2 = v.indexOf( '}' ) ) < 0 )
- {
- break;
- }
-
- // strip out the key and resolve it
- // resolve the key/value for the ${statement}
- String nk = v.substring( 0, idx2 );
- v = v.substring( idx2 + 1 );
- String nv = p.getProperty( nk );
-
- // try global environment..
- if ( nv == null )
- {
- nv = System.getProperty( nk );
- }
-
- // if the key cannot be resolved,
- // leave it alone ( and don't parse again )
- // else prefix the original string with the
- // resolved property ( so it can be parsed further )
- // taking recursion into account.
- if ( nv == null || nv.equals( k ) )
- {
- ret += "${" + nk + "}";
- }
- else
- {
- v = nv + v;
- }
- }
- return ret + v;
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/ReflectionProperties.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/ReflectionProperties.java
deleted file mode 100644
index 197df8d5..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/util/ReflectionProperties.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.alfresco.maven.plugin.amp.util;
-
-/*
- * 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.
- */
-
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
-
-import java.util.AbstractMap;
-import java.util.Set;
-
-/**
- * @version $Id: ReflectionProperties.java 565036 2007-08-12 10:26:14Z snicoll $
- * @todo merge with resources/assembly plugin
- */
-public class ReflectionProperties
- extends AbstractMap
-{
- private MavenProject project;
-
- public ReflectionProperties( MavenProject project )
- {
- this.project = project;
- }
-
- public synchronized Object get( Object key )
- {
- Object value = null;
- try
- {
- value = ReflectionValueExtractor.evaluate( String.valueOf( key ), project );
- }
- catch ( Exception e )
- {
- //TODO: remove the try-catch block when ReflectionValueExtractor.evaluate() throws no more exceptions
- }
- return value;
- }
-
- public Set entrySet()
- {
- throw new UnsupportedOperationException( "Cannot enumerate properties in a project" );
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/plexus/archiver/AmpArchiver.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/plexus/archiver/AmpArchiver.java
deleted file mode 100644
index 7ea605ea..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/plexus/archiver/AmpArchiver.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package org.alfresco.plexus.archiver;
-
-import java.io.File;
-import java.io.IOException;
-import org.codehaus.plexus.archiver.*;
-import org.codehaus.plexus.archiver.jar.JarArchiver;
-import org.codehaus.plexus.archiver.zip.ZipOutputStream;
-
-public class AmpArchiver extends JarArchiver
-{
-
- public AmpArchiver()
- {
- super.archiveType = "amp";
- }
-
- public void setModuleProperties(File descr)
- throws ArchiverException
- {
-// deploymentDescriptor = descr;
-// if(!deploymentDescriptor.exists())
-// {
-// throw new ArchiverException("Deployment descriptor: " + deploymentDescriptor + " does not exist.");
-// } else
-// {
-// addFile(descr, "config/AMP-INF/module.properties");
-// return;
-// }
- }
-
- public void addLib(File fileName)
- throws ArchiverException
- {
- addDirectory(fileName.getParentFile(), "lib/", new String[] {
- fileName.getName()
- }, null);
- }
-
- public void addLibs(File directoryName, String includes[], String excludes[])
- throws ArchiverException
- {
- addDirectory(directoryName, "lib/", includes, excludes);
- }
-
- public void addClass(File fileName)
- throws ArchiverException
- {
- addDirectory(fileName.getParentFile(), "classes/", new String[] {
- fileName.getName()
- }, null);
- }
-
- public void addClasses(File directoryName, String includes[], String excludes[])
- throws ArchiverException
- {
- addDirectory(directoryName, "classes/", includes, excludes);
- }
-
-
- protected void initZipOutputStream(ZipOutputStream zOut)
- throws IOException, ArchiverException
- {
-// if(deploymentDescriptor == null && !isInUpdateMode())
-// {
-// throw new ArchiverException("module properies attribute is required");
-// }
-// else
-// {
- super.initZipOutputStream(zOut);
- return;
-// }
- }
-
- protected void zipFile(ArchiveEntry entry, ZipOutputStream zOut, String vPath, int mode)
- throws IOException, ArchiverException
- {
- if(vPath.equalsIgnoreCase("config/AMP-INF/module.properties"))
- {
- if(deploymentDescriptor == null || !deploymentDescriptor.getCanonicalPath().equals(entry.getFile().getCanonicalPath()) || descriptorAdded)
- {
- getLogger().warn("Warning: selected " + super.archiveType + " files include a config/AMP-INF/module.properites which will be ignored " + "(please use webxml attribute to " + super.archiveType + " task)");
- }
- else
- {
- super.zipFile(entry, zOut, vPath);
- descriptorAdded = true;
- }
- }
- else
- {
- super.zipFile(entry, zOut, vPath);
- }
- }
-
-
- protected void cleanUp()
- {
- descriptorAdded = false;
- super.cleanUp();
- }
-
- private File deploymentDescriptor;
- private boolean descriptorAdded;
- /**
- * @see org.codehaus.plexus.archiver.AbstractArchiver#addDirectory(java.io.File, java.lang.String, java.lang.String[], java.lang.String[])
- */
- public void addDirectory(File pArg0, String pArg1, String[] pArg2, String[] pArg3)
- throws ArchiverException
- {
- /* */
- getLogger().info("adding directory [ '"+pArg0+"' '"+pArg1+"']");
- super.addDirectory(pArg0, pArg1, pArg2, pArg3);
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/plexus/archiver/AmpUnArchiver.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/plexus/archiver/AmpUnArchiver.java
deleted file mode 100644
index f01b1e33..00000000
--- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/plexus/archiver/AmpUnArchiver.java
+++ /dev/null
@@ -1,282 +0,0 @@
-package org.alfresco.plexus.archiver;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.zip.ZipException;
-
-import org.codehaus.plexus.archiver.ArchiveFilterException;
-import org.codehaus.plexus.archiver.ArchiveFinalizer;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.util.FilterSupport;
-import org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver;
-import org.codehaus.plexus.archiver.zip.ZipEntry;
-import org.codehaus.plexus.archiver.zip.ZipFile;
-import org.codehaus.plexus.util.FileUtils;
-
-public class AmpUnArchiver extends AbstractZipUnArchiver {
-
- private static final String NATIVE_ENCODING = "native-encoding";
-
- private String encoding = "UTF8";
-
- private FilterSupport filterSupport;
-
- private List finalizers;
-
- private static String fileSeparator = System.getProperty("file.separator");
-
-
- public void setArchiveFilters( List filters )
- {
- filterSupport = new FilterSupport( filters, getLogger() );
- }
-
- /**
- * Sets the encoding to assume for file names and comments.
- *
- *
Set to native-encoding if you want your
- * platform's native encoding, defaults to UTF8.
- */
- public void setEncoding( String encoding )
- {
- if ( NATIVE_ENCODING.equals( encoding ) )
- {
- encoding = null;
- }
- this.encoding = encoding;
- }
-
-
- private static Map ampMapping = new HashMap();
-
- @Override
- protected void execute()
- throws ArchiverException
- {
-
- getLogger().info( "Expanding: " + getSourceFile() + " into " + getDestDirectory() );
- ZipFile zf = null;
-
-
-
- try
- {
- zf = new ZipFile( getSourceFile(), encoding );
- Enumeration e = zf.getEntries();
-
-
- String moduleId = getModuleId(zf);
-
- // Based on the current AMP name creates the appropriate mapping to alfresco/module/
- createAmpMapping(moduleId);
-
- while ( e.hasMoreElements() )
- {
- ZipEntry ze = (ZipEntry) e.nextElement();
- if (!ze.getName().startsWith("META-INF"))
- {
- String fileInAmp = getAmpMapping(ze.getName());
-
- extractFileIfIncluded( getSourceFile(), getDestDirectory(), zf.getInputStream( ze ), fileInAmp, new Date( ze.getTime() ), ze.isDirectory() );
- }
- }
-
- runArchiveFinalizers();
-
- getLogger().debug( "expand complete" );
- }
- catch ( IOException ioe )
- {
- throw new ArchiverException( "Error while expanding " + getSourceFile().getAbsolutePath(), ioe );
- }
- finally
- {
- if ( zf != null )
- {
- try
- {
- zf.close();
- }
- catch ( IOException e )
- {
- //ignore
- }
- }
- }
- }
-
- private String getModuleId(ZipFile zf) throws IOException, ZipException, ArchiverException {
- ZipEntry modulePropertiesEntry = zf.getEntry("module.properties");
- Properties moduleProperties = new Properties();
- moduleProperties.load(zf.getInputStream(modulePropertiesEntry));
- String moduleId = moduleProperties.getProperty("module.id");
- if(moduleId == null || "".equals(moduleId))
- throw new ArchiverException("module.id property not found in module.properties");
- return moduleId;
- }
-
-
- private String getAmpMapping(String name) {
- if(name.startsWith("web/") && !name.startsWith("web/licenses"))
- {
- return name.substring(4);
- }
-
- for (Map.Entry mapElelement : ampMapping.entrySet()) {
- if(name.startsWith(mapElelement.getKey()))
- {
- String relativePath = "";
-
- if((name.startsWith("config/")))
- {
- relativePath = name.substring(7);
- }
- else if((name.startsWith("lib/")))
- {
- relativePath = name.substring(4);
- }
- else
- relativePath = FileUtils.removePath(name);
-
- return mapElelement.getValue() + relativePath;
- }
-
- }
- return "";
- }
-
-
- private void createAmpMapping(String moduleId) {
- File zipFile = getSourceFile();
-
- String ampName = zipFile.getName();
- ampName = FileUtils.removeExtension(FileUtils.removePath(ampName));
- int ampNameIndex = ampName.lastIndexOf('-');
- if (ampNameIndex > 0) {
- ampName = ampName.substring(0, ampNameIndex);
- }
-
- ampMapping.put("module.properties", "WEB-INF"+ fileSeparator +"classes" + fileSeparator +"alfresco" + fileSeparator +"module" + fileSeparator + moduleId + fileSeparator);
- ampMapping.put("config", "WEB-INF"+fileSeparator+"classes"+ fileSeparator);
- ampMapping.put("lib", "WEB-INF" + fileSeparator + "lib" +fileSeparator);
- ampMapping.put("web"+ fileSeparator +"licenses", "WEB-INF" +fileSeparator);
-
- }
-
- private void extractFileIfIncluded( File sourceFile, File destDirectory, InputStream inputStream, String name,
- Date time, boolean isDirectory )
- throws IOException, ArchiverException
- {
- try
- {
- if ( filterSupport == null || filterSupport.include( inputStream, name ) )
- {
- extractFile( sourceFile, destDirectory, inputStream, name, time, isDirectory );
- }
- }
- catch ( ArchiveFilterException e )
- {
- throw new ArchiverException( "Error verifying \'" + name + "\' for inclusion: " + e.getMessage(), e );
- }
- }
-
- protected void extractFile( File srcF, File dir, InputStream compressedInputStream, String entryName,
- Date entryDate, boolean isDirectory )
- throws IOException
- {
- File f = null;
- if (entryName != null && !"".equals(entryName))
- f = FileUtils.resolveFile( dir, entryName );
- else
- return;
-
- try
- {
- if ( !isOverwrite() && f.exists() && f.lastModified() >= entryDate.getTime() )
- {
- getLogger().debug( "Skipping " + f + " as it is up-to-date" );
- return;
- }
-
- getLogger().debug( "expanding " + entryName + " to " + f );
-// create intermediary directories - sometimes zip don't add them
- File dirF = f.getParentFile();
- if ( dirF != null )
- {
- dirF.mkdirs();
- }
-
- if ( isDirectory )
- {
- f.mkdirs();
- }
- else
- {
- byte[] buffer = new byte[1024];
- int length;
- FileOutputStream fos = null;
- try
- {
- fos = new FileOutputStream( f );
-
- while ( ( length = compressedInputStream.read( buffer ) ) >= 0 )
- {
- fos.write( buffer, 0, length );
- }
-
- fos.close();
- fos = null;
- }
- finally
- {
- if ( fos != null )
- {
- try
- {
- fos.close();
- }
- catch ( IOException e )
- {
-// ignore
- }
- }
- }
- }
-
- f.setLastModified( entryDate.getTime() );
- }
- catch ( FileNotFoundException ex )
- {
- getLogger().warn( "Unable to expand to file " + f.getPath() );
- }
- }
-
- public void setArchiveFinalizers( List archiveFinalizers )
- {
- this.finalizers = archiveFinalizers;
- }
-
- protected void runArchiveFinalizers()
- throws ArchiverException
- {
- if ( finalizers != null )
- {
- for ( Iterator it = finalizers.iterator(); it.hasNext(); )
- {
- ArchiveFinalizer finalizer = (ArchiveFinalizer) it.next();
-
- finalizer.finalizeArchiveExtraction( this );
- }
- }
- }
-}
diff --git a/plugins/maven-amp-plugin/src/main/resources/META-INF/maven/lifecycle.xml b/plugins/maven-amp-plugin/src/main/resources/META-INF/maven/lifecycle.xml
deleted file mode 100644
index 0bf27002..00000000
--- a/plugins/maven-amp-plugin/src/main/resources/META-INF/maven/lifecycle.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- amp
-
-
- package
-
-
-
- amp
-
-
-
-
-
-
-
diff --git a/plugins/maven-amp-plugin/src/main/resources/META-INF/plexus/components.xml b/plugins/maven-amp-plugin/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 3e78b4b5..00000000
--- a/plugins/maven-amp-plugin/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
- org.apache.maven.artifact.handler.ArtifactHandler
- amp
- org.apache.maven.artifact.handler.DefaultArtifactHandler
-
- amp
- amp
- amp
- java
- true
- true
-
-
-
-
- org.apache.maven.lifecycle.mapping.LifecycleMapping
- amp
- org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
-
-
- org.apache.maven.plugins:maven-resources-plugin:resources
- org.apache.maven.plugins:maven-compiler-plugin:compile
- org.apache.maven.plugins:maven-resources-plugin:testResources
- org.apache.maven.plugins:maven-compiler-plugin:testCompile
- org.apache.maven.plugins:maven-surefire-plugin:test
- org.alfresco.maven.plugin:maven-amp-plugin:amp
- org.apache.maven.plugins:maven-install-plugin:install
- org.apache.maven.plugins:maven-deploy-plugin:deploy
-
-
-
-
-
- org.codehaus.plexus.archiver.Archiver
- amp
- org.alfresco.plexus.archiver.AmpArchiver
- per-lookup
-
-
-
-
- org.codehaus.plexus.archiver.UnArchiver
- amp
- org.alfresco.plexus.archiver.AmpUnArchiver
-
-
-
-
diff --git a/plugins/maven-amp-plugin/src/site/apt/components.apt.vm b/plugins/maven-amp-plugin/src/site/apt/components.apt.vm
deleted file mode 100644
index 0db45ded..00000000
--- a/plugins/maven-amp-plugin/src/site/apt/components.apt.vm
+++ /dev/null
@@ -1,37 +0,0 @@
- -----
- Maven AMP Plugin Plexus Components
- -----
-
-
-
-AMP Lifecycle Mapping
-
- This plugin provides support for amp type of projects. \
- Lifecycle of an Alfresco modules is mapped in the file:
-
- {{ ${site_tags_url}/${site_pom_artifactId}-${site_pom_version}/src/main/resources/META-INF/plexus/components.xml }}
-
- This build produces an Alfresco compatible AMP as main build product. It supports (being derived from maven-war-plugin)
- overlay of modules and transitive AMP dependency packing.
-
- An AMP depending on one ore more AMP will package those AMP in the final product of the build:
- overlays can be configured same as in {{ http://maven.apache.org/plugins/maven-war-plugin/overlays.html }}.
- A plain zip UnArchiver is used for this overlay.
-
-
-
-AMP -> WAR Unarchiver
-
- The default UnArchiver (role-hint="amp") used by the default maven infrastructure for .amp files is a custom UnArchiver
- which behaves as the MMT, unarchiving AMPs in the proper places as dictated by {{{http://wiki.alfresco.com/wiki/AMP_Files} Alfresco AMP convention}} .
- This little component allows any plugin to manage .amp dependencies in case the maven-amp-plugin is declared with true in
- the current POM, basically supporting AMPs in Maven with no need for custom external tools like MMT.
-
- See {{ ${site_tags_url}/${site_pom_artifactId}-${site_pom_version}/src/main/resources/META-INF/plexus/components.xml }}
-
-
-AMP Artifact Handler
-
- Instructs maven which type of Archive is the AMP, providing info about its inclusion in the classpath or the fact that already contains
- its dependencies.
-
\ No newline at end of file
diff --git a/plugins/maven-amp-plugin/src/site/apt/index.apt.vm b/plugins/maven-amp-plugin/src/site/apt/index.apt.vm
deleted file mode 100644
index f9eb17a1..00000000
--- a/plugins/maven-amp-plugin/src/site/apt/index.apt.vm
+++ /dev/null
@@ -1,54 +0,0 @@
- -----
- Maven AMP Plugin
- -----
-
-
-
-
-Welcome to the Maven Alfresco AMP plugin home
-
- You've reached the ({{ ${site_pom_url} }}) Maven Alfresco Extension archetype home page (version: ${site_pom_version})
-
-
-
-Description
-
- ${site_pom_description}
-
-
-References
-
- Deployed at: {{ http://maven.alfresco.com/maven2/org/alfresco/maven/plugin }}
-
- Maven usage:
-
-
-------------------------------------------
-
-
- ${site_pom_groupId}
- ${site_pom_artifactId}
- ${site_pom_version}
-
- true
-
-
--------------------------------------------
-
-
- using this pluginRepository (either in POM or settings.xml) :
-
-
-------------------------------------------
-
-
- ss-public
- http://maven.alfresco.com/nexus/content/groups/public
-
-
--------------------------------------------
-
-
-Quick usage
-
- Create a project using the maven-alfresco-amp-archetype (see {{ http://maven.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/maven-alfresco-archetypes/maven-alfresco-amp-archetype/index.html }} ).
\ No newline at end of file
diff --git a/plugins/maven-amp-plugin/src/site/site.xml b/plugins/maven-amp-plugin/src/site/site.xml
deleted file mode 100644
index 55de6f3a..00000000
--- a/plugins/maven-amp-plugin/src/site/site.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
- org.apache.maven.skins
- maven-fluido-skin
- 1.2.1
-
-
-
- true
- true
-
- Maven Alfresco Lifecycle
- Maven Alfresco Lifecycle
- /img/Alfresco-logo-transparent.gif
- /index.html
-
-
- mindthegabz
- true
- true
-
-
-
-
-
-
-
-
-
-
-
- Maven AMP Plugin - v. ${project.version}
- ${site_site_url}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/maven-nosnapshot-plugin/pom.xml b/plugins/maven-nosnapshot-plugin/pom.xml
deleted file mode 100644
index 52c9ae2b..00000000
--- a/plugins/maven-nosnapshot-plugin/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
- 4.0.0
- org.alfresco.maven
- maven-nosnapshot-plugin
- maven-plugin
- 0.0.9-SNAPSHOT
- Custom version manipulator Maven Plugin
- It's non invasive and puts modified versions in configurable pom properties
-
- org.alfresco
- maven-alfresco-lifecycle
- 4.0.0-SNAPSHOT
- ../../pom.xml
-
-
-
- org.apache.maven
- maven-plugin-api
- 3.0.3
-
-
- junit
- junit
- 4.8.2
- test
-
-
- org.apache.maven
- maven-project
- 3.0-alpha-2
-
-
- org.apache.maven.plugin-testing
- maven-plugin-testing-harness
- 2.0-alpha-1
- test
-
-
-
-
diff --git a/plugins/maven-nosnapshot-plugin/src/main/java/org/alfresco/maven/StripMojo.java b/plugins/maven-nosnapshot-plugin/src/main/java/org/alfresco/maven/StripMojo.java
deleted file mode 100644
index 86baea63..00000000
--- a/plugins/maven-nosnapshot-plugin/src/main/java/org/alfresco/maven/StripMojo.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.alfresco.maven;
-
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-import java.text.MessageFormat;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-
-/**
- * Goal which pushes a stripped version number in the maven project properties,
- * removing the suffix after the configured separator into the project variable
- * noSnapshotVersion
- *
- * @goal strip
- * @phase initialize
- *
- */
-public class StripMojo extends AbstractMojo {
- private static final String RESULT_PROPERTY_NAME = "noSnapshotVersion";
-
- /**
- * Current version of the project
- *
- * @parameter expression="${project.version}" default-value="3.0.0-SNAPSHOT"
- * @required
- */
- private String version;
-
- public MavenProject getProject() {
- return project;
- }
-
- /**
- * The Maven project
- *
- * @parameter expression="${project}"
- * @required
- */
- private MavenProject project;
-
- /**
- * The separator used to identify and strip the suffix
- *
- * @parameter expression="${separator}" default-value="-"
- * @required
- */
- private String separator;
-
- /**
- * The Maven Projec property the stripped version is pushed into
- *
- * @parameter expression="${propertyName}" default-value="noSnapshotVersion"
- * @required
- */
- private String propertyName;
-
-
- public void execute() throws MojoExecutionException {
- int separatorIndex = version.indexOf(separator);
- String noSnapshotVersion = version;
- if (separatorIndex > -1) {
- noSnapshotVersion = version.substring(0, separatorIndex);
- }
- getLog().info(
- MessageFormat.format("Storing " + propertyName
- + ": {0} ", new Object[] { noSnapshotVersion }));
- project.getProperties().put(propertyName, noSnapshotVersion);
- }
-
- public String getPropertyName() {
- return propertyName;
- }
-
- public void setPropertyName(String propertyName) {
- this.propertyName = propertyName;
- }
-
- public void setSeparator(String separator) {
- this.separator = separator;
- }
-}
diff --git a/plugins/maven-nosnapshot-plugin/src/test/resources/customprop-pom.xml b/plugins/maven-nosnapshot-plugin/src/test/resources/customprop-pom.xml
deleted file mode 100644
index a19d1c8f..00000000
--- a/plugins/maven-nosnapshot-plugin/src/test/resources/customprop-pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- maven-nosnapshot-plugin
-
-
- -
- foobar
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/maven-nosnapshot-plugin/src/test/resources/relcandidate-pom.xml b/plugins/maven-nosnapshot-plugin/src/test/resources/relcandidate-pom.xml
deleted file mode 100644
index 0822cd88..00000000
--- a/plugins/maven-nosnapshot-plugin/src/test/resources/relcandidate-pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- maven-nosnapshot-plugin
-
-
- -
- noSnapshotVersion
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/maven-nosnapshot-plugin/src/test/resources/release-pom.xml b/plugins/maven-nosnapshot-plugin/src/test/resources/release-pom.xml
deleted file mode 100644
index 0822cd88..00000000
--- a/plugins/maven-nosnapshot-plugin/src/test/resources/release-pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- maven-nosnapshot-plugin
-
-
- -
- noSnapshotVersion
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/maven-nosnapshot-plugin/src/test/resources/snapshot-pom.xml b/plugins/maven-nosnapshot-plugin/src/test/resources/snapshot-pom.xml
deleted file mode 100644
index 13b3851f..00000000
--- a/plugins/maven-nosnapshot-plugin/src/test/resources/snapshot-pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- maven-nosnapshot-plugin
-
- -
- noSnapshotVersion
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/maven-nosnapshot-plugin/src/test/resources/underscore-pom.xml b/plugins/maven-nosnapshot-plugin/src/test/resources/underscore-pom.xml
deleted file mode 100644
index 0436b22b..00000000
--- a/plugins/maven-nosnapshot-plugin/src/test/resources/underscore-pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- maven-nosnapshot-plugin
-
-
- _
- noSnapshotVersion
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index e76a826e..00000000
--- a/pom.xml
+++ /dev/null
@@ -1,233 +0,0 @@
-
- 4.0.0
- org.alfresco
- maven-alfresco-lifecycle
- pom
- 4.0.0-SNAPSHOT
- Maven Alfresco Lifecycle support base project
- https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle
-
-This project is meant to gather all commons configurations, plugins and archetypes for the full Maven Alfresco lifecycle support.
-It gathers the latest stable versions of the different components that are used to support Alfresco development on Maven in enterprise and
-community contexts.
-
-
- GoogleCode
- http://code.google.com/p/maven-alfresco-archetypes/issues/detail
-
-
- Alfresco
- http://www.alfresco.com
-
-
- maven-alfresco-archetypes
- plugins/maven-amp-plugin
- plugins/maven-nosnapshot-plugin
-
-
- https://maven-alfresco-archetypes.googlecode.com/svn
- ${svn.base.url}/trunk
- ${svn.base.url}/tags
-
- ${project.description}
- ${project.url}
- ${project.groupId}
- ${project.artifactId}
- ${project.version}
- ${svn.tags.url}
- ${project.url}
- UTF-8
-
-
- scm:svn:https://maven-alfresco-archetypes.googlecode.com/svn/trunk
- scm:svn:https://maven-alfresco-archetypes.googlecode.com/svn/trunk
- https://maven-alfresco-archetypes.googlecode.com/svn/trunk
-
-
-
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
-
- alfresco-public-snapshots
- https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
-
- true
- daily
-
-
-
-
-
- alfresco-public
- https://artifacts.alfresco.com/nexus/content/groups/public
-
-
- alfresco-public-snapshots
- https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
-
- true
- daily
-
-
-
-
-
- columbro
- Gabriele Columbro
- gabriele.columbro@alfresco.com
-
- Founder
- Alfresco Principal Architect
- Developer
-
- Alfresco
- http://www.alfresco.com
-
-
- maurizio@session.it
- Maurizio Pillitu
- maurizio.pillitu@alfresco.com
- Alfresco
- http://www.alfresco.com
-
- Alfresco Technical Consultant
- Agile Maestro
-
-
-
- carlo.sciolla
- Carlo Sciolla
- Backbase
-
- Developer
-
-
-
-
-
- Maven Alfresco Google Group
- http://groups.google.com/group/maven-alfresco
- http://groups.google.com/group/maven-alfresco/subscribe
-
-
-
-
-
- maven-compiler-plugin
- 2.3.2
-
- 1.6
- 1.6
-
-
-
- maven-site-plugin
- 3.0
-
-
- org.apache.maven.plugins
- maven-changes-plugin
- 2.6
-
-
-
- custom-announcement.vm
- announcements
- ${smtp.server}
- ${smtp.port}
-
- maven-alfresco@googlegroups.com
- announce@maven.apache.org
-
- ${smtp.username}
- ${smtp.password}
- ${smtp.sslMode}
- columbro
- ${project.url}/index.html
-
-
-
- org.apache.maven.plugins
- maven-release-plugin
-
-
- clean package
- deploy site-deploy
- ${svn.tags.url}
- false
-
-
-
-
-
- org.apache.maven.wagon
- wagon-webdav-jackrabbit
- 1.0
-
-
-
-
-
-
- maven-compiler-plugin
- 2.3.2
-
- 1.6
- 1.6
-
-
-
- maven-surefire-report-plugin
- 2.9
-
-
-
- report-only
-
-
-
-
-
- maven-javadoc-plugin
- 2.8
-
-
- maven-changes-plugin
- 2.6
-
-
-
- changes-report
-
-
-
-
-
-
-
-
- alfresco-releases
- https://artifacts.alfresco.com/nexus/content/repositories/releases
-
-
- alfresco snapshots repository
- alfresco-snapshots
- https://artifacts.alfresco.com/nexus/content/repositories/snapshots
-
-
- alfresco-docs
- dav:https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest
-
-
-
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
deleted file mode 100644
index eb8588e9..00000000
--- a/src/changes/changes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
- Maven Alfresco Lifecycle
- Gabriele Columbro
-
-
-
- Fixed all existing defects to date in Google Code. See http://code.google.com/p/maven-alfresco-archetypes/issues/list?q=label:Milestone-Release391 for details
- Updated and released maven-alfresco-lifecycle and maven-alfresco-archetypes to version 3.9.1
- Updated and released maven-amp-plugin to version 3.0.4
- Updated and released maven-nosnapshot-plugin to version 0.0.8
- Removed all com.sourcesense references
-
-
-
-
- Moved all the archetypes to work against http://maven.alfresco.com
-
-
- Added support for Alfresco SHARE archetype
-
-
- Updated documentation to point to the new infrastructure
-
-
-
-
- Linked all sub modules.
-
-
- Added this wrapper project to group all Maven Alfresco plugins and archetype useful for the Maven Alfresco Lifecycle support
-
-
-
-
diff --git a/src/main/resources/announcements/custom-announcement.vm b/src/main/resources/announcements/custom-announcement.vm
deleted file mode 100644
index 7de60b8a..00000000
--- a/src/main/resources/announcements/custom-announcement.vm
+++ /dev/null
@@ -1,133 +0,0 @@
-## 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.
-The ${developmentTeam} is pleased to announce the ${finalName} release!
-
-${introduction}
-
-See all the different components at the following links:
-- maven-alfresco-archetypes: ${project.url}/maven-alfresco-archetypes/index.html
-- maven-amp-plugin: ${project.url}/plugins/maven-amp-plugin/index.html
-- maven-nosnpashot-plugin: ${project.url}/plugins/maven-nosnapshot-plugin/index.html
-
-See also the Alfresco wiki documentation: http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven.
-
-#if ($release.getActions().size() == 0)
-No changes defined in this version.
-#else
-Changes in this version include:
-
-#if ($release.getActions('add').size() !=0)
-New features:
-#foreach($actionItem in $release.getActions('add'))
-#set($action=$actionItem.getAction())
-#if ($actionItem.getIssue())
-#set($issue=$actionItem.getIssue())
-#else
-#set($issue="")
-#end
-#if ($actionItem.getDueTo())
-#set($dueto=$actionItem.getDueTo())
-#else
-#set($dueto="")
-#end
-o ${action} #if($!issue != "") Issue: $issue. #end#if($!dueto != "")Thanks to $dueto. #end
-
-#set($issue="")
-#set($dueto="")
-#end
-#end
-
-#if ($release.getActions('fix').size() !=0)
-Fixed Bugs:
-#foreach($actionItem in $release.getActions('fix'))
-#set($action=$actionItem.getAction())
-#if ($actionItem.getIssue())
-#set($issue=$actionItem.getIssue())
-#else
-#set($issue="")
-#end
-#if ($actionItem.getDueTo())
-#set($dueto=$actionItem.getDueTo())
-#else
-#set($dueto="")
-#end
-o ${action} #if($!issue != "") Issue: $issue. #end#if($!dueto != "")Thanks to $dueto. #end
-
-#set($issue="")
-#set($dueto="")
-#end
-#end
-
-#if ($release.getActions('update').size() !=0)
-Changes:
-#foreach($actionItem in $release.getActions('update'))
-#set($action=$actionItem.getAction())
-#if ($actionItem.getIssue())
-#set($issue=$actionItem.getIssue())
-#else
-#set($issue="")
-#end
-#if ($actionItem.getDueTo())
-#set($dueto=$actionItem.getDueTo())
-#else
-#set($dueto="")
-#end
-o ${action} #if($!issue != "") Issue: $issue. #end#if($!dueto != "")Thanks to $dueto. #end
-
-#set($issue="")
-#set($dueto="")
-#end
-#end
-
-#if ($release.getActions('remove').size() !=0)
-Removed:
-#foreach($actionItem in $release.getActions('remove'))
-#set($action=$actionItem.getAction())
-#if ($actionItem.getIssue())
-#set($issue=$actionItem.getIssue())
-#else
-#set($issue="")
-#end
-#if ($actionItem.getDueTo())
-#set($dueto=$actionItem.getDueTo())
-#else
-#set($dueto="")
-#end
-o ${action} #if($!issue != "") Issue: $issue. #end#if($!dueto != "")Thanks to $dueto. #end
-
-#set($issue="")
-#set($dueto="")
-#end
-#end
-## End of main loop
-#end
-See also specific modules changes for the latest release:
-
-maven-alfresco-amp-archetype: ${project.url}/maven-alfresco-archetypes/maven-alfresco-amp-archetype/changes-report.html
-maven-alfresco-extension-archetype: ${project.url}/maven-alfresco-archetypes/maven-alfresco-extension-archetype/changes-report.html
-maven-alfresco-share-archetype: ${project.url}/maven-alfresco-archetypes/maven-alfresco-share-archetype/changes-report.html
-maven-amp-plugin: ${project.url}/plugins/maven-amp-plugin/changes-report.html
-
-#if ($urlDownload)
-
-For a manual installation, you can download the ${finalName} here:
-${urlDownload}
-
-#end
-
-Have fun!
--${developmentTeam}
diff --git a/src/main/resources/archetype-resources/jetty/jetty-env.xml b/src/main/resources/archetype-resources/jetty/jetty-env.xml
deleted file mode 100644
index 7f1270c1..00000000
--- a/src/main/resources/archetype-resources/jetty/jetty-env.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
- jdbc/dataSource
-
-
- jdbc:mysql://${alfresco.db.url}/${alfresco.db.name}
- ${alfresco.db.username}
- ${alfresco.db.password}
-
-
-
-
-
diff --git a/src/site/resources/css/site.css b/src/site/resources/css/site.css
deleted file mode 100644
index 5845334f..00000000
--- a/src/site/resources/css/site.css
+++ /dev/null
@@ -1 +0,0 @@
-.pippo {}
diff --git a/src/site/resources/img/Alfresco-logo-transparent.gif b/src/site/resources/img/Alfresco-logo-transparent.gif
deleted file mode 100644
index ec36f987..00000000
Binary files a/src/site/resources/img/Alfresco-logo-transparent.gif and /dev/null differ
diff --git a/src/site/site.xml b/src/site/site.xml
deleted file mode 100644
index bcf16d8e..00000000
--- a/src/site/site.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
- org.apache.maven.skins
- maven-fluido-skin
- 1.2.1
-
-
-
- true
- true
-
- Maven Alfresco Lifecycle
- Maven Alfresco Lifecycle
- /img/Alfresco-logo-transparent.gif
- /index.html
-
-
- mindthegabz
- true
- true
-
-
-
-
-
-
-
-
-
-
-
- Maven Alfresco Lifecycle - v. ${project.version}
- http://www.alfresco.com
- img/Alfresco-logo-transparent.gif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-