https://github.com/magenta-aps/alfresco-rm-database-alfresco
https://github.com/magenta-aps/alfresco-rm-database-alfresco
alfresco
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/magenta-aps/alfresco-rm-database-alfresco
- Owner: magenta-aps
- Created: 2017-06-12T12:16:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-02T21:01:05.000Z (over 1 year ago)
- Last Synced: 2025-02-17T15:51:37.835Z (4 months ago)
- Topics: alfresco
- Language: Java
- Size: 47 MB
- Stars: 0
- Watchers: 8
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RM Database Addon for Alfresco
To run use `mvn clean install -DskipTests=true alfresco:run` or `./run.sh` and verify that it
* Runs the embedded Tomcat + H2 DB
* Runs Alfresco Platform (Repository)
* Runs Alfresco Solr4
* Packages both as JAR and AMP assembly
Try cloning it, change the port and play with `enableShare`, `enablePlatform` and `enableSolr`.
Protip: This module will work just fine as a Share module if the files are changed and
if the enablePlatform and enableSolr is disabled.
# Few things to notice* No parent pom
* WAR assembly is handled by the Alfresco Maven Plugin configuration
* Standard JAR packaging and layout
* Works seamlessly with Eclipse and IntelliJ IDEA
* JRebel for hot reloading, JRebel maven plugin for generating rebel.xml, agent usage: `MAVEN_OPTS=-Xms256m -Xmx1G -agentpath:/home/martin/apps/jrebel/lib/libjrebel64.so`
* AMP as an assembly
* [Configurable Run mojo](https://github.com/Alfresco/alfresco-sdk/blob/sdk-3.0/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java) in the `alfresco-maven-plugin`
* No unit testing/functional tests just yet
* Resources loaded from META-INF
* Web Fragment (this includes a sample servlet configured via web fragment)
* Only works with Java Version 8
* To force Java version, simply delete other versions from system by deleting their folders in `/Library/Java/JavaVirtualMachines/`
* Download Java Version 8: (https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
# TODO
* Abstract assembly into a dependency so we don't have to ship the assembly in the archetype
* Purge,
* Functional/remote unit tests# Architecture
The frontend is an angularjs application that connects with the alfresco backend through the endpoints placed here:
src/alfresco-rm-database-alfresco/src/main/java/dk/magenta/webscriptsThe businesslogic have been placed in beans here:
fhp/src/alfresco-rm-database-alfresco/src/main/java/dk/magenta/beansThe Alfresco backend has been installed using the Alfresco installer that was available for version 5.2 The root folder for alfresco is:
/appl/alfresco# Datamodels
The datamodel for the Observand is found in the file:
src/alfresco-rm-database-alfresco/src/main/resources/alfresco/module/rm-database-alfresco/model/content-model.xmlThe datamodel for the Psychologist is found in the file:
src/alfresco-rm-database-alfresco/src/main/resources/alfresco/module/rm-database-alfresco/model/psych_content-model.xml# Deploying the backend
Build the amp file:
mvn clean package -DskipTests=truecopy the amp file to the server:
sudo scp target/rm-database-alfresco-*.amp [email protected]:~/stop the server:
sudo systemctl stop alfrescoApply the amp:
sudo cp rm-database-alfresco-1.3.8.amp /appl/alfresco/amps
sudo cp alfresco-rm-cpr-1.0-SNAPSHOT.amp /appl/alfresco/amps
sudo cp support-tools-repo-1.1.0.0-amp.amp /appl/alfresco/ampssudo chown alfresco:alfresco /appl/alfresco/amps/rm-database-alfresco-1.3.8.amp
sudo chmod 775 /appl/alfresco/amps/rm-database-alfresco-1.3.8.ampsudo chown alfresco:alfresco /appl/alfresco/amps/alfresco-rm-cpr-1.0-SNAPSHOT.amp
sudo chmod 775 /appl/alfresco/amps/alfresco-rm-cpr-1.0-SNAPSHOT.ampsudo chown alfresco:alfresco /appl/alfresco/amps/support-tools-repo-1.1.0.0-amp.amp
sudo chmod 775 /appl/alfresco/amps/support-tools-repo-1.1.0.0-amp.ampcd /appl/alfresco/bin/
sudo ./apply_amps.sh* -force
sudo chmod 775 /appl/alfresco/tomcat/webapps/alfresco.war
sudo chown alfresco:alfresco /appl/alfresco/tomcat/webapps/alfresco.warsudo chmod 775 /appl/alfresco/tomcat/webapps/share.war
sudo chown alfresco:alfresco /appl/alfresco/tomcat/webapps/share.warstart the server:
sudo systemctl start alfresco# Deploying the frontend
The application requires node v11.15.0 and the npm module gulp. Build the application:
gulp build
Now zip the folder and copy it to the server:
tar -zcvf ret.zip alfresco-rm-database-alfresco-ui
scp ret.zip [email protected]:~To apply the frontend changes:
cp ret.zip tmp/.
cd tmp
tar xvf ret.zipcd /var/www/html
sudo rm -rf retspsyk
sudo mv /home/onerm.dk/adminflmpde/tmp/alfresco-rm-database-alfresco-ui retspsyk
sudo cp /var/www/html/discovery.xml /var/www/html/retspsyk/discovery.xml
sudo chown alfresco:alfresco -R retspsyk
# edit online
Libreoffice online are deploying here lool.rm.dk
# repositories
https://github.com/magenta-aps/alfresco-rm-database-alfresco-ui
https://github.com/magenta-aps/alfresco-rm-database-alfresco