Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .classpath

This file was deleted.

40 changes: 38 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
.idea
dist
**.log*

# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar

# Eclipse
.metadata
.project
.classpath
bin/
tmp/
*.tmp
.settings/
.loadpath
.recommenders

# IntelliJ IDEA
**.idea
**.iml

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# macOS
*.DS_Store
17 changes: 0 additions & 17 deletions .project

This file was deleted.

174 changes: 113 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,114 @@
"Import/Export ACP Tool" for Alfresco Share
================================

This extension allows you to **import** and **export** ACP files from Share UI (you can also import (and extract) ZIP files).

Building the module
-------------------
Check out the project if you have not already done so

git clone git://github.com/atolcd/alfresco-share-import-export.git

An Ant build script is provided to build JAR file **OR** AMP files containing the custom files.

To build JAR file, run the following command from the base project directory:

ant dist-jar

If you want to build AMP files, run the following command:

ant dist-amp


Installing the module
---------------------
This extension is a standard Alfresco Module, so experienced users can skip these steps and proceed as usual.

### 1st method: Installing JAR (recommended)
1. Stop Alfresco
2. Copy `share-import-export-X.X.X.jar` into the `/tomcat/shared/lib/` folder of your Alfresco (you might need to create this folder if it does not already exist).
3. Start Alfresco


