Commit 2e546a1c authored by Martin Bergljung's avatar Martin Bergljung
Browse files

DEVPLAT-445

parent 9dd9f530
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -13,17 +13,17 @@
<Context docBase="${project.parent.basedir}/alfresco-war/target/${project.build.finalName}">
    <!-- Pick up static resource files from AMPs and other directories (this should not include docBase) -->
    <Resources className="org.apache.naming.resources.VirtualDirContext"
               extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-repo-amp/target/${rootArtifactId}-repo-amp/web" />
               extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-repo-amp/target/amp/web" />
    <!-- IMPORTANT! The extraResourcePaths string need to be on one continues line, so if we add another Repo AMP,
                    it would look something like this:
    <Resources className="org.apache.naming.resources.VirtualDirContext"
               extraResourcePaths="/=${project.parent.basedir}/repo-amp/target/repo-amp/web,/=${project.parent.basedir}/component-a-repo/target/component-a-repo/web" />
               extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-repo-amp/target/amp/web,/=${project.parent.basedir}/component-a-repo/target/amp/web" />
    -->

    <!-- Configure where the Alfresco (alfresco.war) web application can load classes, test classes, and config files -->
    <!-- Setup the virtual class path like this:
         1) target/classes
         2) target/${project.build.finalName}/config
         2) target/amp/config
         3) target/test-classes

         This way mvn compile can be invoked and all changes will be picked up
@@ -31,7 +31,7 @@
    <Loader className="org.apache.catalina.loader.VirtualWebappLoader"
            searchVirtualFirst="true"
            virtualClasspath="${project.parent.basedir}/${rootArtifactId}-repo-amp/target/classes;
            ${project.parent.basedir}/${rootArtifactId}-repo-amp/target/${rootArtifactId}-repo-amp/config;
            ${project.parent.basedir}/${rootArtifactId}-repo-amp/target/amp/config;
            ${project.parent.basedir}/${rootArtifactId}-repo-amp/target/test-classes" />

    <!-- Load from all directories, not just when the META-INF directory is found in exploded JAR -->
+4 −4
Original line number Diff line number Diff line
@@ -10,17 +10,17 @@
    <!-- Pick up static resource files from any Share extensions, being it a JAR or an AMP
         (this should not include docBase) -->
    <Resources className="org.apache.naming.resources.VirtualDirContext"
               extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/${rootArtifactId}-share-amp/web" />
               extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/amp/web" />
    <!-- IMPORTANT! The extraResourcePaths string need to be on one continues line, so if we add another Share AMP,
                    it would look something like this:
    <Resources className="org.apache.naming.resources.VirtualDirContext"
               extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/${rootArtifactId}-share-amp/web,/=${project.parent.basedir}/component-a-share/target/component-a-share/web" />
               extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/amp/web,/=${project.parent.basedir}/component-a-share/target/amp/web" />
               -->

    <!-- Configure where the Share (share.war) web application can load classes, config, and test classes (in that order) -->
    <!-- Setup the virtual class path like this:
         1) ${rootArtifactId}-share-amp/target/classes
         2) ${rootArtifactId}-share-amp/target/${project.build.finalName}/config
         2) ${rootArtifactId}-share-amp/target/amp/config
         3) ${rootArtifactId}-share-amp/target/test-classes
         4)     Add other AMP paths here....
         5) share/target/test-classes              (loads the share-config-custom.xml used during test runs)
@@ -30,7 +30,7 @@
    <Loader className="org.apache.catalina.loader.VirtualWebappLoader"
            searchVirtualFirst="true"
            virtualClasspath="${project.parent.basedir}/${rootArtifactId}-share-amp/target/classes;
            ${project.parent.basedir}/${rootArtifactId}-share-amp/target/${rootArtifactId}-share-amp/config;
            ${project.parent.basedir}/${rootArtifactId}-share-amp/target/amp/config;
            ${project.parent.basedir}/${rootArtifactId}-share-amp/target/test-classes;
            ${project.parent.basedir}/share/target/test-classes" />

+4 −4
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
    it is never released with the Alfresco.war
    =================================================================================================================-->

<!-- Setup docBase to something like repo-amp/target/repo-amp-war
<!-- Setup docBase to something like repo-amp/target/amp-war
     and path to /alfresco
     The Alfresco.war 5.0 does not have a webapp (it used to have Alfresco Explorer but not anymore)
     that we will access, so this docBase might not be needed
@@ -12,18 +12,18 @@
<Context docBase="${app.amp.client.war.folder}" path="${alfresco.client.contextPath}">

  <Resources className="org.apache.naming.resources.VirtualDirContext"
             extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
             extraResourcePaths="/=${project.build.directory}/amp/web" />

    <!-- Setup the virtual class path like this:
         1) target/classes
         2) target/${project.build.finalName}/config
         2) target/amp/config
         3) target/test-classes

         This way mvn compile can be invoked and all changes will be picked up
    -->
    <Loader searchVirtualFirst="true"
            className="org.apache.catalina.loader.VirtualWebappLoader"
            virtualClasspath="${project.build.outputDirectory};${project.build.directory}/${project.build.finalName}/config;${project.build.testOutputDirectory}" />
            virtualClasspath="${project.build.outputDirectory};${project.build.directory}/amp/config;${project.build.testOutputDirectory}" />


    <!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from  WEB-INF/lib/{\*.jar}/META-INF/resources -->
+3 −3
Original line number Diff line number Diff line
@@ -9,19 +9,19 @@
<Context docBase="${app.amp.client.war.folder}" path="${share.client.contextPath}">

  <Resources className="org.apache.naming.resources.VirtualDirContext"
    extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
    extraResourcePaths="/=${project.build.directory}/amp/web" />

  <!-- Configure where the Share (share.war) web application can load classes, test classes, and config -->
  <!-- Setup the virtual class path like this:
       1) target/classes
       2) target/${project.build.finalName}/config
       2) target/amp/config
       3) target/test-classes

       This way mvn compile can be invoked and all changes will be picked up
  -->
  <Loader searchVirtualFirst="true"
          className="org.apache.catalina.loader.VirtualWebappLoader"
          virtualClasspath="${project.build.outputDirectory};${project.build.directory}/${project.build.finalName}/config;${project.build.testOutputDirectory}" />
          virtualClasspath="${project.build.outputDirectory};${project.build.directory}/amp/config;${project.build.testOutputDirectory}" />

  <!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from  WEB-INF/lib/{\*.jar}/META-INF/resources -->
  <JarScanner scanAllDirectories="true" />
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public class AmpMojo extends AbstractMojo {
    /**
     * Target folder used to aggregate content then packaged into the AMP
     *
     * @parameter property="maven.alfresco.ampBuildDirectory" default-value="${project.build.directory}/${project.build.finalName}"
     * @parameter property="maven.alfresco.ampBuildDirectory" default-value="${app.amp.output.folder}"
     * @required
     *
     */
Loading