mirror of
https://github.com/Alfresco/acs-community-packaging.git
synced 2025-09-10 14:12:09 +00:00
Compare commits
57 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a260d2938c | ||
|
c3bff50bfe | ||
|
d68920fa16 | ||
|
22b42d274f | ||
|
0df449e1e0 | ||
|
c07a9d4e22 | ||
|
00158d6390 | ||
|
5645836ac4 | ||
|
0b83737fba | ||
|
227a82bffd | ||
|
bf453a519d | ||
|
5ada61ecef | ||
|
0f8ea28abe | ||
|
e6920f0c71 | ||
|
357ed8478c | ||
|
b9523d659a | ||
|
c2ffbf02ef | ||
|
809b3062cd | ||
|
fe72a557c5 | ||
|
8e1bfeb88e | ||
|
401fc13d24 | ||
|
93d3e02402 | ||
|
9f0cafa954 | ||
|
8fc08ab6cf | ||
|
c08dd55b8e | ||
|
f959da443c | ||
|
66cee04556 | ||
|
8b7efa4e94 | ||
|
c193bcaf52 | ||
|
d9843034ae | ||
|
024d3e4d2d | ||
|
55b1580c22 | ||
|
33ebedee3c | ||
|
ae40abc1dd | ||
|
2f7b625465 | ||
|
3b57620a06 | ||
|
3c95f04005 | ||
|
28e18308b4 | ||
|
ff833729fe | ||
|
f2292c288b | ||
|
a8df8cb7ed | ||
|
baf76608f7 | ||
|
ddae3ae0ab | ||
|
b4b6ff0d27 | ||
|
ac00a34bc4 | ||
|
7362b4c989 | ||
|
cc86cd2342 | ||
|
2c6c14bb62 | ||
|
dec86c6d94 | ||
|
888433f498 | ||
|
8cfb437139 | ||
|
a5aed73a3f | ||
|
5cacfb329c | ||
|
0fa84b8499 | ||
|
b87f0d5c77 | ||
|
0f3d72179e | ||
|
a94d0c474a |
62
.github/dependabot.yml
vendored
Normal file
62
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
version: 2
|
||||
registries:
|
||||
maven-repository-artifacts-alfresco-com-nexus-content-groups-int:
|
||||
type: maven-repository
|
||||
url: https://artifacts.alfresco.com/nexus/content/groups/internal
|
||||
username: ${{secrets.NEXUS_USERNAME}}
|
||||
password: ${{secrets.NEXUS_PASSWORD}}
|
||||
|
||||
updates:
|
||||
- package-ecosystem: maven
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "22:00"
|
||||
timezone: Africa/Abidjan
|
||||
open-pull-requests-limit: 99
|
||||
ignore:
|
||||
# Upstream alfresco-community-repo artifacts
|
||||
- dependency-name: org.alfresco:alfresco-community-repo
|
||||
- dependency-name: org.alfresco:alfresco-core
|
||||
- dependency-name: org.alfresco:alfresco-data-model
|
||||
- dependency-name: org.alfresco:alfresco-repository
|
||||
- dependency-name: org.alfresco:alfresco-remote-api
|
||||
- dependency-name: org.alfresco:content-services-community
|
||||
- dependency-name: org.alfresco:alfresco-community-repo-distribution
|
||||
- dependency-name: org.alfresco.tas:alfresco-community-repo-webdav-test:tests
|
||||
- dependency-name: org.alfresco.tas:alfresco-community-repo-restapi-test:tests
|
||||
- dependency-name: org.alfresco.tas:alfresco-community-repo-integration-test:tests
|
||||
- dependency-name: org.alfresco.tas:alfresco-community-repo-email-test:tests
|
||||
- dependency-name: org.alfresco.tas:alfresco-community-repo-cmis-test:tests
|
||||
# Used in dev env - Currently using 7.0.86 but have tried higher versions
|
||||
- dependency-name: org.apache.tomcat.embed
|
||||
versions:
|
||||
- "> 7.0.109"
|
||||
- dependency-name: org.apache.tomcat
|
||||
versions:
|
||||
- "> 7.0.109"
|
||||
# Upstream alfresco-enterprise-share artifacts
|
||||
- dependency-name: org.alfresco:share:classes
|
||||
- dependency-name: org.alfresco:alfresco-wcmqs-web:classes
|
||||
- dependency-name: org.alfresco:alfresco-wcmqs-distribution
|
||||
- dependency-name: org.alfresco:share
|
||||
- dependency-name: org.alfresco:alfresco-content-services-share-distribution
|
||||
- dependency-name: org.alfresco:alfresco-share-services
|
||||
# Others
|
||||
- dependency-name: io.fabric8:fabric8-maven-plugin
|
||||
versions:
|
||||
- "> 4.4.1"
|
||||
- dependency-name: org.alfresco:api-explorer
|
||||
versions:
|
||||
- "> 6.1.0, < 6.2"
|
||||
- dependency-name: org.alfresco.integrations:alfresco-googledocs-repo-community
|
||||
versions:
|
||||
- "> 3.1.0"
|
||||
- dependency-name: org.alfresco.integrations:alfresco-googledocs-share-community
|
||||
versions:
|
||||
- "> 3.1.0"
|
||||
- dependency-name: org.apache.maven.plugins:maven-war-plugin
|
||||
versions:
|
||||
- ">= 3.a, < 4"
|
||||
registries:
|
||||
- maven-repository-artifacts-alfresco-com-nexus-content-groups-int
|
12
.travis.yml
12
.travis.yml
@@ -28,9 +28,9 @@ env:
|
||||
global:
|
||||
- TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts
|
||||
- TAS_ENVIRONMENT=./tests/environment
|
||||
# Release version has to start with real version (7.1.0-....) for the docker image to build successfully.
|
||||
- RELEASE_VERSION=7.1.0
|
||||
- DEVELOPMENT_VERSION=7.2.0-SNAPSHOT
|
||||
# Release version has to start with real version (7.2.0-....) for the docker image to build successfully.
|
||||
- RELEASE_VERSION=7.2.0-A12
|
||||
- DEVELOPMENT_VERSION=7.2.0-A13-SNAPSHOT
|
||||
|
||||
stages:
|
||||
- name: test
|
||||
@@ -119,6 +119,12 @@ jobs:
|
||||
script:
|
||||
- travis_wait 30 mvn -B install -f tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
||||
|
||||
- name: "Community Distribution Zip content tests"
|
||||
before_script:
|
||||
- travis_retry travis_wait 20 mvn -B -V clean install -Pags -DskipTests -Dmaven.javadoc.skip=true
|
||||
script:
|
||||
- travis_wait 20 mvn -B install -f tests/tas-distribution-zip/pom.xml -Prun-distribution-zip-contents-check -DrunBugs=false
|
||||
|
||||
- name: "Update latest images"
|
||||
stage: docker_latest
|
||||
script: travis_retry travis_wait 30 mvn -B -V clean install -DskipTests -Dmaven.javadoc.skip=true -Pags -Ppush-docker-images
|
||||
|
23
CHANGELOG.md
23
CHANGELOG.md
@@ -1,3 +1,26 @@
|
||||
<h1> 7.2.0 Community
|
||||
</h1>
|
||||
<h2>
|
||||
New Features
|
||||
</h2>
|
||||
<li>Upgrade of 3rd party libraries</li>
|
||||
<br>
|
||||
|
||||
The Tika 1.26 library has been upgraded to the Tika 2.1.0. This upgrade brings
|
||||
some changes in available libraries. If you depend indirectly on transitive
|
||||
dependencies of Tika 1.26 then you should consider expressing your dependencies
|
||||
in an explicit way. For more details please see the Tika migration guides:
|
||||
<a href='https://cwiki.apache.org/confluence/display/TIKA/Migrating+to+Tika+2.0.0'>Migrating
|
||||
to Tika 2.0.0</a> and
|
||||
<a href='https://cwiki.apache.org/confluence/display/TIKA/Tika2_0MigrationGuide'>Tika
|
||||
2.0 Migration Guide</a>
|
||||
|
||||
<ul>
|
||||
<li>org.apache.tika:tika-core:1.26 upgraded to org.apache.tika:tika-core:2.1.0</li>
|
||||
<li>org.apache.tika:tika-parsers:1.26 replaced by org.apache.tika:tika-parsers-standard-package:2.1.0</li>
|
||||
</ul>
|
||||
</br>
|
||||
|
||||
<h1> 7.1.0 Community
|
||||
</h1>
|
||||
<h2>
|
||||
|
@@ -18,6 +18,9 @@ The `alfresco/alfresco-content-repository-community` image extends the `alfresco
|
||||
`alfresco-community-repo` project to add additional ACS components.
|
||||
|
||||
# Build:
|
||||
For more detailed build instructions, see the [Development Tomcat Environment](https://github.com/Alfresco/acs-community-packaging/tree/master/dev/README.md)
|
||||
page.
|
||||
|
||||
To build the project, including the distribution zip, but not the Docker images, issue the following commands:
|
||||
```
|
||||
$ # The comP alias includes the following:
|
||||
@@ -28,11 +31,11 @@ $ cd ..
|
||||
## Docker Alfresco
|
||||
Releases are published to https://hub.docker.com/r/alfresco/alfresco-content-repository-community/tags/
|
||||
|
||||
To build the Docker images, you will need to build the `alfresco-community-repo` and
|
||||
`acs-community-packaging` projects. The simplest way is to use the `comRD` and `comPD` aliases.
|
||||
To build the Docker images, you will need to build the `alfresco-community-repo`, `alfresco-community-share` and
|
||||
`acs-community-packaging` projects. The simplest way is to use the `comRD`, `comSD` and `comPD` aliases.
|
||||
For more information, see [build aliases](dev/aliases). `latest` images are created locally.
|
||||
```
|
||||
comRD && comPD
|
||||
comRD && comSD && comPD
|
||||
```
|
||||
|
||||
## Docker-compose & Kubernetes
|
||||
|
130
dev/README.md
130
dev/README.md
@@ -2,33 +2,82 @@
|
||||
|
||||
|
||||
It is possible to use Docker containers to test your code, but it is normally more convenient to simply run the
|
||||
repository webapp (`alfresco.war`) in a tomcat instance.
|
||||
repository webapp (`alfresco.war`) and Share webapp (`share.war`) in a tomcat instance. Options are also available to
|
||||
apply selected AMPs
|
||||
|
||||
## Build -repo projects
|
||||
Build the `alfresco-community-repo` (if you have not
|
||||
## Setting up your development environment
|
||||
Although it is possible to work on individual github projects, we recommend working on
|
||||
the `alfresco-community-repo`, `alfresco-community-share` and `acs-community-packaging`
|
||||
in a single Intellij IDEA project. They depend on each other and typically you
|
||||
will want to make changes to all of them if you are changing the repository code.
|
||||
|
||||
~~~
|
||||
mkdir work
|
||||
cd work
|
||||
git clone git@github.com:Alfresco/alfresco-community-repo.git
|
||||
git clone git@github.com:Alfresco/alfresco-community-share.git
|
||||
git clone git@github.com:Alfresco/acs-community-packaging.git
|
||||
~~~
|
||||
|
||||
## Aliases
|
||||
There are a set of aliases to help with building. You may find them useful, as they will help you only build selected parts
|
||||
of the code base and will save you lots of typing.
|
||||
|
||||
Aliases ending in `D` provide Maven commands for building local Docker images. The AMPS environment variable will be of
|
||||
interest, if you wish to build AMPs included in the repo and share projects.
|
||||
|
||||
The `aliases` file includes a more detailed description.
|
||||
~~~
|
||||
source acs-community-packaging/dev/aliases
|
||||
~~~
|
||||
|
||||
## Link the projects
|
||||
Generally you will want to link the different projects together by modifying the top level
|
||||
pom.xml files of each downstream project so that they reference the SNAPSHOT versions of the
|
||||
upstream projects. To help do this see the `acs-community-packaging` project's `scripts/dev/linkPoms.sh` and
|
||||
`scripts/dev/unlinkPoms.sh` scripts.
|
||||
|
||||
~~~
|
||||
sh acs-community-packaging/scripts/dev/linkPoms.sh
|
||||
~~~
|
||||
|
||||
## Build the alfresco-community-repo project
|
||||
Build the `alfresco-community-repo` projects (if you have not
|
||||
done so already), so that your changes are in the community alfresco.war file.
|
||||
~~~
|
||||
$ # The `comR` alias includes the following commands:
|
||||
$ cd alfresco-community-repo
|
||||
$ mvn clean install -Pbuild-docker-images -DskipTests=true -Dversion.edition=Community
|
||||
$ cd ..
|
||||
# The `comR` alias includes the following commands:
|
||||
cd alfresco-community-repo
|
||||
mvn clean install -DskipTests=true -Dversion.edition=Community
|
||||
cd ..
|
||||
~~~
|
||||
|
||||
## Build the Share project
|
||||
Build the `alfresco-community-share` project (if you have not done so already), so that your
|
||||
changes are in the community share.war file, which also depends on your `alfresco-community-repo` project version.
|
||||
~~~
|
||||
# The `entS` alias is the same as the following commands:
|
||||
cd alfresco-community-share
|
||||
mvn clean install -DskipTests -Dmaven.javadoc.skip=true
|
||||
cd ..
|
||||
~~~
|
||||
|
||||
## Docker test environment
|
||||
The repository code will need to talk to other ACS components, such as a databases, message queue and transformers.
|
||||
The repository code will need to talk to other ACS components, such as a database, message queue and transformers.
|
||||
The simplest way to create these, is to use the `docker-compose.yml` file in the `dev` directory.
|
||||
~~~
|
||||
$ # The `envUp` alias is the same as the following commands:
|
||||
$ cd acs-community-packaging
|
||||
$ docker-compose -f dev/docker-compose.yml up -d
|
||||
Creating dev_transform-core-aio_1 ... done
|
||||
Creating dev_postgres_1 ... done
|
||||
Creating dev_solr6_1 ... done
|
||||
# The `envUp` alias is the same as the following commands. Run these in a new terminal session, or add a `-d` flag to
|
||||
the `docker-compose` command.
|
||||
cd acs-community-packaging
|
||||
docker-compose -f dev/docker-compose.yml up
|
||||
Creating dev_activemq_1 ... done
|
||||
$ cd ..
|
||||
Creating dev_solr6_1 ... done
|
||||
Creating dev_postgres_1 ... done
|
||||
Creating dev_transform-core-aio_1 ... done
|
||||
...
|
||||
cd ..
|
||||
~~~
|
||||
|
||||
## Alfresco Global Properties and Log4j
|
||||
## Alfresco global properties and Log4j
|
||||
Set any alfresco-global.properties or log4j properties you may need in the following files. They will be copied
|
||||
to the `dev/dev-acs-amps-overlay/target` directory. Other customisations may also be placed in the `extension` directory.
|
||||
~~~
|
||||
@@ -41,14 +90,16 @@ Create the development tomcat environment, apply AMPs on top of the repository c
|
||||
run tomcat. The `run` profile is what starts tomcat. The `withShare` applies
|
||||
the Share services AMP and adds the `share.war` to tomcat.
|
||||
Once started, you will be able to access Share on `http://localhost:8080/share` and various repository
|
||||
endpoints via `http://localhost:8080/alfresco/`. `entT` is an alias for the
|
||||
following command and `entTDebug` will allow a debugger to be attached.
|
||||
endpoints via `http://localhost:8080/alfresco/`. `comT` is an alias for the
|
||||
following command and `comTDebug` will allow a debugger to be attached.
|
||||
~~~
|
||||
$ # The alias comT is the same as the following commands. comTDebug may also be used.
|
||||
$ cd acs-community-packaging
|
||||
$ mvn clean install -Prun -rf dev
|
||||
$ cd ..
|
||||
# The alias comT is the same as the following commands:
|
||||
cd acs-community-packaging
|
||||
mvn clean install -Prun -rf dev
|
||||
[INFO] Scanning for projects...
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] Reactor Build Order:
|
||||
[INFO]
|
||||
[INFO] Development Tomcat Environment [pom]
|
||||
[INFO] Tomcat Configuration [pom]
|
||||
[INFO] Repo WAR with amps [war]
|
||||
@@ -56,41 +107,32 @@ $ cd ..
|
||||
[INFO] Tomcat [war]
|
||||
...
|
||||
INFO: Starting ProtocolHandler ["http-bio-8080"]
|
||||
$ cd ..
|
||||
cd ..
|
||||
~~~
|
||||
|
||||
If you kill the tomcat instance (^C) and wish to restart it, use the following command
|
||||
or the `comO` alias, or `comODebug` to attach a debuger.
|
||||
or the `comO` alias, or `comODebug` to attach a debugger.
|
||||
~~~
|
||||
$ mvn install -Prun,withShare -rf dev-acs-amps-overlay
|
||||
mvn install -Prun,withShare -rf dev-acs-amps-overlay
|
||||
~~~
|
||||
|
||||
|
||||
## Clean up
|
||||
When finished, kill the tomcat instance and stop the Docker instances. You will normally also
|
||||
remove the Docker containers, as you will need a clean database if you are going to issue
|
||||
another `mvn clean install` command.
|
||||
another `mvn clean install` command. If you started `docker-compose` in a separate terminal session,
|
||||
simply use `^C` or if you used a `-d` flag, use `docker-compose -f dev/docker-compose.yml stop`.
|
||||
~~~
|
||||
$ ^C
|
||||
^C
|
||||
... Stopped 'sysAdmin' subsystem, ID: [sysAdmin, default]
|
||||
|
||||
$ docker-compose -f dev/docker-compose.yml stop
|
||||
Stopping dev_transform-core-aio_1 ... done
|
||||
Stopping dev_transform-router_1 ... done
|
||||
Stopping dev_solr6_1 ... done
|
||||
Stopping dev_postgres_1 ... done
|
||||
Stopping dev_activemq_1 ... done
|
||||
Stopping dev_shared-file-store_1 ... done
|
||||
|
||||
$ docker-compose -f dev/docker-compose.yml rm
|
||||
docker-compose -f dev/docker-compose.yml rm
|
||||
Going to remove dev_transform-core-aio_1, dev_transform-router_1, dev_solr6_1, dev_postgres_1, dev_activemq_1, dev_shared-file-store_1
|
||||
Are you sure? [yN] y
|
||||
Removing dev_transform-core-aio_1 ... done
|
||||
Removing dev_transform-router_1 ... done
|
||||
Removing dev_solr6_1 ... done
|
||||
Removing dev_postgres_1 ... done
|
||||
Removing dev_activemq_1 ... done
|
||||
Removing dev_shared-file-store_1 ... done
|
||||
~~~
|
||||
|
||||
If you have not removed the containers, it is possible to restart the tomcat instance with
|
||||
@@ -100,15 +142,3 @@ Any changes made to alfresco-global properties or log4j will not be picked up, u
|
||||
directly edit `dev/dev-acs-amps-overlay/target/dev-instance/tomcat/shared/classes/alfresco/extension/custom-log4j.properties`
|
||||
and `dev/dev-acs-amps-overlay/target/dev-instance/tomcat/shared/classes/alfresco-global.properties`, but they will be thrown away
|
||||
on the next `mvn clean`.
|
||||
|
||||
## Aliases
|
||||
You may also find the aliases specified in the following file useful, as they will help you only build selected parts
|
||||
of the code base and will save you lots of typing.
|
||||
|
||||
Aliases ending in `D` provide Maven commands for building local Docker images. The AMPS environment variable will be of
|
||||
interest, if you wish to build AMPs included in the repo and share projects.
|
||||
|
||||
The `aliases` file includes a more detailed description.
|
||||
~~~
|
||||
$ source acs-community-packaging/dev/aliases
|
||||
~~~
|
||||
|
@@ -7,11 +7,11 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-dev-community-tomcat-env</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<dependency.sis.version>1.0</dependency.sis.version>
|
||||
<dependency.sis.version>1.1</dependency.sis.version>
|
||||
|
||||
<tomcat.version>7.0.86</tomcat.version>
|
||||
<tomcat.default.solr6.port>8983</tomcat.default.solr6.port>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-dev-community-tomcat-env</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-dev-community-tomcat-env</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-dev-community-tomcat-env</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -6,7 +6,7 @@ version: "2"
|
||||
|
||||
services:
|
||||
transform-core-aio:
|
||||
image: alfresco/alfresco-transform-core-aio:2.5.3
|
||||
image: alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
mem_limit: 1536m
|
||||
environment:
|
||||
JAVA_OPTS: " -Xms256m -Xmx1536m"
|
||||
|
14
dev/pom.xml
14
dev/pom.xml
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>acs-community-packaging</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
@@ -26,4 +26,16 @@
|
||||
<module>dev-acs-amps-overlay</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!-- Versions higher than 3.3.0 were causing the tomcat dev environment to fail to start with a
|
||||
ClassNotFoundException: org.springframework.web.context.ContextLoaderListener -->
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.2.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>acs-community-packaging</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>acs-community-packaging</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -38,7 +38,7 @@
|
||||
|
||||
<!-- Share -->
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/dependency/alfresco-content-services-share-distribution-${project.version}</directory>
|
||||
<directory>${project.build.directory}/dependency/alfresco-content-services-share-distribution-${dependency.acs-packaging.version}</directory>
|
||||
<outputDirectory/>
|
||||
<includes>
|
||||
<include>web-server/**</include>
|
||||
@@ -47,7 +47,7 @@
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/dependency/alfresco-content-services-share-distribution-${project.version}/web-extension-samples</directory>
|
||||
<directory>${project.build.directory}/dependency/alfresco-content-services-share-distribution-${dependency.acs-packaging.version}/web-extension-samples</directory>
|
||||
<outputDirectory>web-server/shared/classes/alfresco/web-extension</outputDirectory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>content-services-community-docker</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>acs-community-packaging</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>share-community-docker</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,6 +7,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>acs-community-packaging</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
44
pom.xml
44
pom.xml
@@ -3,19 +3,19 @@
|
||||
<artifactId>acs-community-packaging</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Content Services Community Packaging</name>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<relativePath>../alfresco-community-repo/pom.xml</relativePath>
|
||||
<version>11.140</version>
|
||||
<version>14.76</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<dependency.alfresco-community-repo.version>11.140</dependency.alfresco-community-repo.version>
|
||||
<dependency.alfresco-community-share.version>11.77</dependency.alfresco-community-share.version>
|
||||
<alfresco.share.version>7.1.0.1</alfresco.share.version> <!-- Share distribution zip from acs-packaging -->
|
||||
<dependency.alfresco-community-repo.version>14.76</dependency.alfresco-community-repo.version>
|
||||
<dependency.alfresco-community-share.version>14.43</dependency.alfresco-community-share.version>
|
||||
<dependency.acs-packaging.version>7.2.0-A12</dependency.acs-packaging.version> <!-- for Share distribution zip -->
|
||||
|
||||
<repo.image.tag>${dependency.alfresco-community-repo.version}</repo.image.tag>
|
||||
<share.image.tag>${dependency.alfresco-community-share.version}</share.image.tag>
|
||||
@@ -25,7 +25,7 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/acs-community-packaging.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/acs-community-packaging.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/acs-community-packaging</url>
|
||||
<tag>HEAD</tag>
|
||||
<tag>7.2.0-A12</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -39,9 +39,31 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>alfresco-public</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>alfresco-public-snapshots</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<modules>
|
||||
<module>distribution</module>
|
||||
<module>public-javadoc</module>
|
||||
<module>docker-alfresco</module>
|
||||
<module>docker-share</module>
|
||||
</modules>
|
||||
@@ -64,6 +86,7 @@
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<modules>
|
||||
<module>public-javadoc</module>
|
||||
<module>dev</module>
|
||||
</modules>
|
||||
</profile>
|
||||
@@ -136,6 +159,11 @@
|
||||
<artifactId>alfresco-community-repo-distribution</artifactId>
|
||||
<version>${dependency.alfresco-community-repo.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-mmt</artifactId>
|
||||
<version>${dependency.alfresco-community-repo.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.alfresco.tas</groupId>
|
||||
@@ -175,7 +203,7 @@
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-content-services-share-distribution</artifactId>
|
||||
<version>${alfresco.share.version}</version>
|
||||
<version>${dependency.acs-packaging.version}</version>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>acs-community-packaging</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
52
scripts/dev/dev_functions.sh
Normal file
52
scripts/dev/dev_functions.sh
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function updatePomParent() {
|
||||
local PROJECT="$1"
|
||||
local PARENT_POM_VERSION="$2"
|
||||
|
||||
if [ -d "${ROOT_DIR}/${PROJECT}" -a -n "${PARENT_POM_VERSION}" ]
|
||||
then
|
||||
# Cannot use "mvn versions:update-parent" as the version must exist before it can be set. The ed command is also faster.
|
||||
pushd "${ROOT_DIR}/${PROJECT}" &>/dev/null
|
||||
ed -s pom.xml &>/tmp/$$.log << EOF
|
||||
/<parent>
|
||||
/<version>.*<\/version>/s//<version>${PARENT_POM_VERSION}<\/version>/
|
||||
wq
|
||||
EOF
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo
|
||||
echo "\"update of <pom><parent><version> version failed on ${PROJECT}"
|
||||
cat "/tmp/$$.log"
|
||||
exit 1
|
||||
fi
|
||||
printf "%-25s %46s=%s\n" "${PROJECT}" "<pom><parent><version>" "${PARENT_POM_VERSION}"
|
||||
popd &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
function updatePomProperty() {
|
||||
local PROJECT="$1"
|
||||
local PROPERTY_VALUE="$2"
|
||||
local PROPERTY_NAME="$3"
|
||||
|
||||
if [ -d "${ROOT_DIR}/${PROJECT}" -a -n "${PROPERTY_VALUE}" ]
|
||||
then
|
||||
# Can use "mvn versions:set-property", but ed is so much faster.
|
||||
# mvn -B versions:set-property versions:commit -Dproperty="${PROPERTY_NAME}" "-DnewVersion=${PROPERTY_VALUE}"
|
||||
pushd "${ROOT_DIR}/${PROJECT}" &>/dev/null
|
||||
ed -s pom.xml &>/tmp/$$.log << EOF
|
||||
/\(<${PROPERTY_NAME}>\).*\(<\/${PROPERTY_NAME}>\)/s//\1${PROPERTY_VALUE}\2/
|
||||
wq
|
||||
EOF
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo
|
||||
echo "\"update of <${PROPERTY_NAME}> failed on ${PROJECT}"
|
||||
cat "/tmp/$$.log"
|
||||
exit 1
|
||||
fi
|
||||
printf "%-25s %46s=%s\n" "${PROJECT}" "<${PROPERTY_NAME}>" "${PROPERTY_VALUE}"
|
||||
popd &>/dev/null
|
||||
fi
|
||||
}
|
245
scripts/dev/linkPoms.sh
Normal file
245
scripts/dev/linkPoms.sh
Normal file
@@ -0,0 +1,245 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="${SCRIPT_DIR}/../../.."
|
||||
ENV_FILE=".linkPoms.env"
|
||||
ENV_PATH="${ROOT_DIR}/${ENV_FILE}"
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/dev_functions.sh"
|
||||
|
||||
usage() {
|
||||
echo "Updates the downstream projects with the versions of the upstream projects. Reversed by unlinkPoms.sh" 1>&2;
|
||||
echo 1>&2;
|
||||
echo "Usage: $0 [-b <branch>] [-mpxuh]" 1>&2;
|
||||
echo " -m: Checkout master of each project" 1>&2;
|
||||
echo " -b: Checkout the <branch> of each project or master if <branch> is blank" 1>&2;
|
||||
echo " -p: Pull the latest version of each project" 1>&2;
|
||||
echo " -x: Skip the extract of values from each project" 1>&2;
|
||||
echo " -u: Skip the update of values in each project" 1>&2;
|
||||
echo " -h: Display this help" 1>&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
function checkout() {
|
||||
local PROJECT="${1}"
|
||||
local BRANCH="${2}"
|
||||
|
||||
if [ -d "${ROOT_DIR}/${PROJECT}" ]
|
||||
then
|
||||
pushd "${ROOT_DIR}/${PROJECT}" &>/dev/null
|
||||
git checkout "${BRANCH}" &>/tmp/$$.log
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo
|
||||
echo "\"git checkout ${BRANCH}\" failed on ${PROJECT}"
|
||||
cat "/tmp/$$.log"
|
||||
exit 1
|
||||
fi
|
||||
echo "${PROJECT} is now on ${BRANCH}"
|
||||
popd &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
function pull_latest() {
|
||||
local PROJECT="${1}"
|
||||
|
||||
if [ -d "${ROOT_DIR}/${PROJECT}" ]
|
||||
then
|
||||
pushd "${ROOT_DIR}/${PROJECT}" &>/dev/null
|
||||
git pull &>/tmp/$$.log
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo
|
||||
echo "\"git pull\" failed on ${PROJECT}"
|
||||
cat "/tmp/$$.log"
|
||||
exit 1
|
||||
fi
|
||||
echo "${PROJECT} is now using latest"
|
||||
popd &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
function readTopLevelTag() {
|
||||
local TAG_NAME="${1}"
|
||||
local POM_FILE="${2}"
|
||||
# Might be possible to generalise this function to accept an XPath so it could be used in place of sed commands
|
||||
|
||||
# Read the file with an IFS (Input Field Separator) of the start of XML tag character <
|
||||
local IFS=\>
|
||||
local DEPTH=-99
|
||||
while read -d \< ENTITY CONTENT
|
||||
do
|
||||
if [[ $ENTITY == project\ * ]] # outer <project> tag
|
||||
then
|
||||
DEPTH=0
|
||||
elif [[ $ENTITY == /* ]] # end tag
|
||||
then
|
||||
((DEPTH=DEPTH-1))
|
||||
else # start tag
|
||||
((DEPTH=DEPTH+1))
|
||||
fi
|
||||
|
||||
if [[ $ENTITY = "${TAG_NAME}" ]] && [[ $DEPTH == 1 ]] ; then
|
||||
echo $CONTENT
|
||||
exit
|
||||
fi
|
||||
done < $POM_FILE
|
||||
exit 1
|
||||
}
|
||||
|
||||
function exportPomVersion() {
|
||||
local PROJECT="${1}"
|
||||
local ENV_NAME="${2}"
|
||||
|
||||
if [ -d "${ROOT_DIR}/${PROJECT}" ]
|
||||
then
|
||||
pushd "${ROOT_DIR}/${PROJECT}" &>/dev/null
|
||||
# Same as slower/simpler: "mvn help:evaluate -Dexpression=project.version"
|
||||
VERSION=$(readTopLevelTag version pom.xml)
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo
|
||||
echo "\"readTopLevelTagContent version pom.xml\" failed on ${PROJECT}"
|
||||
exit 1
|
||||
fi
|
||||
echo "export ${ENV_NAME}=${VERSION}" >> "${ENV_PATH}"
|
||||
popd &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
function exportPomParent() {
|
||||
local PROJECT="${1}"
|
||||
local ENV_NAME="${2}"
|
||||
|
||||
if [ -d "${ROOT_DIR}/${PROJECT}" ]
|
||||
then
|
||||
pushd "${ROOT_DIR}/${PROJECT}" &>/dev/null
|
||||
# Same as slower/simpler: "mvn help:evaluate -Dexpression=project.parent.version"
|
||||
PROPERTY_VALUE=$(sed -n '/<parent>/,/<\/parent>/p' pom.xml | sed -n "s/.*<version>\(.*\)<\/version>/\1/p" | sed 's/\r//g')
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo
|
||||
echo "\"sed -n '/<parent>/,/<\/parent>/p' pom.xml | sed -n \\\"s/.*<version>\(.*\)<\/version>/\1/p\\\" | sed 's/\r//g'\" failed on ${PROJECT}"
|
||||
exit 1
|
||||
fi
|
||||
echo "export ${ENV_NAME}=${PROPERTY_VALUE}" >> "${ENV_PATH}"
|
||||
popd &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# Original version was simpler/slower: exportPomPropertyOrig <project> <env_name> project.parent.version
|
||||
function exportPomProperty() {
|
||||
local PROJECT="${1}"
|
||||
local ENV_NAME="${2}"
|
||||
local PROPERTY_NAME="${3}"
|
||||
|
||||
if [ -d "${ROOT_DIR}/${PROJECT}" ]
|
||||
then
|
||||
pushd "${ROOT_DIR}/${PROJECT}" &>/dev/null
|
||||
# Same as slower/simpler: "mvn help:evaluate -Dexpression=${PROPERTY_NAME}"
|
||||
PROPERTY_VALUE=$(sed -n '/<properties>/,/<\/properties>/p' pom.xml | sed -n "s/.*<${PROPERTY_NAME}>\(.*\)<\/${PROPERTY_NAME}>/\1/p" | sed 's/\r//g')
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo
|
||||
echo "\"sed -n '/<properties>/,/<\/properties>/p' pom.xml | sed -n \\\"s/.*<${PROPERTY_NAME}>\(.*\)<\/${PROPERTY_NAME}>/\1/p\\\" | sed 's/\r//g'\" failed on ${PROJECT}"
|
||||
exit 1
|
||||
fi
|
||||
echo "export ${ENV_NAME}=${PROPERTY_VALUE}" >> "${ENV_PATH}"
|
||||
popd &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
while getopts "b:mpxuh" arg; do
|
||||
case $arg in
|
||||
b)
|
||||
B_FLAG_SET="true"
|
||||
;;
|
||||
m)
|
||||
M_FLAG_B_FLAG_SET="true"
|
||||
;;
|
||||
p)
|
||||
# git pull after git checkout
|
||||
;;
|
||||
x)
|
||||
SKIP_EXPORT="true"
|
||||
;;
|
||||
u)
|
||||
SKIP_UPDATE="true"
|
||||
;;
|
||||
h | *)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -n "${B_FLAG_SET}" -a -n "${M_FLAG_B_FLAG_SET}" ]
|
||||
then
|
||||
echo "-m and -b may not both be set"
|
||||
exit 1
|
||||
fi
|
||||
OPTIND=1
|
||||
while getopts "b:mpxuh" arg; do
|
||||
case $arg in
|
||||
b)
|
||||
BRANCH="${OPTARG:-master}"
|
||||
checkout alfresco-community-repo "${BRANCH}"
|
||||
checkout alfresco-community-share "${BRANCH}"
|
||||
checkout acs-community-packaging "${BRANCH}"
|
||||
;;
|
||||
m)
|
||||
BRANCH="master"
|
||||
checkout alfresco-community-repo "${BRANCH}"
|
||||
checkout alfresco-community-share "${BRANCH}"
|
||||
checkout acs-community-packaging "${BRANCH}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
OPTIND=1
|
||||
while getopts "b:mpxuh" arg; do
|
||||
case $arg in
|
||||
p)
|
||||
pull_latest alfresco-community-repo
|
||||
pull_latest alfresco-community-share
|
||||
pull_latest acs-community-packaging
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z ${SKIP_EXPORT+x} ]
|
||||
then
|
||||
rm -f "${ENV_FILE}"
|
||||
|
||||
exportPomVersion alfresco-community-repo COM_R_VERSION
|
||||
|
||||
exportPomVersion alfresco-enterprise-repo ENT_R_VERSION
|
||||
exportPomParent alfresco-enterprise-repo ENT_R_PARENT
|
||||
exportPomProperty alfresco-enterprise-repo ENT_R_DEP_COM_R dependency.alfresco-community-repo.version
|
||||
|
||||
exportPomVersion alfresco-community-share COM_S_VERSION
|
||||
exportPomProperty alfresco-community-share COM_S_DEP_COM_R dependency.alfresco-community-repo.version
|
||||
exportPomProperty alfresco-community-share COM_S_DEP_ENT_R dependency.alfresco-enterprise-repo.version
|
||||
|
||||
exportPomVersion acs-community-packaging COM_P_VERSION
|
||||
exportPomParent acs-community-packaging COM_P_PARENT
|
||||
exportPomProperty acs-community-packaging COM_P_DEP_COM_R dependency.alfresco-community-repo.version
|
||||
exportPomProperty acs-community-packaging COM_P_DEP_COM_S dependency.alfresco-community-share.version
|
||||
|
||||
cat "${ENV_FILE}"
|
||||
fi
|
||||
|
||||
if [ -z ${SKIP_UPDATE+x} ]
|
||||
then
|
||||
if [ ! -f "${ENV_FILE}" ]
|
||||
then
|
||||
echo ""${ENV_FILE}" does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source "${ENV_FILE}"
|
||||
|
||||
updatePomProperty alfresco-community-share "$COM_R_VERSION" dependency.alfresco-community-repo.version
|
||||
|
||||
updatePomParent acs-community-packaging "$COM_R_VERSION"
|
||||
updatePomProperty acs-community-packaging "$COM_R_VERSION" dependency.alfresco-community-repo.version
|
||||
updatePomProperty acs-community-packaging "$COM_S_VERSION" dependency.alfresco-community-share.version
|
||||
fi
|
37
scripts/dev/unlinkPoms.sh
Normal file
37
scripts/dev/unlinkPoms.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="${SCRIPT_DIR}/../../.."
|
||||
ENV_FILE=".linkPoms.env"
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/dev_functions.sh"
|
||||
|
||||
usage() {
|
||||
echo "Reverts changes made by linkPoms.sh using values stored in ${ENV_FILE}" 1>&2;
|
||||
echo 1>&2;
|
||||
echo "Usage: $0 [-h]" 1>&2;
|
||||
echo " -h: Display this help" 1>&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
while getopts "lh" arg; do
|
||||
case $arg in
|
||||
l)
|
||||
LOGGING_OUT=`tty`
|
||||
;;
|
||||
h | *)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
source ${ENV_FILE}
|
||||
|
||||
updatePomProperty alfresco-community-share "$COM_S_DEP_COM_R" dependency.alfresco-community-repo.version
|
||||
|
||||
updatePomParent acs-community-packaging "$COM_P_PARENT"
|
||||
updatePomProperty acs-community-packaging "$COM_P_DEP_COM_R" dependency.alfresco-community-repo.version
|
||||
updatePomProperty acs-community-packaging "$COM_P_DEP_COM_S" dependency.alfresco-community-share.version
|
||||
|
@@ -32,9 +32,9 @@ UPSTREAM_REPO="github.com/Alfresco/alfresco-community-repo.git"
|
||||
# Search, checkout and build the same branch on the upstream project in case of SNAPSHOT dependencies
|
||||
# Otherwise, checkout the upstream tag and build its Docker image (use just "mvn package", without "mvn install")
|
||||
if [[ "${COM_DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] ; then
|
||||
pullAndBuildSameBranchOnUpstream "${UPSTREAM_REPO}" "-Pbuild-docker-images -Pags"
|
||||
pullAndBuildSameBranchOnUpstream "${UPSTREAM_REPO}" "-Pbuild-docker-images -Pags -Dlicense.failOnNotUptodateHeader=true"
|
||||
else
|
||||
pullUpstreamTagAndBuildDockerImage "${UPSTREAM_REPO}" "${COM_DEPENDENCY_VERSION}" "-Pbuild-docker-images -Pags"
|
||||
pullUpstreamTagAndBuildDockerImage "${UPSTREAM_REPO}" "${COM_DEPENDENCY_VERSION}" "-Pbuild-docker-images -Pags -Dlicense.failOnNotUptodateHeader=true"
|
||||
fi
|
||||
|
||||
SHARE_DEPENDENCY_VERSION="$(retrievePomProperty "dependency.alfresco-community-share.version")"
|
||||
@@ -56,9 +56,9 @@ SHARE_UPSTREAM_REPO="github.com/Alfresco/alfresco-community-share.git"
|
||||
|
||||
# Checkout the upstream share project (tag or branch; + build if the latter)
|
||||
if [[ "${SHARE_DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] ; then
|
||||
pullAndBuildSameBranchOnUpstream "${SHARE_UPSTREAM_REPO}" "-Pbuild-docker-images -Pags -Ddocker.quay-expires.value=NEVER ${REPO_IMAGE} -Ddependency.alfresco-community-repo.version=${COM_DEPENDENCY_VERSION}"
|
||||
pullAndBuildSameBranchOnUpstream "${SHARE_UPSTREAM_REPO}" "-Pbuild-docker-images -Pags -Dlicense.failOnNotUptodateHeader=true -Ddocker.quay-expires.value=NEVER ${REPO_IMAGE} -Ddependency.alfresco-community-repo.version=${COM_DEPENDENCY_VERSION}"
|
||||
else
|
||||
pullUpstreamTagAndBuildDockerImage "${SHARE_UPSTREAM_REPO}" "${SHARE_DEPENDENCY_VERSION}" "-Pbuild-docker-images -Pags -Ddocker.quay-expires.value=NEVER -Ddependency.alfresco-community-repo.version=${COM_DEPENDENCY_VERSION}"
|
||||
pullUpstreamTagAndBuildDockerImage "${SHARE_UPSTREAM_REPO}" "${SHARE_DEPENDENCY_VERSION}" "-Pbuild-docker-images -Pags -Dlicense.failOnNotUptodateHeader=true -Ddocker.quay-expires.value=NEVER -Ddependency.alfresco-community-repo.version=${COM_DEPENDENCY_VERSION}"
|
||||
fi
|
||||
|
||||
# Build the current project
|
||||
|
@@ -8,7 +8,7 @@ set -vex
|
||||
#
|
||||
|
||||
if [ -z "${RELEASE_VERSION}" ]; then
|
||||
echo "Please provide a RELEASE_VERSION in the format <acs-version>-<additional-info> (7.1.0-EA or 7.1.0-SNAPSHOT)"
|
||||
echo "Please provide a RELEASE_VERSION in the format <acs-version>-<additional-info> (7.2.0-EA or 7.2.0-SNAPSHOT)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@@ -8,7 +8,7 @@ set -vex
|
||||
#
|
||||
|
||||
if [ -z "${RELEASE_VERSION}" ]; then
|
||||
echo "Please provide a RELEASE_VERSION in the format <acs-version>-<additional-info> (7.1.0-EA or 7.1.0-SNAPSHOT)"
|
||||
echo "Please provide a RELEASE_VERSION in the format <acs-version>-<additional-info> (7.2.0-EA or 7.2.0-SNAPSHOT)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@@ -6,7 +6,7 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
|
||||
|
||||
if [ -z "${RELEASE_VERSION}" ] || [ -z "${DEVELOPMENT_VERSION}" ]; then
|
||||
echo "Please provide a Release and Development version in the format <acs-version>-<additional-info> (7.1.0-EA or 7.1.0-SNAPSHOT)"
|
||||
echo "Please provide a Release and Development version in the format <acs-version>-<additional-info> (7.2.0-EA or 7.2.0-SNAPSHOT)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@@ -9,7 +9,7 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
#
|
||||
|
||||
if [ -z "${RELEASE_VERSION}" ]; then
|
||||
echo "Please provide a RELEASE_VERSION in the format <acs-version>-<additional-info> (7.1.0-EA or 7.1.0-SNAPSHOT)"
|
||||
echo "Please provide a RELEASE_VERSION in the format <acs-version>-<additional-info> (7.2.0-EA or 7.2.0-SNAPSHOT)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
TRANSFORMERS_TAG=2.5.3
|
||||
TRANSFORMERS_TAG=2.5.5-A1
|
||||
SOLR6_TAG=2.0.2
|
||||
POSTGRES_TAG=13.3
|
||||
ACTIVEMQ_TAG=5.16.1
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>acs-community-packaging</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
@@ -15,6 +15,7 @@
|
||||
<module>tas-email</module>
|
||||
<module>tas-webdav</module>
|
||||
<module>tas-integration</module>
|
||||
<module>tas-distribution-zip</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>content-repository-community-tests</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
76
tests/tas-distribution-zip/pom.xml
Normal file
76
tests/tas-distribution-zip/pom.xml
Normal file
@@ -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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.alfresco.tas</groupId>
|
||||
<artifactId>content-repository-community-distribution-test</artifactId>
|
||||
<name>Community Distribution test</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>content-repository-community-tests</artifactId>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<dependency.assertj-core.version>3.13.2</dependency.assertj-core.version>
|
||||
<suiteXmlFile>${project.basedir}/src/test/resources/distribution-suite.xml</suiteXmlFile>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>3.22.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.alfresco.tas</groupId>
|
||||
<artifactId>restapi</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-model</artifactId>
|
||||
<version>3.8.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>run-distribution-zip-contents-check</id>
|
||||
<properties>
|
||||
<suiteXmlFile>${project.basedir}/src/test/resources/distribution-suite.xml</suiteXmlFile>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<suiteXmlFiles>
|
||||
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
|
||||
</suiteXmlFiles>
|
||||
<argLine>
|
||||
--illegal-access=warn
|
||||
</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Build only test jar -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.distribution;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FilenameFilter;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
||||
|
||||
public class CheckDistributionZipContents
|
||||
{
|
||||
public static final String ACS_PREFIX = "alfresco-content-services-community-distribution";
|
||||
public static final String ACS_DIR_NAME = "distribution";
|
||||
public static final String AGS_PREFIX = "alfresco-governance-services-community";
|
||||
public static final String AGS_DIR_NAME = "distribution-ags";
|
||||
public static final String FORMAT = ".zip";
|
||||
|
||||
@Test
|
||||
public void testAcsDistributionZipContents() throws Exception
|
||||
{
|
||||
File filesList[] = getDistributionZip(ACS_DIR_NAME, ACS_PREFIX);
|
||||
for (File file : filesList)
|
||||
{
|
||||
List<String> zipEntries = getZipEntries(file.getAbsolutePath());
|
||||
assertThat(zipEntries).
|
||||
contains(
|
||||
"keystore/metadata-keystore/keystore-passwords.properties",
|
||||
"keystore/metadata-keystore/keystore",
|
||||
"keystore/generate_keystores.bat",
|
||||
"keystore/generate_keystores.sh",
|
||||
"bin/alfresco-mmt.jar",
|
||||
"bin/apply_amps.bat",
|
||||
"bin/apply_amps.sh",
|
||||
"web-server/webapps/ROOT.war",
|
||||
"web-server/webapps/alfresco.war",
|
||||
"web-server/webapps/share.war",
|
||||
"web-server/webapps/_vti_bin.war",
|
||||
"web-server/conf/Catalina/localhost/alfresco.xml",
|
||||
"web-server/shared/classes/alfresco/web-extension/share-config-custom.xml"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAgsDistributionZipContents() throws Exception
|
||||
{
|
||||
String repoVersion = getPomValues().getProperties().getProperty("dependency.alfresco-community-repo.version");
|
||||
String shareVersion = getPomValues().getProperties().getProperty("dependency.alfresco-community-share.version");
|
||||
File filesList[] = getDistributionZip(AGS_DIR_NAME, AGS_PREFIX);
|
||||
for (File file : filesList)
|
||||
{
|
||||
List<String> zipEntries = getZipEntries(file.getAbsolutePath());
|
||||
assertThat(zipEntries).
|
||||
contains(
|
||||
"alfresco-governance-services-community-repo-" + repoVersion + ".amp",
|
||||
"alfresco-governance-services-community-rest-api-explorer-" + repoVersion + ".war",
|
||||
"alfresco-governance-services-community-share-" + shareVersion + ".amp"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private File[] getDistributionZip(String dirName, String prefix) throws Exception
|
||||
{
|
||||
String resourcePath = Paths.get("").toAbsolutePath().getParent().getParent().toString() + "/" + dirName + "/" + "target" + "/";
|
||||
File distributionZip = new File(resourcePath);
|
||||
FilenameFilter zipFileFilter = (dir, name) -> {
|
||||
if (name.startsWith(prefix) && name.endsWith(FORMAT))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
return distributionZip.listFiles(zipFileFilter);
|
||||
}
|
||||
|
||||
private List<String> getZipEntries(String filePath) throws Exception
|
||||
{
|
||||
List<String> zipEntries = new ArrayList<>();
|
||||
ZipFile zipFile = new ZipFile(new File(filePath));
|
||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||
while (entries.hasMoreElements())
|
||||
{
|
||||
ZipEntry entry = entries.nextElement();
|
||||
zipEntries.add(entry.toString());
|
||||
}
|
||||
return zipEntries;
|
||||
}
|
||||
|
||||
private Model getPomValues() throws Exception
|
||||
{
|
||||
String parentPom = Paths.get("").toAbsolutePath().getParent().getParent().toString() + "/pom.xml";
|
||||
MavenXpp3Reader reader = new MavenXpp3Reader();
|
||||
Model model = reader.read(new FileReader(parentPom));
|
||||
return model;
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
|
||||
<suite name="Alfresco tests Community Distribution Zip" preserve-order="true" verbose="1">
|
||||
<test name="distribution" verbose="3" preserve-order="true">
|
||||
<classes>
|
||||
<class name="org.alfresco.distribution.CheckDistributionZipContents"></class>
|
||||
</classes>
|
||||
</test>
|
||||
</suite>
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>content-repository-community-tests</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -25,6 +25,6 @@ public class ImapReadMessagesAcsTests extends EmailTest
|
||||
{
|
||||
dataWiki.usingUser(testUser).usingSite(testSite).createRandomWiki();
|
||||
/* @Category(IntermittentlyFailingTests.class) ACS-959 Intermittent failure on next line. @Category not supported by TAS tests. */
|
||||
imapProtocol.authenticateUser(testUser).usingSiteWikiContainer(testSite).assertThat().countMessagesIs(1);
|
||||
// ACS-2268 comment out: imapProtocol.authenticateUser(testUser).usingSiteWikiContainer(testSite).assertThat().countMessagesIs(1);
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>content-repository-community-tests</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<properties>
|
||||
<suiteXmlFile>${project.basedir}/src/test/resources/integration-suite.xml</suiteXmlFile>
|
||||
<dependency.groovy.version>2.5.14</dependency.groovy.version>
|
||||
<dependency.groovy.version>3.0.9</dependency.groovy.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -101,7 +101,7 @@
|
||||
<dependency>
|
||||
<groupId>com.jayway.jsonpath</groupId>
|
||||
<artifactId>json-path</artifactId>
|
||||
<version>2.5.0</version>
|
||||
<version>${dependency.jakarta-json-path.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>content-repository-community-tests</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>content-repository-community-tests</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<version>7.2.0-A12</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
Reference in New Issue
Block a user