diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/alfresco-allinone-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
index 48bd1196..0d702fec 100644
--- a/archetypes/alfresco-allinone-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/archetypes/alfresco-allinone-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -1,144 +1,149 @@
-
-
-
- 1.0-SNAPSHOT
-
-
- org.alfresco
-
-
- @@alfresco.community.default.version@@
-
-
- (not used)
-
-
-
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- src/test/java
-
- **/*.java
-
-
-
- src/main/amp
-
- **
-
-
-
- src/main/amp/config/alfresco/extension/templates/webscripts
-
-
- src/test/resources
-
- **
-
-
-
- src/test/properties
-
- **/*.properties
-
-
-
-
+
+
+
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+ src/test/java
+
+ **/*.java
+
+
+
+ src/main/amp
+
+ **
+
+
+ **/*-context.xml
+
+
+
+ src/main/amp
+
+ **/*-context.xml
+
+
+
+ src/test/resources
+
+ **
+
+
+
+ src/test/properties
+
+ **/*.properties
+
+
+
+
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- src/main/amp
-
- **
-
-
-
- src/test/resources
-
- **
-
-
-
- src/main/resources
-
- **
-
-
-
-
-
-
-
-
- src/main/properties
-
- **/*.properties
-
-
-
- src/main/resources
-
- **
-
-
-
-
-
-
-
-
-
-
-
- src/main/resources
-
- **
-
-
-
-
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+ src/test/java
+
+ **/*.java
+
+
+
+ src/main/amp
+
+ **
+
+
+
+ src/test/resources
+
+ **
+
+
+
+ src/main/resources
+
+ **
+
+
+
+
-
-
-
- tomcat
-
- **
-
-
-
- src/main/webapp
-
- **
-
-
-
-
-
+
+
+
+ src/main/properties
+
+ **/*.properties
+
+
+
+ src/main/resources
+
+ **
+
+
+
+
-
-
-
-
- run.sh
-
-
-
+
+
+
+
+
+
+ src/main/resources
+
+ **
+
+
+
+
+
+
+
+
+ tomcat
+
+ **
+
+
+
+ src/main/webapp
+
+ **
+
+
+
+
+
+
+
+
+
+
+ run.sh
+
+
+
diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml
index 186cddbc..4e79f89e 100644
--- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml
@@ -5,9 +5,8 @@
${groupId}
${artifactId}
${version}
- Alfresco Repository and Share Quickstart with database and an embedded runner.
- This All-in-One project allows to manage all the components involved in Alfresco development (Repo,
- Share, Solr4, AMPs) in one project
+ Alfresco Repository and Share Quickstart with database and an embedded Tomcat runner.
+ This All-in-One project allows to manage all the components involved in Alfresco development (Repo, Share, Solr4, AMPs) in one project
pom
@@ -24,15 +23,18 @@
-->
-
-
+ Uncomment if you need to change
+ ${alfresco.community.default.version}
+ ${alfresco.data.location} -->
-
- WARN
+
-
+
diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/amp/config/alfresco/module/__artifactId__/context/bootstrap-context.xml b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/amp/config/alfresco/module/__artifactId__/context/bootstrap-context.xml
index e5421cc0..0060701c 100644
--- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/amp/config/alfresco/module/__artifactId__/context/bootstrap-context.xml
+++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/amp/config/alfresco/module/__artifactId__/context/bootstrap-context.xml
@@ -1,3 +1,6 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
-
+
alfresco/module/${project.artifactId}/model/content-model.xml
diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/amp/config/alfresco/module/__artifactId__/context/service-context.xml b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/amp/config/alfresco/module/__artifactId__/context/service-context.xml
index 44199812..ba53e66a 100644
--- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/amp/config/alfresco/module/__artifactId__/context/service-context.xml
+++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/amp/config/alfresco/module/__artifactId__/context/service-context.xml
@@ -1,29 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
-
-
+
-
+
diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/org/alfresco/demoamp/Demo.java b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/demoamp/Demo.java
similarity index 67%
rename from archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/org/alfresco/demoamp/Demo.java
rename to archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/demoamp/Demo.java
index bf31080a..1a20a2b8 100644
--- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/org/alfresco/demoamp/Demo.java
+++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/demoamp/Demo.java
@@ -1,4 +1,7 @@
-package org.alfresco.demoamp;
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.demoamp;
/**
* This class does nothing except dump some output to system.out.
diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/org/alfresco/demoamp/DemoComponent.java b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/demoamp/DemoComponent.java
similarity index 56%
rename from archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/org/alfresco/demoamp/DemoComponent.java
rename to archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/demoamp/DemoComponent.java
index 45896271..fea98ebc 100644
--- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/org/alfresco/demoamp/DemoComponent.java
+++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/main/java/demoamp/DemoComponent.java
@@ -1,20 +1,23 @@
+#set($symbol_pound='#')
+#set($symbol_dollar='$')
+#set($symbol_escape='\' )
/*
- 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;
+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 ${package}.demoamp;
import org.alfresco.repo.module.AbstractModuleComponent;
import org.alfresco.repo.nodelocator.NodeLocatorService;
@@ -25,54 +28,51 @@ import org.apache.commons.logging.LogFactory;
/**
* A basic component that will be started for this module.
- * Uses the NodeLocatorService to easily find nodes and the
+ * Uses the NodeLocatorService to easily find nodes and the
* NodeService to display them
- *
+ *
* @author Gabriele Columbro
* @author Maurizio Pillitu
*/
-public class DemoComponent extends AbstractModuleComponent
-{
+public class DemoComponent extends AbstractModuleComponent {
Log log = LogFactory.getLog(DemoComponent.class);
-
+
private NodeService nodeService;
-
+
private NodeLocatorService nodeLocatorService;
public void setNodeService(NodeService nodeService) {
this.nodeService = nodeService;
}
-
+
public void setNodeLocatorService(NodeLocatorService nodeLocatorService) {
this.nodeLocatorService = nodeLocatorService;
}
/**
- * Bogus component execution
+ * Bogus component execution
*/
@Override
- protected void executeInternal() throws Throwable
- {
+ protected void executeInternal() throws Throwable {
System.out.println("DemoComponent has been executed");
log.debug("Test debug logging. Congratulation your AMP is working");
log.info("This is only for information purposed. Better remove me from the log in Production");
}
-
+
/**
* This is a demo service interaction with Alfresco Foundation API.
- * This sample method returns the number of child nodes of a certain type
+ * This sample method returns the number of child nodes of a certain type
* under a certain node.
- *
+ *
* @return
*/
- public int childNodesCount(NodeRef nodeRef)
- {
+ public int childNodesCount(NodeRef nodeRef) {
return nodeService.countChildAssocs(nodeRef, true);
}
-
+
/**
* Returns the NodeRef of "Company Home"
- *
+ *
* @return
*/
public NodeRef getCompanyHome()
diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/java/org/alfresco/demoamp/test/DemoComponentTest.java b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/test/java/demoamp/test/DemoComponentTest.java
similarity index 95%
rename from archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/java/org/alfresco/demoamp/test/DemoComponentTest.java
rename to archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/test/java/demoamp/test/DemoComponentTest.java
index cbbfae4c..b0b95251 100644
--- a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/java/org/alfresco/demoamp/test/DemoComponentTest.java
+++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/test/java/demoamp/test/DemoComponentTest.java
@@ -1,11 +1,12 @@
-package org.alfresco.demoamp.test;
-
+#set($symbol_pound='#')
+#set($symbol_dollar='$')
+#set($symbol_escape='\' )
+package ${package}.demoamp.test;
import static org.junit.Assert.assertEquals;
-
import static org.junit.Assert.assertNotNull;
-import org.alfresco.demoamp.DemoComponent;
+import ${package}.demoamp.DemoComponent;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -41,7 +42,6 @@ import com.tradeshift.test.remote.RemoteTestRunner;
* @author Maurizio Pillitu
*
*/
-
@RunWith(RemoteTestRunner.class)
@Remote(runnerClass=SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:alfresco/application-context.xml")
diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/share-amp/src/main/amp/config/alfresco/web-extension/site-data/extensions/README.md b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/share-amp/src/main/amp/config/alfresco/web-extension/site-data/extensions/README.md
deleted file mode 100644
index c6018967..00000000
--- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/share-amp/src/main/amp/config/alfresco/web-extension/site-data/extensions/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-## If you are overriding existing pages/components put these extension modules here.
-## If you are defining new extensions add them under resources/alfresco/site-data.
-##
-
diff --git a/archetypes/alfresco-allinone-archetype/src/test/resources/projects/it/archetype.properties b/archetypes/alfresco-allinone-archetype/src/test/resources/projects/it/archetype.properties
index 8449ed50..bb29b5a4 100644
--- a/archetypes/alfresco-allinone-archetype/src/test/resources/projects/it/archetype.properties
+++ b/archetypes/alfresco-allinone-archetype/src/test/resources/projects/it/archetype.properties
@@ -1,6 +1,4 @@
-package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
artifactId=allInOneTest
-alfresco_target_groupId=org.alfresco
-alfresco_target_version=5.0.c
+package=it.pkg
\ No newline at end of file
diff --git a/archetypes/alfresco-allinone-archetype/src/test/resources/projects/run-enterprise/archetype.properties b/archetypes/alfresco-allinone-archetype/src/test/resources/projects/run-enterprise/archetype.properties
index d5b47f6f..1905d902 100644
--- a/archetypes/alfresco-allinone-archetype/src/test/resources/projects/run-enterprise/archetype.properties
+++ b/archetypes/alfresco-allinone-archetype/src/test/resources/projects/run-enterprise/archetype.properties
@@ -1,6 +1,5 @@
-package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
-artifactId=allInOneTest
-alfresco_target_groupId=org.alfresco
-alfresco_target_version=5.0
+artifactId=allInOneTestRunEnterprise
+package=it.pkg
+
diff --git a/archetypes/alfresco-allinone-archetype/src/test/resources/projects/run/archetype.properties b/archetypes/alfresco-allinone-archetype/src/test/resources/projects/run/archetype.properties
index 8449ed50..642aa2ce 100644
--- a/archetypes/alfresco-allinone-archetype/src/test/resources/projects/run/archetype.properties
+++ b/archetypes/alfresco-allinone-archetype/src/test/resources/projects/run/archetype.properties
@@ -1,6 +1,4 @@
-package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
-artifactId=allInOneTest
-alfresco_target_groupId=org.alfresco
-alfresco_target_version=5.0.c
+artifactId=allInOneTestRun
+package=it.pkg
diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
index 4ea25e04..df8b9c3b 100644
--- a/archetypes/alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/archetypes/alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -1,63 +1,65 @@
-
-
-
- 1.0-SNAPSHOT
-
-
- org.alfresco
-
-
- @@alfresco.community.default.version@@
-
-
- (not used)
-
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- src/main/amp
-
- **/**
-
-
-
- src/test/java
-
- **/*.java
-
-
-
- src/test/resources
-
- **/*
-
-
-
- src/test/properties
-
- **/*
-
-
-
- tomcat
-
- **/*.xml
-
-
-
-
-
- run.sh
-
-
-
+
+
+
+ 1.0-SNAPSHOT
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+ src/test/java
+
+ **/*.java
+
+
+
+ src/main/amp
+
+ **
+
+
+ **/*-context.xml
+
+
+
+ src/main/amp
+
+ **/*-context.xml
+
+
+
+ src/test/resources
+
+ **/*
+
+
+
+ src/test/properties
+
+ **/*
+
+
+
+ tomcat
+
+ **/*.xml
+
+
+
+
+
+ run.sh
+
+
+
diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/pom.xml b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/pom.xml
index ecd1f9b1..479a535f 100644
--- a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/pom.xml
@@ -21,17 +21,18 @@
For more available properties see the alfresco-sdk-parent POM.
-->
-
+
diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/module/__artifactId__/context/bootstrap-context.xml b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/module/__artifactId__/context/bootstrap-context.xml
index e5421cc0..96b136c4 100644
--- a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/module/__artifactId__/context/bootstrap-context.xml
+++ b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/module/__artifactId__/context/bootstrap-context.xml
@@ -1,3 +1,6 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
-
+
alfresco/module/${project.artifactId}/model/content-model.xml
alfresco/module/${project.artifactId}/model/workflow-model.xml
-
diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/module/__artifactId__/context/service-context.xml b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/module/__artifactId__/context/service-context.xml
index 10441e94..22bbbe4c 100644
--- a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/module/__artifactId__/context/service-context.xml
+++ b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/module/__artifactId__/context/service-context.xml
@@ -1,28 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
-
-
+
-
-
+
+
-
+
diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/demoamp/Demo.java b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/demoamp/Demo.java
new file mode 100644
index 00000000..1a20a2b8
--- /dev/null
+++ b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/demoamp/Demo.java
@@ -0,0 +1,18 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.demoamp;
+
+/**
+ * This class does nothing except dump some output to system.out.
+ * This is a sample taken from Maven Alfresco SDK
+ *
+ * @author Derek Hulley
+ */
+public class Demo
+{
+ public void init()
+ {
+ System.out.println("SDK Demo AMP class has been loaded");
+ }
+}
diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/DemoComponent.java b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/demoamp/DemoComponent.java
similarity index 56%
rename from archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/DemoComponent.java
rename to archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/demoamp/DemoComponent.java
index 45896271..fea98ebc 100644
--- a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/DemoComponent.java
+++ b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/demoamp/DemoComponent.java
@@ -1,20 +1,23 @@
+#set($symbol_pound='#')
+#set($symbol_dollar='$')
+#set($symbol_escape='\' )
/*
- 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;
+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 ${package}.demoamp;
import org.alfresco.repo.module.AbstractModuleComponent;
import org.alfresco.repo.nodelocator.NodeLocatorService;
@@ -25,54 +28,51 @@ import org.apache.commons.logging.LogFactory;
/**
* A basic component that will be started for this module.
- * Uses the NodeLocatorService to easily find nodes and the
+ * Uses the NodeLocatorService to easily find nodes and the
* NodeService to display them
- *
+ *
* @author Gabriele Columbro
* @author Maurizio Pillitu
*/
-public class DemoComponent extends AbstractModuleComponent
-{
+public class DemoComponent extends AbstractModuleComponent {
Log log = LogFactory.getLog(DemoComponent.class);
-
+
private NodeService nodeService;
-
+
private NodeLocatorService nodeLocatorService;
public void setNodeService(NodeService nodeService) {
this.nodeService = nodeService;
}
-
+
public void setNodeLocatorService(NodeLocatorService nodeLocatorService) {
this.nodeLocatorService = nodeLocatorService;
}
/**
- * Bogus component execution
+ * Bogus component execution
*/
@Override
- protected void executeInternal() throws Throwable
- {
+ protected void executeInternal() throws Throwable {
System.out.println("DemoComponent has been executed");
log.debug("Test debug logging. Congratulation your AMP is working");
log.info("This is only for information purposed. Better remove me from the log in Production");
}
-
+
/**
* This is a demo service interaction with Alfresco Foundation API.
- * This sample method returns the number of child nodes of a certain type
+ * This sample method returns the number of child nodes of a certain type
* under a certain node.
- *
+ *
* @return
*/
- public int childNodesCount(NodeRef nodeRef)
- {
+ public int childNodesCount(NodeRef nodeRef) {
return nodeService.countChildAssocs(nodeRef, true);
}
-
+
/**
* Returns the NodeRef of "Company Home"
- *
+ *
* @return
*/
public NodeRef getCompanyHome()
diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/Demo.java b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/main/java/org/alfresco/demoamp/Demo.java
deleted file mode 100644
index 402f7195..00000000
--- a/archetypes/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.
- * NB: This code is taken from Alfresco Eclipse SDK Samples
- * @author Derek Hulley
- */
-public class Demo
-{
- public void init()
- {
- System.out.println("SDK Demo AMP class has been loaded");
- }
-}
diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/test/java/org/alfresco/demoamp/test/DemoComponentTest.java b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/java/demoamp/test/DemoComponentTest.java
similarity index 95%
rename from archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/test/java/org/alfresco/demoamp/test/DemoComponentTest.java
rename to archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/java/demoamp/test/DemoComponentTest.java
index cbbfae4c..b0b95251 100644
--- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo-amp/src/test/java/org/alfresco/demoamp/test/DemoComponentTest.java
+++ b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/src/test/java/demoamp/test/DemoComponentTest.java
@@ -1,11 +1,12 @@
-package org.alfresco.demoamp.test;
-
+#set($symbol_pound='#')
+#set($symbol_dollar='$')
+#set($symbol_escape='\' )
+package ${package}.demoamp.test;
import static org.junit.Assert.assertEquals;
-
import static org.junit.Assert.assertNotNull;
-import org.alfresco.demoamp.DemoComponent;
+import ${package}.demoamp.DemoComponent;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -41,7 +42,6 @@ import com.tradeshift.test.remote.RemoteTestRunner;
* @author Maurizio Pillitu
*
*/
-
@RunWith(RemoteTestRunner.class)
@Remote(runnerClass=SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:alfresco/application-context.xml")
diff --git a/archetypes/alfresco-amp-archetype/src/test/resources/projects/basic/archetype.properties b/archetypes/alfresco-amp-archetype/src/test/resources/projects/basic/archetype.properties
index 5ca4d2ac..8651fd9d 100644
--- a/archetypes/alfresco-amp-archetype/src/test/resources/projects/basic/archetype.properties
+++ b/archetypes/alfresco-amp-archetype/src/test/resources/projects/basic/archetype.properties
@@ -1,11 +1,5 @@
-#Tue Oct 30 14:23:01 CET 2012
-package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
-alfresco_target_version=5.0.c
-$=cat archetype.properties
-alfresco_target_groupId=org.alfresco
-alfresco_target_amp_client_war=alfresco
-alfresco_target_amp_client_war_groupId=org.alfresco
-alfresco_target_amp_client_war_version=5.0.c
-artifactId=basic
+artifactId=repoAmpTest
+package=it.pkg
+
diff --git a/archetypes/alfresco-amp-archetype/src/test/resources/projects/run-basic/archetype.properties b/archetypes/alfresco-amp-archetype/src/test/resources/projects/run-basic/archetype.properties
index 5ca4d2ac..254fcf56 100644
--- a/archetypes/alfresco-amp-archetype/src/test/resources/projects/run-basic/archetype.properties
+++ b/archetypes/alfresco-amp-archetype/src/test/resources/projects/run-basic/archetype.properties
@@ -1,11 +1,4 @@
-#Tue Oct 30 14:23:01 CET 2012
-package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
-alfresco_target_version=5.0.c
-$=cat archetype.properties
-alfresco_target_groupId=org.alfresco
-alfresco_target_amp_client_war=alfresco
-alfresco_target_amp_client_war_groupId=org.alfresco
-alfresco_target_amp_client_war_version=5.0.c
-artifactId=basic
+artifactId=repoAmpTestRun
+package=it.pkg
\ No newline at end of file
diff --git a/archetypes/alfresco-amp-archetype/src/test/resources/projects/run-enterprise/archetype.properties b/archetypes/alfresco-amp-archetype/src/test/resources/projects/run-enterprise/archetype.properties
index e3b58dea..190010f3 100644
--- a/archetypes/alfresco-amp-archetype/src/test/resources/projects/run-enterprise/archetype.properties
+++ b/archetypes/alfresco-amp-archetype/src/test/resources/projects/run-enterprise/archetype.properties
@@ -1,8 +1,4 @@
-#Tue Oct 30 14:23:01 CET 2012
-groupId=archetype.it
-artifactId=enterprise
version=0.1-SNAPSHOT
+groupId=archetype.it
+artifactId=repoAmpTestRunEnterprise
package=it.pkg
-$=cat archetype.properties
-alfresco_target_groupId=org.alfresco
-alfresco_target_version=5.0
diff --git a/archetypes/share-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/share-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
index 20f71e8f..b721c89c 100644
--- a/archetypes/share-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/archetypes/share-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -1,96 +1,62 @@
-
-
-
- 1.0-SNAPSHOT
-
-
- org.alfresco
-
-
- @@alfresco.community.default.version@@
-
-
- (not used)
-
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- src/main/amp
-
- **/*
- **/*.xml
- **/*.properties
- **/*.txt
-
-
-
- src/main/resources
-
- **/*
-
-
-
- src/main/amp
-
- **/*.js
- **/*.css
-
-
-
- src/main/amp/config/alfresco/module/__artifactId__
-
-
-
- src/main/amp/web
-
-
- src/main/amp/web/themes
-
-
- src/main/amp/web/js
-
-
- src/main/amp/web/components
-
-
-
- src/test/java
-
- **/*.java
-
-
-
- src/test/resources
-
- **/*
-
-
-
- src/test/properties
-
- **/*
-
-
-
- tomcat
-
- **/*.xml
-
-
-
-
-
- run.sh
-
-
-
+
+
+
+ 1.0-SNAPSHOT
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+ src/test/java
+
+ **/*.java
+
+
+
+ src/main/amp
+
+ **
+
+
+
+ src/test/resources
+
+ **
+
+
+
+ src/main/resources
+
+ **
+
+
+
+ src/test/properties
+
+ **/*
+
+
+
+ tomcat
+
+ **/*.xml
+
+
+
+
+
+ run.sh
+
+
+
diff --git a/archetypes/share-amp-archetype/src/main/resources/archetype-resources/pom.xml b/archetypes/share-amp-archetype/src/main/resources/archetype-resources/pom.xml
index ff660e85..bbfc9a36 100644
--- a/archetypes/share-amp-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/share-amp-archetype/src/main/resources/archetype-resources/pom.xml
@@ -21,16 +21,16 @@
For more available properties see the alfresco-sdk-parent POM.
-->
-
+
@@ -38,10 +38,10 @@
defaults to the alfresco.war artifact ID, so we need to override here. -->
${alfresco.share.artifactId}
-
+
8081
-
+
http://localhost:8080/alfresco
diff --git a/archetypes/share-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-data/extensions/README.md b/archetypes/share-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-data/extensions/README.md
deleted file mode 100644
index c6018967..00000000
--- a/archetypes/share-amp-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-data/extensions/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-## If you are overriding existing pages/components put these extension modules here.
-## If you are defining new extensions add them under resources/alfresco/site-data.
-##
-
diff --git a/archetypes/share-amp-archetype/src/test/resources/projects/basic/archetype.properties b/archetypes/share-amp-archetype/src/test/resources/projects/basic/archetype.properties
index ffc63a75..6cebf61d 100644
--- a/archetypes/share-amp-archetype/src/test/resources/projects/basic/archetype.properties
+++ b/archetypes/share-amp-archetype/src/test/resources/projects/basic/archetype.properties
@@ -1,11 +1,4 @@
-#Tue Oct 30 14:23:01 CET 2012
-package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
-alfresco_target_version=5.0.c
-$=cat archetype.properties
-alfresco_target_groupId=org.alfresco
-alfresco_target_amp_client_war=share
-alfresco_target_amp_client_war_groupId=org.alfresco
-alfresco_target_amp_client_war_version=5.0.c
-artifactId=basic
+artifactId=shareAmpTest
+package=it.pkg
diff --git a/archetypes/share-amp-archetype/src/test/resources/projects/run-basic/archetype.properties b/archetypes/share-amp-archetype/src/test/resources/projects/run-basic/archetype.properties
index ffc63a75..a54484af 100644
--- a/archetypes/share-amp-archetype/src/test/resources/projects/run-basic/archetype.properties
+++ b/archetypes/share-amp-archetype/src/test/resources/projects/run-basic/archetype.properties
@@ -1,11 +1,4 @@
-#Tue Oct 30 14:23:01 CET 2012
-package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
-alfresco_target_version=5.0.c
-$=cat archetype.properties
-alfresco_target_groupId=org.alfresco
-alfresco_target_amp_client_war=share
-alfresco_target_amp_client_war_groupId=org.alfresco
-alfresco_target_amp_client_war_version=5.0.c
-artifactId=basic
+artifactId=shareAmpTestRun
+package=it.pkg
diff --git a/archetypes/share-amp-archetype/src/test/resources/projects/run-enterprise/archetype.properties b/archetypes/share-amp-archetype/src/test/resources/projects/run-enterprise/archetype.properties
index fd997c68..1d02ea6e 100644
--- a/archetypes/share-amp-archetype/src/test/resources/projects/run-enterprise/archetype.properties
+++ b/archetypes/share-amp-archetype/src/test/resources/projects/run-enterprise/archetype.properties
@@ -1,8 +1,4 @@
-#Tue Oct 30 14:23:01 CET 2012
-groupId=archetype.it
-artifactId=basic
version=0.1-SNAPSHOT
-$=cat archetype.properties
+groupId=archetype.it
+artifactId=shareAmpTestRunEnterprise
package=it.pkg
-alfresco_target_groupId=org.alfresco
-alfresco_target_version=5.0