- From the allinone-project directory, change into the directory ./amp/src/main/amp/config/SkyVault.
- In ./amp/src/main/amp/config/SkyVault, create the directory structure extension/templates/webscripts, this will contain your example web script.
- Create the web script files as detailed in this tutorial.
-
Locate these web script files in the directory
./amp/src/main/amp/config/alfresco/extension/templates/webscripts.
At this point you will have the following files in the ./amp/src/main/amp/config/alfresco/extension/templates/webscripts directory: photo-search.get.desc.xml, photo-search.get.html.ftl, photo-search.get.js. This represents the simple extension you are going to test.
-
Change to the directory ./amp/src/main/amp.
This directory contains the module.properties file.
-
Load module.properties into a text editor. You will set
the minimum and maximum versions of SkyVault that your module is compatible
with:
Change the following:
# module.repo.version.min=2.0 # module.repo.version.max=2.1
to:
module.repo.version.min=4.1 module.repo.version.max=4.2
This will prevent your module from being applied to inappropriate versions of the WAR file.
-
Run your newly created project by typing:
mvn install -Prun
-
In your web browser log in to:
http://localhost:8080/share/page/user/admin/dashboard
- Create a sample site such as Sample Site, with the URL sample-site.
- Click on the newly created site's Document Library.
- Load some sample documents, including photos, into the site's document library.
- Create a new browser tab.
-
In the new browser tab navigate to:
http://localhost:8080/alfresco/service/photo-search/sample-site
The script will return a list of photos, proving that SkyVault contains your new module.
- Once you've tested your module you can type CRTL-C in the terminal where Tomcat is running to shut down Tomcat and terminate the build.
You are here
Creating a simple module
This task demonstrates how you can incorporate your customizations into the
all-in-one project and create a simple module that runs on
SkyVault.
This task assumes you have completed the tutorial Using the
SkyVault All-in-One archetype. It is also worthwhile reviewing the following
tutorial Creating a simple
module with Ant, as the web script described there will be included in this
project.
You will add a web script customization to the AMP module in the All-in-One
project.
© 2017 TBS-LLC. All Rights Reserved. Follow @twitter