diff --git a/readme.md b/readme.md index 990aac6..ecd0040 100644 --- a/readme.md +++ b/readme.md @@ -17,7 +17,7 @@ Installation ------------ There are two AMPs associated with this add-on. One is a "repo tier" AMP and the other is a "Share tier" AMP. -For each of the two projects, use `mvn install` to create the AMP. By default the POM is set to depend on the latest Alfresco Community Edition using the default specified by the SDK. This has not been tested with Alfresco Enterprise Edition. +For each of the two projects, use `mvn install` to create the AMP. When running with 5.1.f, you must specify `` when running maven commands for the Share tier AMP. ### Install the AMPs @@ -29,11 +29,11 @@ Once the AMPs are deployed, start up Alfresco. ### Deploy the Module in Share -After starting Alfresco with the AMPs deployed, you'll need to go to the [Share Module Deployment Console](http://localhost:8080/share/service/modules/deploy) to deploy the module. After you hit "Apply Changes", log out, then log back in. If you don't already have a group created with your username in it, the "Create Site" links should be gone, even if you are an administrator. +After starting Alfresco with the AMPs deployed, the Share module should be deployed for you automatically. If you can still see "Create Sites" you may need to deploy the module manually. To do so, go to the [Share Module Deployment Console](http://localhost:8080/share/service/modules/deploy) to deploy the module. After you hit "Apply Changes", log out, then log back in. If you don't already have a group created with your username in it, the "Create Site" links should be gone, even if you are an administrator. ### Create and Populate the Group -Now go create a new group with an ID of "GROUP_SITE_CREATORS". You can add individuals and groups to this group. For example, at the very least you will probably want to add ALFRESCO_ADMINISTRATORS to this group. +The SITE_CREATORS group will be created for you automatically. If, for some reason, it does not get created, create a new group with an ID of "GROUP_SITE_CREATORS". You can add individuals and groups to this group. For example, at the very least you will probably want to add ALFRESCO_ADMINISTRATORS to this group. Using a Different Group Name ------------------------ diff --git a/share-site-creators-repo/pom.xml b/share-site-creators-repo/pom.xml index f92f2a7..a206b2c 100644 --- a/share-site-creators-repo/pom.xml +++ b/share-site-creators-repo/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.ecmarchitect share-site-creators-repo - 0.0.2-SNAPSHOT + 0.0.3 share-site-creators-repo AMP project amp Changes the permissions so that only members of a specific group can create sites. @@ -12,7 +12,7 @@ org.alfresco.maven alfresco-sdk-parent - 2.1.1 + 2.2.0 + Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0) --> + 5.1.f + local + + ${alfresco.groupId} + alfresco-repository + ${alfresco.version} + h2scripts + test + + + * + * + + + @@ -84,19 +99,5 @@ - - - amp-to-war - - - org.alfresco.maven - alfresco-rad - ${maven.alfresco.version} - - - diff --git a/share-site-creators-repo/run.bat b/share-site-creators-repo/run.bat index c08c3e0..03523c1 100644 --- a/share-site-creators-repo/run.bat +++ b/share-site-creators-repo/run.bat @@ -1,19 +1,8 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: Dev environment startup script for Alfresco Community. :: -:: :: -:: Downloads the spring-loaded lib if not existing and :: -:: runs the Repo AMP applied to Alfresco WAR. :: -:: Note. the Share WAR is not deployed. :: -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -@echo off +@ECHO OFF -set springloadedfile=%HOME%\.m2\repository\org\springframework\springloaded\1.2.3.RELEASE\springloaded-1.2.3.RELEASE.jar - -if not exist %springloadedfile% ( - mvn validate -Psetup +IF "%MAVEN_OPTS%" == "" ( + ECHO The environment variable 'MAVEN_OPTS' is not set, setting it for you + SET MAVEN_OPTS=-Xms256m -Xmx2G -XX:PermSize=300m ) - -set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G - -mvn integration-test -Pamp-to-war -nsu -:: mvn integration-test -Pamp-to-war +ECHO MAVEN_OPTS is set to '%MAVEN_OPTS%' +mvn clean install -Pamp-to-war diff --git a/share-site-creators-repo/run.sh b/share-site-creators-repo/run.sh index eeddce4..1df845e 100644 --- a/share-site-creators-repo/run.sh +++ b/share-site-creators-repo/run.sh @@ -1,11 +1,7 @@ #!/bin/bash -# Downloads the spring-loaded lib if not existing and -# runs the Repo AMP applied to Alfresco WAR. -# Note. the Share WAR is not deployed. -springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar - -if [ ! -f $springloadedfile ]; then -mvn validate -Psetup +if [[ -z ${MAVEN_OPTS} ]]; then + echo "The environment variable 'MAVEN_OPTS' is not set, setting it for you"; + MAVEN_OPTS="-Xms256m -Xmx1524m -XX:PermSize=300m" fi - -MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn integration-test -Pamp-to-war +echo "MAVEN_OPTS is set to '$MAVEN_OPTS'"; +mvn clean install -Pamp-to-war \ No newline at end of file diff --git a/share-site-creators-repo/src/main/amp/config/alfresco/module/share-site-creators-repo/context/bootstrap-context.xml b/share-site-creators-repo/src/main/amp/config/alfresco/module/share-site-creators-repo/context/bootstrap-context.xml index 91003d7..ef150d8 100644 --- a/share-site-creators-repo/src/main/amp/config/alfresco/module/share-site-creators-repo/context/bootstrap-context.xml +++ b/share-site-creators-repo/src/main/amp/config/alfresco/module/share-site-creators-repo/context/bootstrap-context.xml @@ -23,7 +23,7 @@ share-site-creators-repo.groupsLoader.description 0 ${version.schema} - 10000 + 15000 diff --git a/share-site-creators-repo/src/main/amp/module.properties b/share-site-creators-repo/src/main/amp/module.properties index 0e5c045..36097a6 100644 --- a/share-site-creators-repo/src/main/amp/module.properties +++ b/share-site-creators-repo/src/main/amp/module.properties @@ -19,12 +19,12 @@ # ==== Beginning of Alfresco required/optional properties ====== # # NB: These properties are filtered at build time by Maven, single -# sourcing from POM properties +# sourcing from POM properties module.id=${project.artifactId} #module.aliases=myModule-123, my-module module.title=${project.name} module.description=${project.description} -module.version=${noSnapshotVersion} +module.version=${project.version} # The following optional properties can be used to prevent the module from being added # to inappropriate versions of the WAR file. @@ -45,4 +45,4 @@ module.version=${noSnapshotVersion} # ==== End of Alfresco required/optional properties ======= # -# ==== Beginning of module required properties/optional ====== # \ No newline at end of file +# ==== Beginning of module required properties/optional ====== # diff --git a/share-site-creators-repo/tomcat/context.xml b/share-site-creators-repo/tomcat/context.xml index 45d3690..6ef60da 100644 --- a/share-site-creators-repo/tomcat/context.xml +++ b/share-site-creators-repo/tomcat/context.xml @@ -4,28 +4,35 @@ it is never released with the Alfresco.war =================================================================================================================--> - - + + + - - + This way mvn compile can be invoked and all changes will be picked up + --> + - - + + diff --git a/share-site-creators-share/pom.xml b/share-site-creators-share/pom.xml index 2c2c7df..52ce5e8 100644 --- a/share-site-creators-share/pom.xml +++ b/share-site-creators-share/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.ecmarchitect share-site-creators-share - 0.0.2-SNAPSHOT + 0.0.3 share-site-creators-share AMP project amp Hides all "create site" links from all users except those belonging to a specific group. @@ -12,7 +12,7 @@ org.alfresco.maven alfresco-sdk-parent - 2.1.1 + 2.2.0 - 5.0.d + 5.1.f WARN @@ -68,9 +68,10 @@ provided - org.springframework.extensions.surf - spring-surf-api - provided + org.alfresco.surf + spring-surf-api + ${dependency.surf.version} + provided @@ -84,19 +85,4 @@ - - - - enterprise - - - ${alfresco.groupId} - share-enterprise - ${alfresco.version} - classes - provided - - - - diff --git a/share-site-creators-share/run.bat b/share-site-creators-share/run.bat index 5e4c6a9..ae97ed3 100644 --- a/share-site-creators-share/run.bat +++ b/share-site-creators-share/run.bat @@ -1,20 +1,3 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: Dev environment startup script for Alfresco Community. :: -:: :: -:: Downloads the spring-loaded lib if not existing and :: -:: runs the Share AMP applied to Share WAR. :: -:: Note. requires Alfresco.war to be running in another :: -:: Tomcat on port 8080. :: -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -@echo off +@ECHO OFF -set springloadedfile=%HOME%\.m2\repository\org\springframework\springloaded\1.2.3.RELEASE\springloaded-1.2.3.RELEASE.jar - -if not exist %springloadedfile% ( - mvn validate -Psetup -) - -set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify - -mvn integration-test -Pamp-to-war -nsu -:: mvn integration-test -Pamp-to-war +mvn clean install -Pamp-to-war \ No newline at end of file diff --git a/share-site-creators-share/run.sh b/share-site-creators-share/run.sh index c8c46ca..3ce06cc 100644 --- a/share-site-creators-share/run.sh +++ b/share-site-creators-share/run.sh @@ -1,10 +1,19 @@ #!/bin/bash -# Downloads the spring-loaded lib if not existing and runs the Share AMP applied to Share WAR -# Note. requires Alfresco.war to be running in another Tomcat on port 8080 -springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar +# Note. This script requires Alfresco.war to be running in another Tomcat on port 8080 -if [ ! -f $springloadedfile ]; then -mvn validate -Psetup -fi +if [[ -z ${MAVEN_OPTS} ]]; then + echo "The environment variable 'MAVEN_OPTS' is not set, setting it for you"; + + # Downloads the spring-loaded lib if not existing and runs the Share AMP applied to Share WAR + springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.5.RELEASE/springloaded-1.2.5.RELEASE.jar -MAVEN_OPTS="-javaagent:$springloadedfile -noverify" mvn integration-test -Pamp-to-war + if [ ! -f $springloadedfile ]; then + mvn validate -Psetup + fi + + # Spring loaded can be used with the Share AMP project in 5.1 + # (i.e. it does not have the same problem as Repo AMP and AIO) + MAVEN_OPTS="-javaagent:$springloadedfile -noverify" +fi +echo "MAVEN_OPTS is set to '$MAVEN_OPTS'"; +mvn clean install -Pamp-to-war \ No newline at end of file diff --git a/share-site-creators-share/src/main/amp/config/alfresco/web-extension/site-data/site-creators-module-extension.xml b/share-site-creators-share/src/main/amp/config/alfresco/web-extension/site-data/site-creators-module-extension.xml index 10604a9..702d198 100644 --- a/share-site-creators-share/src/main/amp/config/alfresco/web-extension/site-data/site-creators-module-extension.xml +++ b/share-site-creators-share/src/main/amp/config/alfresco/web-extension/site-data/site-creators-module-extension.xml @@ -3,7 +3,7 @@ Share Site Creators 1.0 - false + true GROUP_SITE_CREATORS diff --git a/share-site-creators-share/src/main/amp/module.properties b/share-site-creators-share/src/main/amp/module.properties index 0e5c045..36097a6 100644 --- a/share-site-creators-share/src/main/amp/module.properties +++ b/share-site-creators-share/src/main/amp/module.properties @@ -19,12 +19,12 @@ # ==== Beginning of Alfresco required/optional properties ====== # # NB: These properties are filtered at build time by Maven, single -# sourcing from POM properties +# sourcing from POM properties module.id=${project.artifactId} #module.aliases=myModule-123, my-module module.title=${project.name} module.description=${project.description} -module.version=${noSnapshotVersion} +module.version=${project.version} # The following optional properties can be used to prevent the module from being added # to inappropriate versions of the WAR file. @@ -45,4 +45,4 @@ module.version=${noSnapshotVersion} # ==== End of Alfresco required/optional properties ======= # -# ==== Beginning of module required properties/optional ====== # \ No newline at end of file +# ==== Beginning of module required properties/optional ====== # diff --git a/share-site-creators-share/tomcat/context.xml b/share-site-creators-share/tomcat/context.xml index 20843db..40e901c 100644 --- a/share-site-creators-share/tomcat/context.xml +++ b/share-site-creators-share/tomcat/context.xml @@ -4,24 +4,34 @@ it is never released with the Alfresco.war =================================================================================================================--> - - + + + extraResourcePaths="/=${project.build.directory}/amp/web,${app.amp.client.war.folder}" /> + virtualClasspath="${project.build.outputDirectory};${project.build.directory}/amp/config;${project.build.testOutputDirectory}" />