### 2nd method: Installing AMPs
1. Stop Alfresco
2. Use the Alfresco [Module Management Tool](http://wiki.alfresco.com/wiki/Module_Management_Tool) to install the modules in your Alfresco and Share WAR files:

java -jar alfresco-mmt.jar install import-export-alfresco-vX.X.X.amp $TOMCAT_HOME/webapps/alfresco.war -force
java -jar alfresco-mmt.jar install import-export-share-vX.X.X.amp $TOMCAT_HOME/webapps/share.war -force

3. Delete the `$TOMCAT_HOME/webapps/alfresco/` and `$TOMCAT_HOME/webapps/share/` folders.
**Caution:** please ensure you do not have unsaved custom files in the webapp folders before deleting.
4. Start Alfresco



Using the module
---------------------
Go to the Share Admin console.
Export tool (ACP only): `http://server:port/share/page/console/admin-console/export`
Import tool (ACP and ZIP files): `http://server:port/share/page/console/admin-console/import`


LICENSE
---------------------
This extension is licensed under `GNU Library or "Lesser" General Public License (LGPL)`.
Created by: [Julien BERTHOUX] (https://github.com/jberthoux) and [Bertrand FOREST] (https://github.com/bforest)


Our company
---------------------
[Atol Conseils et D�veloppements] (http://www.atolcd.com) is Alfresco [Gold Partner] (http://www.alfresco.com/partners/atol)
# Alfresco-Share Import Export AddOn (AIO Project - SDK 4.1.0)

"Import/Export ACP Tool" for Alfresco Share
================================

This extension allows you to **import** and **export** ACP files from Share UI (you can also import (and extract) ZIP files).

Building the module
-------------------
Check out the project if you have not already done so

git clone https://github.com/abhinavmishra14/alfresco-share-import-export.git

Switch to SDK 4.1 branch:

git fetch && git checkout sdk4.1

Run with `./run.sh build_start` or `./run.bat build_start` and verify that it

* Runs Alfresco Content Service (ACS)
* Runs Alfresco Share
* Runs Alfresco Search Service (ASS)
* Runs PostgreSQL database
* Deploys the JAR assembled modules

All the services of the project are now run as docker containers. The run script offers the next tasks:

* `build_start`. Build the whole project, recreate the ACS and Share docker images, start the dockerised environment composed by ACS, Share, ASS and
PostgreSQL and tail the logs of all the containers.
* `build_start_it_supported`. Build the whole project including dependencies required for IT execution, recreate the ACS and Share docker images, start the
dockerised environment composed by ACS, Share, ASS and PostgreSQL and tail the logs of all the containers.
* `start`. Start the dockerised environment without building the project and tail the logs of all the containers.
* `stop`. Stop the dockerised environment.
* `purge`. Stop the dockerised container and delete all the persistent data (docker volumes).
* `tail`. Tail the logs of all the containers.
* `reload_share`. Build the Share module, recreate the Share docker image and restart the Share container.
* `reload_acs`. Build the ACS module, recreate the ACS docker image and restart the ACS container.
* `build_test`. Build the whole project, recreate the ACS and Share docker images, start the dockerised environment, execute the integration tests from the
`integration-tests` module and stop the environment.
* `test`. Execute the integration tests (the environment must be already started).


Installing the module
---------------------

####Installing Alfresco Platform module:

1- Navigate to parent pom.xml
2- Execute maven command: `mvn clean install`
3- You can find the 'alfresco-share-import-export-platform' jar file at this path: /alfresco-share-import-export/alfresco-share-import-export-platform-docker/target/extensions/alfresco-share-import-export-platform-1.0-SNAPSHOT.jar
4- Stop the alfresco container

e.g.: docker-compose -f ./docker-compose.yml kill alfresco-share-import-export-acs
docker-compose -f ./docker-compose.yml rm -f alfresco-share-import-export-acs

5- Copy the jar file to $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/

Get container name or short container id:
- `docker ps`
Get full container id:
- `docker inspect -f '{{.Id}}' CONTAINER_ID`
Copy file:
- `docker cp localFile FULLCONTAINER_ID:pathOnContainer`

Example:
- `docker cp ./alfresco-share-import-export/alfresco-share-import-export-platform-docker/target/extensions/alfresco-share-import-export-platform-1.0-SNAPSHOT.jar ac23e51fd0b5c4cc11a12133ceea16d603e7f105d8d39873c75d7cfdd5942e40:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/`

6- Start the alfresco container

e.g.: docker-compose -f ./docker-compose.yml up --build -d alfresco-share-import-export-acs

####Installing Share module:

1- Navigate to parent pom.xml
2- Execute maven command: `mvn clean install`
3- You can find the 'alfresco-share-import-export-share' jar file at this path: /alfresco-share-import-export/alfresco-share-import-export-share-docker/target/extensions/alfresco-share-import-export-share-1.0-SNAPSHOT.jar
4- Stop the share container

e.g.: docker-compose -f ./docker-compose.yml kill alfresco-share-import-export-share
docker-compose -f ./docker-compose.yml rm -f alfresco-share-import-export-share

5- Copy the jar file to $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/

Get container name or short container id:
- `docker ps`
Get full container id:
- `docker inspect -f '{{.Id}}' CONTAINER_ID`
Copy file:
- `docker cp localFile FULLCONTAINER_ID:pathOnContainer`

Example:
- `docker cp ./alfresco-share-import-export/alfresco-share-import-export-share-docker/target/extensions/alfresco-share-import-export-share-1.0-SNAPSHOT.jar bc23e51frfr5c4cc11a12133ceea16d603e7f105d8d39873c75d7cfdd5942456:/usr/local/tomcat/webapps/share/WEB-INF/lib/`

6- Start the share container

e.g.: docker-compose -f ./docker-compose.yml up --build -d alfresco-share-import-export-share

Using the module
---------------------
Go to the Share Admin console.
Export tool (ACP only): `http://server:port/share/page/console/admin-console/export`
Import tool (ACP and ZIP files): `http://server:port/share/page/console/admin-console/import`


LICENSE
---------------------
This extension is licensed under `GNU Library or "Lesser" General Public License (LGPL)`.
Created by: [Julien BERTHOUX] (https://github.com/jberthoux) and [Bertrand FOREST] (https://github.com/bforest)


Our company
---------------------
[Atol Conseils et Développements] (http://www.atolcd.com) is Alfresco [Gold Partner] (http://www.alfresco.com/partners/atol)
Follow us on twitter [ @atolcd] (https://twitter.com/atolcd)
76 changes: 76 additions & 0 deletions alfresco-share-import-export-integration-tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-share-import-export-integration-tests</artifactId>
<name>Integration Tests Module</name>
<description>Integration Tests module for in-container integration testing</description>
<packaging>jar</packaging> <!-- Note. this just runs Integration Tests, but it needs to be a JAR otherwise
nothing is compiled (i.e. you cannot set it to pom) -->

<parent>
<groupId>com.atolcd</groupId>
<artifactId>alfresco-share-import-export</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<properties>
</properties>

<dependencies>
<!-- Bring in any custom module that should be tested, by default we bring in the Platform JAR module
that is generated for the AIO project -->
<dependency>
<groupId>com.atolcd</groupId>
<artifactId>alfresco-share-import-export-platform</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>

<plugins>

<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<configuration>
<rebelXmlDirectory>${project.build.testOutputDirectory}</rebelXmlDirectory>
</configuration>
</plugin>

<!-- Make sure we attach the tests so we can include them when running -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Runs the integration tests, any class that follows naming convention
"**/IT*.java", "**/*IT.java", and "**/*ITCase.java" will be considered an integration test -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<acs.endpoint.path>${test.acs.endpoint.path}</acs.endpoint.path>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading