From 07bb743cfdfac2c99088b3d6cbc6c720c411ea46 Mon Sep 17 00:00:00 2001 From: Ole Hejlskov Date: Fri, 24 Mar 2017 15:09:59 +0100 Subject: [PATCH] Tidy up default pom --- .../__rootArtifactId__-share-jar/pom.xml | 2 +- .../resources/archetype-resources/pom.xml | 3 -- .../resources/archetype-resources/pom.xml | 2 - .../resources/archetype-resources/pom.xml | 3 +- .../resources/share-hotswap-agent.properties | 48 +++++++++++++++++++ .../maven/plugin/AbstractRunMojo.java | 2 +- 6 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/share-hotswap-agent.properties diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/pom.xml b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/pom.xml index 5e224fe7..5a1cfbe4 100644 --- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/pom.xml +++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/pom.xml @@ -22,7 +22,7 @@ ${alfresco.groupId} - ${alfresco.share.war.artifactId} + share classes 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 34c54183..a35bded9 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 @@ -30,9 +30,6 @@ org.alfresco - share - - alfresco-platform org.alfresco - - alfresco-platform org.alfresco - share ${alfresco.groupId} - ${alfresco.share.war.artifactId} + share ${alfresco.share.version} classes provided diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/share-hotswap-agent.properties b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/share-hotswap-agent.properties new file mode 100644 index 00000000..53bb2639 --- /dev/null +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/share-hotswap-agent.properties @@ -0,0 +1,48 @@ +# Enable hotswap so that changes in this module will be automatically reloaded +# Watch for changed class files on watchResources path and reload class definition in the running application. +autoHotswap=true +#autoHotswap.port=8000 + +# Add a directory prior to application classpath (load classes and resources). +# +# This may be useful for example in multi module maven project to load class changes from upstream project +# classes. Set extraClasspath to upstream project compiler output and .class file will have precedence to +# classes from built JAR file. +# i.e. monitor /target/classes +# should work with extraClasspath=${project.build.outputDirectory} +# If not try +extraClasspath=${project.build.outputDirectory};${project.build.testOutputDirectory} + +# Comma separated list of disabled plugins +# Use plugin name - e.g. +# Hotswapper, AnonymousClassPatch, WatchResources, Hibernate, Spring, Jersey2, Jetty, Tomcat, +# ZK, Logback, JSF, Seam, ELResolver, OsgiEquinox, Proxy, WebObjects, Weld, JBossModules, Resteasy, Gae +disabledPlugins=Hibernate,Spring + +# Add a directory prior to webapp path (load webapp resources). +# +# Load web application resources (such as HTML, JSP, CSS, ...) from this directory prior to default processing. +# Use this setting to set to serve resources from source directory directly (e.g. src/main/webapp). +extraWebappContext=${project.build.outputDirectory}/META-INF/resources + +# Load static web resources from different directory. +# +# This setting is dependent on application server plugin(Jetty, Tomcat, JBoss, ...) +webappDir=${project.build.outputDirectory}/META-INF/resources + +# Watch for changes in a directory (resources only). +# +# Similar to extraClasspath this property adds classpath when searching for resources (not classes). +# While extra classpath just modifies the classloader, this setting does nothing until the resource +# is really changed. +# +# Sometimes it is not possible to point extraClasspath to your i.e. src/main/resources, because there are multiple +# replacements of resources in a building step (maven filtering resource option). +# This setting will leave i.e. src/target/classes as default source for resources, but after the resource is modified +# in src/main/resources, the new changed resource is served instead. +# watchResources= + +LOGGER.org.hotswap.agent=DEBUG +#LOGGER.org.hotswap.agent.plugin=TRACE +#LOGGER.org.hotswap.agent.watch=TRACE +#LOGGER.org.hotswap.agent.command=TRACE \ No newline at end of file diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java index 9d0cf94d..f2c4e83e 100644 --- a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java +++ b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java @@ -299,7 +299,7 @@ public abstract class AbstractRunMojo extends AbstractMojo { @Parameter(property = "activiti.groupId", defaultValue = "com.activiti") protected String activitiGroupId; - @Parameter(property = "alfresco.platform.war.artifactId", defaultValue = "alfresco-platform") + @Parameter(property = "alfresco.platform.war.artifactId", defaultValue = "alfresco") protected String alfrescoPlatformWarArtifactId; @Parameter(property = "alfresco.share.war.artifactId", defaultValue = "share")