mirror of
https://github.com/Alfresco/acs-community-packaging.git
synced 2025-05-12 17:05:07 +00:00
Tidy up of README files on how to build projects [skip ci]
This commit is contained in:
parent
3c95f04005
commit
3b57620a06
@ -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
|
||||
|
126
dev/README.md
126
dev/README.md
@ -2,43 +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
|
||||
|
||||
## 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 modifing the top level
|
||||
pom.xml files of each downstream project so that they references the SNAPSHOT versions of the
|
||||
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/linkPoms.sh
|
||||
sh acs-community-packaging/scripts/dev/linkPoms.sh
|
||||
~~~
|
||||
|
||||
## Build -repo projects
|
||||
Build the `alfresco-community-repo` (if you have not
|
||||
## 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.
|
||||
~~~
|
||||
@ -51,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]
|
||||
@ -66,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
|
||||
@ -110,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
|
||||
~~~
|
||||
|
Loading…
x
Reference in New Issue
Block a user