SlideShare uma empresa Scribd logo
1 de 60
SDK 3 Multi Module project
using Nexus 3 for releases
and versioning
Martin Bergljung
Speaker Introduction
• Martin Bergljung – Technical Writer @ Alfresco
• Working with Alfresco products for 11 years doing consulting, product
development, training, documentation
• Speaker at DevCon & Summit 2011, 2012, 2013, 2014
• Speaker at Alfresco Days Washington DC, Brussels, Stockholm
• 2 Books (Alfresco CMIS, Alfresco 3 Business Solutions)
• Developed Alfresco SDK version 2.1, 2.2, 3.0
Learn. Connect. Collaborate.
Agenda
• Ways of structuring Alfresco SDK projects
• Multi Standalone-Module SDK Project Setup
• Get going with Nexus 3
• SDK Project configuration to:
– Deploy snapshot artifacts to Nexus
– Deploy release artifacts to Nexus
– Use a local Nexus repository
• Defining a parent POM for SDK projects
• Defining an SDK aggregator project
• Demo?
Ways of structuring your
Alfresco SDK Project
Learn. Connect. Collaborate.
All extensions contained in one All-In-One (AIO) Project:
Introduction
• All extension JAR projects contained in the same multi module AIO project
• Very useful for smaller projects with 1-2 developers
• Easy to manage and control when not too many developers
• No need for an artifact repository such as Nexus
• Use GitHub for source code control and tagging
• Build, Tag, and Release/Deploy with for example Jenkins
Learn. Connect. Collaborate.
All extensions contained in one All-In-One (AIO) Project:
In Practice
Learn. Connect. Collaborate.
All extensions contained in one All-In-One (AIO) Project:
Pros & Cons
• Pros:
– Easy to get going with
– Easy to manage (with a small team)
– Easy to build
– Easy to understand
– Easy to get the latest code
– No need to install an Artifact Repository Manager, such as Nexus
• Cons:
– No version management – using SNAPSHOTs
• Cannot rely on it to produce a repeatable build
• Downloading 1.0-SNAPSHOT today might give a different file than downloading it
yesterday or tomorrow
– Might build, and release, with incomplete functionality
– Does not promote reuse
– Does not scale well to accommodate more developers
– Difficult to include 3rd party libs not in central artifact repositories
Learn. Connect. Collaborate.
Standalone extensions with aggregator AIO Project:
Introduction
• The standalone JAR projects are managed by individual developers and
versioned and released individually in Nexus
• An AIO project is used to aggregate all the extension JARs and produce
the final WARs, which are release to Nexus, and to run the solution on dev
machines
• A Parent POM is used for all general properties, plugins, profiles etc.
• Very useful for larger projects with >2 developers
• Use GitHub for source code control and tagging
• Release to QA, UAT, PROD with for example Jenkins
Learn. Connect. Collaborate.
Standalone extensions with aggregator AIO Project:
In Practice
Learn. Connect. Collaborate.
Standalone extensions with aggregator AIO Project :
Pros & Cons
• Pros:
– Can manage and version functionality (JARs) separately
– Can manage and version custom WAR artifacts
– Easy to control exactly what functionality is included in the build, can produce reliable
builds
– Functionality can easily be reused
– Lesser risk of building with incomplete and error prone functionality
– Can proxy, and cache, all dependencies via local Nexus Repo
– Can store 3rd-party jars not in Maven Central in local Nexus Repo
• Cons:
– More complex SDK project setup and need to install Nexus
– More administration
– Takes a bit of time to get on top of
– Can forget to build with latest functionality
– Not ideal for Continuous Delivery
Multi Standalone-Module SDK
Project Setup
Learn. Connect. Collaborate.
Introduction to
SDK Multi
Standalone-
Module project
Learn. Connect. Collaborate.
Sample SDK
Multi Standalone-
Module project
setup
(available on my
GitHub account)
• Application Aggregator (Custom based on SDK 3 AIO)
• bp-best-publishing-aggregator
• SDK Parent POM (Custom)
• bp-best-publishing-parent
• Standalone extension modules (Standard SDK 3 JARs)
• bp-book-library-site-ui (Share JAR)
• bp-book-management-site-actions (Platform JAR)
• bp-book-management-site-bootstrap (Platform JAR)
• bp-book-management-site-ui (Share JAR)
• bp-content-ingestion (Platform JAR)
• bp-content-model (Platform JAR)
• bp-content-model-ui (Share JAR)
• bp-metadata-ingestion (Platform JAR)
• bp-publishing-workflow (Platform JAR)
• bp-publishing-workflow-ui (Share JAR)
• Utils JAR (Custom)
• bp-utils
Get going with Nexus 3
Learn. Connect. Collaborate.
Introduction to
Nexus 3
Learn. Connect. Collaborate.
Installing and
Running Nexus 3
with Docker
• Running:
– docker run -d -p 8081:8081 --name nexus
sonatype/nexus3
• Accessing:
– http://localhost:8081 (admin/admin123)
• More info about Nexus images on Docker Hub:
– https://hub.docker.com/r/sonatype/nexus3/
Learn. Connect. Collaborate.
Out-of-the-box
hosted Maven
repos
• The Nexus 3 repository manager ships with the following
configured hosted Maven repositories:
• maven-releases
– This hosted repository uses the maven2 repository format
with a release version policy.
– It is intended to be the repository where your organization
publishes internal releases.
– You can also use this repository for third-party components
that are not available in external repositories and can
therefore not be retrieved via a configured proxy repository.
• maven-snapshots
– This hosted repository uses the maven2 repository format
with a snapshot version policy.
– It is intended to be the repository where your organization
publishes internal development versions, also known as
snapshots.
Learn. Connect. Collaborate.
Out-of-the-box
Maven
Repository
Groups
• The Nexus repository manager ships with the
following Maven group:
• maven-public
– The maven-public group is a repository group of
maven2 formatted repositories and combines
the important external proxy repository for the
Central Repository with the hosted repositories
maven-releases and maven-snapshots.
– This allows you to expose the components of
the Central Repository as well as your internal
components in one single, simple-to-use
repository and therefore URL.
Learn. Connect. Collaborate.
Need to add a
deployment
user
Learn. Connect. Collaborate.
Need to add a
deployment
role
Creating a Parent POM
for SDK projects
Learn. Connect. Collaborate.
Introduction to the SDK/Enterprise Parent POM
• The parent POM is really useful
– It will contain generic configuration that all SDK projects can benefit from:
• Java version
• SDK version
• Alfresco data directory location
• Alfresco version
• Alfresco edition
• Solr locations
• Assembly plugin configuration
• Resource plugin configuration
• JRebel plugin configuration
• Deploy plugin definition
• Release plugin definition
• Nexus snapshot and release repository definition for artifact upload
• Local Nexus repository for artifact download
• Custom project versions used by multiple modules, such as Utils version
Learn. Connect. Collaborate.
Creating the SDK/Enterprise Parent POM
• Basically, use the parent POM in an AIO project:
– Start out by generating an SDK 3 AIO project (mvn archetype:generate -
Dfilter=org.alfresco:)
– Update name and description in parent POM appropriately
– Remove the extension JAR projects (sub modules)
– Remove the <modules> section in parent POM
– Remove alfresco-maven-plugin definition, we are not going to “run” the
parent POM, and configuration for this plugin differ between extension projects
– Remove the maven-resource-plugin so it is not run
– Move jrebel-maven-plugin definition to the pluginManagement section
– Now we are ready to configure deploy and release plugins…
Update Parent POM so we can
Deploy Maven Snapshots
to Nexus
Learn. Connect. Collaborate.
Maven SNAPSHOT version Introduction
• A snapshot version in Maven is one that has not been released.
• The idea is that before a 1.0 release (or any other release) is done, there
exists a 1.0-SNAPSHOT. That version is what might become 1.0. It's
basically "1.0 under development".
• The difference between a "real" version and a snapshot version is that
snapshots might get updates. That means that downloading 1.0-
SNAPSHOT today might give a different file than downloading it yesterday
or tomorrow.
• Usually, snapshot dependencies should only exist during development
and no released version (i.e. no non-snapshot) should have a dependency
on a snapshot version.
Learn. Connect. Collaborate.
Parent POM Updates:
Nexus snapshot repo location
<distributionManagement>
<snapshotRepository>
<id>local-nexus-snapshots</id>
<url>http://localhost:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
• In order for Maven to be able to deploy artifact SNAPSHOTs to Nexus, we
need to tell it what repository to deploy to:
Learn. Connect. Collaborate.
Maven ~/.m2/settings.xml updates
<servers>
<server>
<id>local-nexus-snapshots</id>
<username>deployment</username>
<password>1234</password>
</server>
</servers>
• Nexus will not let you upload artifacts unauthenticated, so we need to
specify what credentials to use for the SNAPSHOT repository:
Learn. Connect. Collaborate.
Out-of-the-box Maven Deploy Plugin introduction
• By default, Maven handles the
deployment mechanism via the built in
maven-deploy-plugin. This is mapped
to the deployment phase of the default
Maven lifecycle.
• The maven-deploy-plugin is a viable
option to handle the task of deploying
project artifacts to Nexus, but it was not
built to take full advantage of what
Nexus has to offer. Because of that fact,
Sonatype built a Nexus specific plugin,
the nexus-staging-maven-plugin.
<plugin>
<artifactId>maven-deploy-
plugin</artifactId>
<version>2.8.1</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
Learn. Connect. Collaborate.
Parent POM Updates:
Define custom Deploy plugin
• The nexus-staging-maven-plugin is
designed to take full advantage of the
more advanced functionality that Nexus
has to offer:
• it is meant to completely replace the
maven-deploy-plugin
• it transparently supports release
and snapshot builds
• supports multiple operation
modes: direct deploy, deferred
deploy, staging and image upload
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-
plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>local-nexus</serverId>
<nexusUrl>http://localhost:8081/nex
us/</nexusUrl>
<skipStaging>true</skipStaging>
</configuration>
</plugin>
• <extensions>true</extensions>: Plugin provides lifecycle enhancements (maven3 only).
Learn. Connect. Collaborate.
bp-best-publishing-parent mbergljung$ mvn clean deploy
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-
plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] -------------------------------------------------
-----------------------
[INFO] Building BestPub Parent Project 1.0-SNAPSHOT
[INFO] -------------------------------------------------
-----------------------
. . .
Deploying SNAPSHOT artifact to Nexus
Update Parent POM so we can
Deploy Maven Releases
to Nexus
Learn. Connect. Collaborate.
Maven release introduction
• Released artifacts are considered to be solid, stable, and perpetual in
order to guarantee that builds that depend upon them are repeatable over
time.
• Released JAR artifacts are associated with PGP signatures, and
checksums verify both the authenticity and integrity of the binary software
artifact.
• The Maven Central repository stores release artifacts.
• A release usually contains a version number according to SemVer
(MAJOR.MINOR.PATCH).
• Product deliverables should be built with released artifacts, never
SNAPSHOT versions.
Learn. Connect. Collaborate.
Parent POM Updates:
Nexus release repo location
<distributionManagement>
<repository>
<id>local-nexus-releases</id>
<url>http://localhost:8081/repository/maven-releases/</url>
</repository>
</distributionManagement>
• In order for Maven to be able to deploy artifact releases to Nexus, we need
to tell it what repository to deploy to:
Learn. Connect. Collaborate.
Maven ~/.m2/settings.xml updates
<servers>
<server>
<id>local-nexus-releases</id>
<username>deployment</username>
<password>1234</password>
</server>
</servers>
• Nexus will not let you upload artifacts unauthenticated, so we need to
specify what credentials to use for the RELEASE repository:
Learn. Connect. Collaborate.
Parent POM Updates:
Source Code Location
The release process will interact with the Software Configuration/Code Management
(SCM) tool used by the project, which means that we need to define the <scm> element in
every top pom.xml:
<scm>
<connection>scm:git:https://github.com/gravitonian/bp-best-publishing-
parent.git</connection>
<url>https://github.com/gravitonian/bp-best-publishing-parent</url>
<developerConnection>scm:git:https://github.com/gravitonian/bp-best-
publishing-parent.git</developerConnection>
</scm>
Learn. Connect. Collaborate.
Parent POM Updates:
Define Release plugin
The standard Maven plugin used by a Release Process is the maven-release-plugin,
and the configuration for this plugin is minimal:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
<autoVersionSubmodules>true</autoVersionSubmodules>
<releaseProfiles>releases</releaseProfiles>
</configuration>
</plugin>
Learn. Connect. Collaborate.
Parent POM Updates:
Define Releases Profile
The Maven Release Plugin activates a releases profile. It’s in this process that the nexus-
staging-maven-plugin is used to perform a deploy to the local-nexus-releases Nexus
repository: <profile>
<id>releases</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>local-nexus</serverId>
<nexusUrl>http://localhost:8081/nexus/</nexusUrl>
<skipStaging>true</skipStaging>
</configuration>
</plugin></plugins></build></profile>
Learn. Connect. Collaborate.
Using the Release Plugin:
Clean project for release
We are performing a Release when the current version of the project is a SNAPSHOT version, say
1.0-SNAPSHOT. Start by cleaning up any previous release attempts:
bp-best-publishing-parent mbergljung$ mvn release:clean
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin
replaced with nexus-staging-maven-plugin
[INFO]
[INFO] --------------------------------------------------
----------------------
[INFO] Building BestPub Parent Project 1.0-SNAPSHOT
[INFO] --------------------------------------------------
----------------------
[INFO]
[INFO] --- maven-release-plugin:2.5.3:clean (default-cli)
@ best-publishing-parent ---
[INFO] Cleaning up after release...
• What happens here?
1. Delete the release descriptor
(release.properties), if any
2. Delete any backup POM files
Learn. Connect. Collaborate.
Using the Release Plugin:
Prepare project for release
When a release is prepared the version number will be updated so SNAPSHOT is
removed, changes pushed, code tagged, then version updated with new SNAPSHOT, and
pushed:
bp-best-publishing-parent mbergljung$ mvn release:prepare
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with
nexus-staging-maven-plugin
[INFO]
[INFO] ----------------------------------------------------------------------
--
[INFO] Building BestPub Parent Project 1.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------
--
[INFO]
[INFO] --- maven-release-plugin:2.5.3:prepare (default-cli) @ best-
publishing-parent ---
[INFO] Verifying that there are no local modifications…
. . .
[INFO] Executing: /bin/sh -c cd /Users/mbergljung/IDEAProjects/devcon/bp-
best-publishing-parent && git tag -F
/var/folders/6b/tr3_cwjd1sv5zl6wfqvvzx440000gp/T/maven-scm-305938066.commit
v1.0
. . .
• What happens here?
• perform some checks – there should be no
uncommitted changes and the project should
depend on no SNAPSHOT dependencies
• change the version of the project in the pom
file to a full release number (remove
SNAPSHOT suffix) – in our example – 1.0
• run the project test suites
• commit and push the changes
• create the tag out of this non-SNAPSHOT
versioned code
• increase the version of the project in the pom
– in our example – 1.1-SNAPSHOT
• commit and push the changes
Learn. Connect. Collaborate.
Results of Prepare Release:
In Local project and POM
The POM file is backed up and a release.properties file is created with information about what tag
that is to be released. The POM is updated with new SNAPSHOT version.
Learn. Connect. Collaborate.
Results of Prepare Release:
In GitHub Project
The GitHub project will be updated with two commits 1) prepare release 1.0 and tag 2)
prepare new development iteration with new SNAPSHOT:
Learn. Connect. Collaborate.
Using the Release Plugin:
Perform the Release of project
When we got the release prepared and tagged in GitHub we are ready to perform the
release to Nexus:
bp-best-publishing-parent mbergljung$ mvn release:perform
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with
nexus-staging-maven-plugin
[INFO]
[INFO] -----------------------------------------------------------------
-------
[INFO] Building BestPub Parent Project 1.1-SNAPSHOT
[INFO] -----------------------------------------------------------------
-------
[INFO]
[INFO] --- maven-release-plugin:2.5.3:perform (default-cli) @ best-
publishing-parent ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: /bin/sh -c cd
/Users/mbergljung/IDEAProjects/devcon/bp-best-publishing-parent/target
&& git clone --branch v1.0 https://github.com/gravitonian/bp-best-
publishing-parent.git /Users/mbergljung/IDEAProjects/devcon/bp-best-
publishing-parent/target/checkout
. . .
• What happens here?
• Checkout release tag from SCM
• Build and deploy released code to Nexus
The second step of the process relies on the
output of the Prepare step, the release.properties.
Learn. Connect. Collaborate.
Results of Perform Release:
In Nexus Repo
After a successful release to
Nexus we should see the
artifact in the maven-
release repository under
the correct package and
version:
Using the Parent POM and
the Local Nexus Repo from
an SDK Project
Learn. Connect. Collaborate.
SDK Project POM Updates:
Parent POM definition
Define the parent POM to get access to all common project configuration and
plugins:
<parent>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>best-publishing-parent</artifactId>
<version>1.1</version>
</parent>
This brings in all the properties configuration from the Parent POM, so we can
pretty much leave the properties section empty:
<properties>
</properties>
Learn. Connect. Collaborate.
SDK Project POM Updates:
Plugin configuration update
The parent POM also contains
most of the plugin
configuration, except the
correct alfresco-maven-
plugin configuration to run the
app server with the extension,
so remove all plugins except
the following:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>${alfresco.sdk.version}</version>
<configuration>
<enableH2>true</enableH2>
<enablePlatform>true</enablePlatform>
<enableSolr>true</enableSolr>
<enableShare>false</enableShare>
<enableApiExplorer>true</enableApiExplorer>
…….. Other config ……… </plugin></plugins>
Learn. Connect. Collaborate.
SDK Project POM Updates:
Source Code Location
The release process will interact with the Software Configuration/Code Management
(SCM) tool used by the project, which means that we need to define the <scm> element in
every extension module pom.xml:
<scm>
<connection>scm:git:https://github.com/{user}/{project}.git</connection>
<url>http://github.com{user}/{project}</url>
<developerConnection>scm:git:https://github.com/{user}/{project}.git
</developerConnection>
</scm>
Learn. Connect. Collaborate.
SDK Project POM Updates:
Local Nexus Repo Location
In order for Maven to be able to find artifacts in the local Nexus repository we
need to add a repository element:
<repositories>
<repository>
<id>local-releases</id>
<url>http://localhost:8081/repository/maven-releases/</url>
</repository>
</repositories>
Needed in every extension project to get access to parent POM.
Learn. Connect. Collaborate.
SDK Project Updates:
Check so maven-javadoc-plugin will run OK
For example, <p/> will generate an error and stop release process:
self-closing element not allowed
[INFO] [ERROR] * <p/>
[INFO] [ERROR] ^
Learn. Connect. Collaborate.
Commit changes
Before you can start releasing your standalone extension the changes that
were made needs to be committed.
Creating an
Application Aggregator Project
Learn. Connect. Collaborate.
Introduction to the Application Aggregator Project
• The application aggregator project is used to aggregate all the standalone
extension projects into one application that can be run (i.e. WAR)
• It is based on a standard SDK 3 AIO project
• It extends the custom Parent POM
• It contains one submodule that will create the Platform App WAR
• It contains one submodule that will create the Share App WAR
Learn. Connect. Collaborate.
Creating the Application Aggregator Project
• Basically, use the parent POM in an AIO project:
– Start out by generating an SDK 3 AIO project (mvn archetype:generate -
Dfilter=org.alfresco:)
– Update name and description in parent POM appropriately
– Extend the custom Parent POM
– Start updating the alfresco-maven-plugin configuration, specifically the
platformModules and shareModules sections, and include all the platform and
share extensions, using release versions
– Define Local Nexus repository for artifact download
Learn. Connect. Collaborate.
Creating the Application Aggregator Project
• Include platform extensions in alfresco-maven-plugin configuration:
<platformModules>
<moduleDependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-share-services</artifactId>
<version>${alfresco.share.version}</version>
<type>amp</type>
</moduleDependency>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>content-model</artifactId>
<version>1.0</version>
</moduleDependency>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>book-management-site-bootstrap</artifactId>
<version>1.1</version>
</moduleDependency>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>utils</artifactId>
<version>1.0</version>
</moduleDependency>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>content-ingestion</artifactId>
<version>1.2</version>
</moduleDependency>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>metadata-ingestion</artifactId>
<version>1.0</version>
</moduleDependency>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>publishing-workflow</artifactId>
<version>1.1</version>
</moduleDependency>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>book-management-site-actions</artifactId>
<version>1.0</version>
</moduleDependency>
</platformModules>
Learn. Connect. Collaborate.
Creating the Application Aggregator Project
• Include share extensions in alfresco-maven-plugin configuration:
<shareModules>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>content-model-ui</artifactId>
<version>1.0</version>
</moduleDependency>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>book-management-site-ui</artifactId>
<version>1.1</version>
</moduleDependency>
<moduleDependency>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>publishing-workflow-ui</artifactId>
<version>1.0</version>
</moduleDependency>
</shareModules>
Learn. Connect. Collaborate.
Creating the Application
Aggregator Project –
Platform App Module
• Create a new submodule called
platform-app
• It will use the maven-war-plugin to
assemble the custom alfresco.war
<artifactId>platform-app</artifactId>
<name>Alfresco Platform WAR Application</name>
<packaging>war</packaging>
<parent>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>best-publishing-aggregator</artifactId>
<version>1.2-SNAPSHOT</version>
</parent>
<properties>
<alfresco.platform.war.artifactId>alfresco-platform </alfresco.platform.war.artifactId>
</properties>
<dependencies>
Platform WAR dependency
All Platform extensions dependencies
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<overlays>
<overlay />
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.platform.war.artifactId}</artifactId>
<type>war</type>
<excludes />
</overlay>
<!-- Include all platform extension JARs here -->
</overlays>
</configuration></plugin>
</plugins></build>
Learn. Connect. Collaborate.
Creating the Application
Aggregator Project –
Share App Module
• Create a new submodule called
share-app
• It will use the maven-war-plugin to
assemble the custom share.war
<artifactId>share-app</artifactId>
<name>Alfresco Share WAR Application</name>
<packaging>war</packaging>
<parent>
<groupId>org.acme.bestpublishing</groupId>
<artifactId>best-publishing-aggregator</artifactId>
<version>1.2-SNAPSHOT</version>
</parent>
<properties>
<alfresco.share.war.artifactId>share</alfresco.share.war.artifactId>
</properties>
<dependencies>
Share WAR dependency
All Share extensions dependencies
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<overlays>
<overlay />
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.share.war.artifactId}</artifactId>
<type>war</type>
<excludes />
</overlay>
<!-- Include all share extension JARs here -->
</overlays>
</configuration></plugin>
</plugins></build>
Learn. Connect. Collaborate.
Results of Performing a Release:
In Nexus Repo
After a successful release to
Nexus we should see the
WAR artifacts in the maven-
release repository under
the correct package and
version:
Demo…
All source code available at
https://github.com/gravitonian/bp-*
Thank you!

Mais conteúdo relacionado

Mais procurados

Alfresco Transform Service DevCon 2019
Alfresco Transform Service DevCon 2019Alfresco Transform Service DevCon 2019
Alfresco Transform Service DevCon 2019J V
 
Jose portillo dev con presentation 1138
Jose portillo   dev con presentation 1138Jose portillo   dev con presentation 1138
Jose portillo dev con presentation 1138Jose Portillo
 
Flexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesFlexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesJeff Potts
 
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...Symphony Software Foundation
 
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Manuel Garcia
 
Architectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondArchitectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondStefan Kopf
 
Alfresco javascript api - Alfresco Devcon 2018
Alfresco javascript api - Alfresco Devcon 2018Alfresco javascript api - Alfresco Devcon 2018
Alfresco javascript api - Alfresco Devcon 2018Mario Romano
 
Apache Kafka 0.8 basic training - Verisign
Apache Kafka 0.8 basic training - VerisignApache Kafka 0.8 basic training - Verisign
Apache Kafka 0.8 basic training - VerisignMichael Noll
 
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...Lucas Jellema
 
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...Lucas Jellema
 
Alfresco Process Services REST API - Alfresco DevCon 2018
 Alfresco Process Services REST API - Alfresco DevCon 2018 Alfresco Process Services REST API - Alfresco DevCon 2018
Alfresco Process Services REST API - Alfresco DevCon 2018Dennis Koch
 
Microcontainers and Tools for Hardcore Container Debugging
Microcontainers and Tools for Hardcore Container DebuggingMicrocontainers and Tools for Hardcore Container Debugging
Microcontainers and Tools for Hardcore Container DebuggingOracle Developers
 
Code the docs-yu liu
Code the docs-yu liuCode the docs-yu liu
Code the docs-yu liuStreamNative
 
Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overviewrajdeep
 
Navigating the Incubator at the Apache Software Foundation
Navigating the Incubator at the Apache Software FoundationNavigating the Incubator at the Apache Software Foundation
Navigating the Incubator at the Apache Software FoundationBrett Porter
 
ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018Mario Romano
 
Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018David Stockton
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No KeeperC4Media
 
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...Chris Fregly
 
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014Amazon Web Services
 

Mais procurados (20)

Alfresco Transform Service DevCon 2019
Alfresco Transform Service DevCon 2019Alfresco Transform Service DevCon 2019
Alfresco Transform Service DevCon 2019
 
Jose portillo dev con presentation 1138
Jose portillo   dev con presentation 1138Jose portillo   dev con presentation 1138
Jose portillo dev con presentation 1138
 
Flexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesFlexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL Templates
 
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...
 
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
 
Architectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondArchitectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyond
 
Alfresco javascript api - Alfresco Devcon 2018
Alfresco javascript api - Alfresco Devcon 2018Alfresco javascript api - Alfresco Devcon 2018
Alfresco javascript api - Alfresco Devcon 2018
 
Apache Kafka 0.8 basic training - Verisign
Apache Kafka 0.8 basic training - VerisignApache Kafka 0.8 basic training - Verisign
Apache Kafka 0.8 basic training - Verisign
 
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
 
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
 
Alfresco Process Services REST API - Alfresco DevCon 2018
 Alfresco Process Services REST API - Alfresco DevCon 2018 Alfresco Process Services REST API - Alfresco DevCon 2018
Alfresco Process Services REST API - Alfresco DevCon 2018
 
Microcontainers and Tools for Hardcore Container Debugging
Microcontainers and Tools for Hardcore Container DebuggingMicrocontainers and Tools for Hardcore Container Debugging
Microcontainers and Tools for Hardcore Container Debugging
 
Code the docs-yu liu
Code the docs-yu liuCode the docs-yu liu
Code the docs-yu liu
 
Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overview
 
Navigating the Incubator at the Apache Software Foundation
Navigating the Incubator at the Apache Software FoundationNavigating the Incubator at the Apache Software Foundation
Navigating the Incubator at the Apache Software Foundation
 
ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018
 
Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No Keeper
 
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
 
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
 

Semelhante a Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases and versioning

Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulMert Çalışkan
 
Tech talk live alfresco add ons
Tech talk live alfresco add onsTech talk live alfresco add ons
Tech talk live alfresco add onsAlfresco Software
 
BP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
BP-10 Keeping Your Sanity – Rapid Development & Deployment ToolsBP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
BP-10 Keeping Your Sanity – Rapid Development & Deployment ToolsAlfresco Software
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenMert Çalışkan
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using MavenScheidt & Bachmann
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topicGourav Varma
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topicKalkey
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to MavenEric Wyles
 
Oracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlOracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlChris Muir
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarkingMallikarjuna G D
 
Contributing to OpenStack
Contributing to OpenStackContributing to OpenStack
Contributing to OpenStackdevkulkarni
 
Introduction in Apache Maven2
Introduction in Apache Maven2Introduction in Apache Maven2
Introduction in Apache Maven2Heiko Scherrer
 

Semelhante a Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases and versioning (20)

Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Tech talk live alfresco add ons
Tech talk live alfresco add onsTech talk live alfresco add ons
Tech talk live alfresco add ons
 
BP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
BP-10 Keeping Your Sanity – Rapid Development & Deployment ToolsBP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
BP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
 
What is maven
What is mavenWhat is maven
What is maven
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
 
Maven
MavenMaven
Maven
 
Oracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlOracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version Control
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarking
 
Contributing to OpenStack
Contributing to OpenStackContributing to OpenStack
Contributing to OpenStack
 
Build tool
Build toolBuild tool
Build tool
 
Introduction in Apache Maven2
Introduction in Apache Maven2Introduction in Apache Maven2
Introduction in Apache Maven2
 

Último

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 

Último (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases and versioning

  • 1. SDK 3 Multi Module project using Nexus 3 for releases and versioning Martin Bergljung
  • 2. Speaker Introduction • Martin Bergljung – Technical Writer @ Alfresco • Working with Alfresco products for 11 years doing consulting, product development, training, documentation • Speaker at DevCon & Summit 2011, 2012, 2013, 2014 • Speaker at Alfresco Days Washington DC, Brussels, Stockholm • 2 Books (Alfresco CMIS, Alfresco 3 Business Solutions) • Developed Alfresco SDK version 2.1, 2.2, 3.0
  • 3. Learn. Connect. Collaborate. Agenda • Ways of structuring Alfresco SDK projects • Multi Standalone-Module SDK Project Setup • Get going with Nexus 3 • SDK Project configuration to: – Deploy snapshot artifacts to Nexus – Deploy release artifacts to Nexus – Use a local Nexus repository • Defining a parent POM for SDK projects • Defining an SDK aggregator project • Demo?
  • 4. Ways of structuring your Alfresco SDK Project
  • 5. Learn. Connect. Collaborate. All extensions contained in one All-In-One (AIO) Project: Introduction • All extension JAR projects contained in the same multi module AIO project • Very useful for smaller projects with 1-2 developers • Easy to manage and control when not too many developers • No need for an artifact repository such as Nexus • Use GitHub for source code control and tagging • Build, Tag, and Release/Deploy with for example Jenkins
  • 6. Learn. Connect. Collaborate. All extensions contained in one All-In-One (AIO) Project: In Practice
  • 7. Learn. Connect. Collaborate. All extensions contained in one All-In-One (AIO) Project: Pros & Cons • Pros: – Easy to get going with – Easy to manage (with a small team) – Easy to build – Easy to understand – Easy to get the latest code – No need to install an Artifact Repository Manager, such as Nexus • Cons: – No version management – using SNAPSHOTs • Cannot rely on it to produce a repeatable build • Downloading 1.0-SNAPSHOT today might give a different file than downloading it yesterday or tomorrow – Might build, and release, with incomplete functionality – Does not promote reuse – Does not scale well to accommodate more developers – Difficult to include 3rd party libs not in central artifact repositories
  • 8. Learn. Connect. Collaborate. Standalone extensions with aggregator AIO Project: Introduction • The standalone JAR projects are managed by individual developers and versioned and released individually in Nexus • An AIO project is used to aggregate all the extension JARs and produce the final WARs, which are release to Nexus, and to run the solution on dev machines • A Parent POM is used for all general properties, plugins, profiles etc. • Very useful for larger projects with >2 developers • Use GitHub for source code control and tagging • Release to QA, UAT, PROD with for example Jenkins
  • 9. Learn. Connect. Collaborate. Standalone extensions with aggregator AIO Project: In Practice
  • 10. Learn. Connect. Collaborate. Standalone extensions with aggregator AIO Project : Pros & Cons • Pros: – Can manage and version functionality (JARs) separately – Can manage and version custom WAR artifacts – Easy to control exactly what functionality is included in the build, can produce reliable builds – Functionality can easily be reused – Lesser risk of building with incomplete and error prone functionality – Can proxy, and cache, all dependencies via local Nexus Repo – Can store 3rd-party jars not in Maven Central in local Nexus Repo • Cons: – More complex SDK project setup and need to install Nexus – More administration – Takes a bit of time to get on top of – Can forget to build with latest functionality – Not ideal for Continuous Delivery
  • 12. Learn. Connect. Collaborate. Introduction to SDK Multi Standalone- Module project
  • 13. Learn. Connect. Collaborate. Sample SDK Multi Standalone- Module project setup (available on my GitHub account) • Application Aggregator (Custom based on SDK 3 AIO) • bp-best-publishing-aggregator • SDK Parent POM (Custom) • bp-best-publishing-parent • Standalone extension modules (Standard SDK 3 JARs) • bp-book-library-site-ui (Share JAR) • bp-book-management-site-actions (Platform JAR) • bp-book-management-site-bootstrap (Platform JAR) • bp-book-management-site-ui (Share JAR) • bp-content-ingestion (Platform JAR) • bp-content-model (Platform JAR) • bp-content-model-ui (Share JAR) • bp-metadata-ingestion (Platform JAR) • bp-publishing-workflow (Platform JAR) • bp-publishing-workflow-ui (Share JAR) • Utils JAR (Custom) • bp-utils
  • 14. Get going with Nexus 3
  • 16. Learn. Connect. Collaborate. Installing and Running Nexus 3 with Docker • Running: – docker run -d -p 8081:8081 --name nexus sonatype/nexus3 • Accessing: – http://localhost:8081 (admin/admin123) • More info about Nexus images on Docker Hub: – https://hub.docker.com/r/sonatype/nexus3/
  • 17. Learn. Connect. Collaborate. Out-of-the-box hosted Maven repos • The Nexus 3 repository manager ships with the following configured hosted Maven repositories: • maven-releases – This hosted repository uses the maven2 repository format with a release version policy. – It is intended to be the repository where your organization publishes internal releases. – You can also use this repository for third-party components that are not available in external repositories and can therefore not be retrieved via a configured proxy repository. • maven-snapshots – This hosted repository uses the maven2 repository format with a snapshot version policy. – It is intended to be the repository where your organization publishes internal development versions, also known as snapshots.
  • 18. Learn. Connect. Collaborate. Out-of-the-box Maven Repository Groups • The Nexus repository manager ships with the following Maven group: • maven-public – The maven-public group is a repository group of maven2 formatted repositories and combines the important external proxy repository for the Central Repository with the hosted repositories maven-releases and maven-snapshots. – This allows you to expose the components of the Central Repository as well as your internal components in one single, simple-to-use repository and therefore URL.
  • 19. Learn. Connect. Collaborate. Need to add a deployment user
  • 20. Learn. Connect. Collaborate. Need to add a deployment role
  • 21. Creating a Parent POM for SDK projects
  • 22. Learn. Connect. Collaborate. Introduction to the SDK/Enterprise Parent POM • The parent POM is really useful – It will contain generic configuration that all SDK projects can benefit from: • Java version • SDK version • Alfresco data directory location • Alfresco version • Alfresco edition • Solr locations • Assembly plugin configuration • Resource plugin configuration • JRebel plugin configuration • Deploy plugin definition • Release plugin definition • Nexus snapshot and release repository definition for artifact upload • Local Nexus repository for artifact download • Custom project versions used by multiple modules, such as Utils version
  • 23. Learn. Connect. Collaborate. Creating the SDK/Enterprise Parent POM • Basically, use the parent POM in an AIO project: – Start out by generating an SDK 3 AIO project (mvn archetype:generate - Dfilter=org.alfresco:) – Update name and description in parent POM appropriately – Remove the extension JAR projects (sub modules) – Remove the <modules> section in parent POM – Remove alfresco-maven-plugin definition, we are not going to “run” the parent POM, and configuration for this plugin differ between extension projects – Remove the maven-resource-plugin so it is not run – Move jrebel-maven-plugin definition to the pluginManagement section – Now we are ready to configure deploy and release plugins…
  • 24. Update Parent POM so we can Deploy Maven Snapshots to Nexus
  • 25. Learn. Connect. Collaborate. Maven SNAPSHOT version Introduction • A snapshot version in Maven is one that has not been released. • The idea is that before a 1.0 release (or any other release) is done, there exists a 1.0-SNAPSHOT. That version is what might become 1.0. It's basically "1.0 under development". • The difference between a "real" version and a snapshot version is that snapshots might get updates. That means that downloading 1.0- SNAPSHOT today might give a different file than downloading it yesterday or tomorrow. • Usually, snapshot dependencies should only exist during development and no released version (i.e. no non-snapshot) should have a dependency on a snapshot version.
  • 26. Learn. Connect. Collaborate. Parent POM Updates: Nexus snapshot repo location <distributionManagement> <snapshotRepository> <id>local-nexus-snapshots</id> <url>http://localhost:8081/repository/maven-snapshots/</url> </snapshotRepository> </distributionManagement> • In order for Maven to be able to deploy artifact SNAPSHOTs to Nexus, we need to tell it what repository to deploy to:
  • 27. Learn. Connect. Collaborate. Maven ~/.m2/settings.xml updates <servers> <server> <id>local-nexus-snapshots</id> <username>deployment</username> <password>1234</password> </server> </servers> • Nexus will not let you upload artifacts unauthenticated, so we need to specify what credentials to use for the SNAPSHOT repository:
  • 28. Learn. Connect. Collaborate. Out-of-the-box Maven Deploy Plugin introduction • By default, Maven handles the deployment mechanism via the built in maven-deploy-plugin. This is mapped to the deployment phase of the default Maven lifecycle. • The maven-deploy-plugin is a viable option to handle the task of deploying project artifacts to Nexus, but it was not built to take full advantage of what Nexus has to offer. Because of that fact, Sonatype built a Nexus specific plugin, the nexus-staging-maven-plugin. <plugin> <artifactId>maven-deploy- plugin</artifactId> <version>2.8.1</version> <executions> <execution> <id>default-deploy</id> <phase>deploy</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin>
  • 29. Learn. Connect. Collaborate. Parent POM Updates: Define custom Deploy plugin • The nexus-staging-maven-plugin is designed to take full advantage of the more advanced functionality that Nexus has to offer: • it is meant to completely replace the maven-deploy-plugin • it transparently supports release and snapshot builds • supports multiple operation modes: direct deploy, deferred deploy, staging and image upload <plugin> <groupId>org.sonatype.plugins</groupId> <artifactId>nexus-staging-maven- plugin</artifactId> <version>1.6.8</version> <extensions>true</extensions> <configuration> <serverId>local-nexus</serverId> <nexusUrl>http://localhost:8081/nex us/</nexusUrl> <skipStaging>true</skipStaging> </configuration> </plugin> • <extensions>true</extensions>: Plugin provides lifecycle enhancements (maven3 only).
  • 30. Learn. Connect. Collaborate. bp-best-publishing-parent mbergljung$ mvn clean deploy [INFO] Scanning for projects... [INFO] Inspecting build with total of 1 modules... [INFO] Installing Nexus Staging features: [INFO] ... total of 1 executions of maven-deploy- plugin replaced with nexus-staging-maven-plugin [INFO] [INFO] ------------------------------------------------- ----------------------- [INFO] Building BestPub Parent Project 1.0-SNAPSHOT [INFO] ------------------------------------------------- ----------------------- . . . Deploying SNAPSHOT artifact to Nexus
  • 31. Update Parent POM so we can Deploy Maven Releases to Nexus
  • 32. Learn. Connect. Collaborate. Maven release introduction • Released artifacts are considered to be solid, stable, and perpetual in order to guarantee that builds that depend upon them are repeatable over time. • Released JAR artifacts are associated with PGP signatures, and checksums verify both the authenticity and integrity of the binary software artifact. • The Maven Central repository stores release artifacts. • A release usually contains a version number according to SemVer (MAJOR.MINOR.PATCH). • Product deliverables should be built with released artifacts, never SNAPSHOT versions.
  • 33. Learn. Connect. Collaborate. Parent POM Updates: Nexus release repo location <distributionManagement> <repository> <id>local-nexus-releases</id> <url>http://localhost:8081/repository/maven-releases/</url> </repository> </distributionManagement> • In order for Maven to be able to deploy artifact releases to Nexus, we need to tell it what repository to deploy to:
  • 34. Learn. Connect. Collaborate. Maven ~/.m2/settings.xml updates <servers> <server> <id>local-nexus-releases</id> <username>deployment</username> <password>1234</password> </server> </servers> • Nexus will not let you upload artifacts unauthenticated, so we need to specify what credentials to use for the RELEASE repository:
  • 35. Learn. Connect. Collaborate. Parent POM Updates: Source Code Location The release process will interact with the Software Configuration/Code Management (SCM) tool used by the project, which means that we need to define the <scm> element in every top pom.xml: <scm> <connection>scm:git:https://github.com/gravitonian/bp-best-publishing- parent.git</connection> <url>https://github.com/gravitonian/bp-best-publishing-parent</url> <developerConnection>scm:git:https://github.com/gravitonian/bp-best- publishing-parent.git</developerConnection> </scm>
  • 36. Learn. Connect. Collaborate. Parent POM Updates: Define Release plugin The standard Maven plugin used by a Release Process is the maven-release-plugin, and the configuration for this plugin is minimal: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.5.3</version> <configuration> <tagNameFormat>v@{project.version}</tagNameFormat> <autoVersionSubmodules>true</autoVersionSubmodules> <releaseProfiles>releases</releaseProfiles> </configuration> </plugin>
  • 37. Learn. Connect. Collaborate. Parent POM Updates: Define Releases Profile The Maven Release Plugin activates a releases profile. It’s in this process that the nexus- staging-maven-plugin is used to perform a deploy to the local-nexus-releases Nexus repository: <profile> <id>releases</id> <build> <plugins> <plugin> <groupId>org.sonatype.plugins</groupId> <artifactId>nexus-staging-maven-plugin</artifactId> <version>1.6.8</version> <extensions>true</extensions> <configuration> <serverId>local-nexus</serverId> <nexusUrl>http://localhost:8081/nexus/</nexusUrl> <skipStaging>true</skipStaging> </configuration> </plugin></plugins></build></profile>
  • 38. Learn. Connect. Collaborate. Using the Release Plugin: Clean project for release We are performing a Release when the current version of the project is a SNAPSHOT version, say 1.0-SNAPSHOT. Start by cleaning up any previous release attempts: bp-best-publishing-parent mbergljung$ mvn release:clean [INFO] Scanning for projects... [INFO] Inspecting build with total of 1 modules... [INFO] Installing Nexus Staging features: [INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin [INFO] [INFO] -------------------------------------------------- ---------------------- [INFO] Building BestPub Parent Project 1.0-SNAPSHOT [INFO] -------------------------------------------------- ---------------------- [INFO] [INFO] --- maven-release-plugin:2.5.3:clean (default-cli) @ best-publishing-parent --- [INFO] Cleaning up after release... • What happens here? 1. Delete the release descriptor (release.properties), if any 2. Delete any backup POM files
  • 39. Learn. Connect. Collaborate. Using the Release Plugin: Prepare project for release When a release is prepared the version number will be updated so SNAPSHOT is removed, changes pushed, code tagged, then version updated with new SNAPSHOT, and pushed: bp-best-publishing-parent mbergljung$ mvn release:prepare [INFO] Scanning for projects... [INFO] Inspecting build with total of 1 modules... [INFO] Installing Nexus Staging features: [INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin [INFO] [INFO] ---------------------------------------------------------------------- -- [INFO] Building BestPub Parent Project 1.0-SNAPSHOT [INFO] ---------------------------------------------------------------------- -- [INFO] [INFO] --- maven-release-plugin:2.5.3:prepare (default-cli) @ best- publishing-parent --- [INFO] Verifying that there are no local modifications… . . . [INFO] Executing: /bin/sh -c cd /Users/mbergljung/IDEAProjects/devcon/bp- best-publishing-parent && git tag -F /var/folders/6b/tr3_cwjd1sv5zl6wfqvvzx440000gp/T/maven-scm-305938066.commit v1.0 . . . • What happens here? • perform some checks – there should be no uncommitted changes and the project should depend on no SNAPSHOT dependencies • change the version of the project in the pom file to a full release number (remove SNAPSHOT suffix) – in our example – 1.0 • run the project test suites • commit and push the changes • create the tag out of this non-SNAPSHOT versioned code • increase the version of the project in the pom – in our example – 1.1-SNAPSHOT • commit and push the changes
  • 40. Learn. Connect. Collaborate. Results of Prepare Release: In Local project and POM The POM file is backed up and a release.properties file is created with information about what tag that is to be released. The POM is updated with new SNAPSHOT version.
  • 41. Learn. Connect. Collaborate. Results of Prepare Release: In GitHub Project The GitHub project will be updated with two commits 1) prepare release 1.0 and tag 2) prepare new development iteration with new SNAPSHOT:
  • 42. Learn. Connect. Collaborate. Using the Release Plugin: Perform the Release of project When we got the release prepared and tagged in GitHub we are ready to perform the release to Nexus: bp-best-publishing-parent mbergljung$ mvn release:perform [INFO] Scanning for projects... [INFO] Inspecting build with total of 1 modules... [INFO] Installing Nexus Staging features: [INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin [INFO] [INFO] ----------------------------------------------------------------- ------- [INFO] Building BestPub Parent Project 1.1-SNAPSHOT [INFO] ----------------------------------------------------------------- ------- [INFO] [INFO] --- maven-release-plugin:2.5.3:perform (default-cli) @ best- publishing-parent --- [INFO] Checking out the project to perform the release ... [INFO] Executing: /bin/sh -c cd /Users/mbergljung/IDEAProjects/devcon/bp-best-publishing-parent/target && git clone --branch v1.0 https://github.com/gravitonian/bp-best- publishing-parent.git /Users/mbergljung/IDEAProjects/devcon/bp-best- publishing-parent/target/checkout . . . • What happens here? • Checkout release tag from SCM • Build and deploy released code to Nexus The second step of the process relies on the output of the Prepare step, the release.properties.
  • 43. Learn. Connect. Collaborate. Results of Perform Release: In Nexus Repo After a successful release to Nexus we should see the artifact in the maven- release repository under the correct package and version:
  • 44. Using the Parent POM and the Local Nexus Repo from an SDK Project
  • 45. Learn. Connect. Collaborate. SDK Project POM Updates: Parent POM definition Define the parent POM to get access to all common project configuration and plugins: <parent> <groupId>org.acme.bestpublishing</groupId> <artifactId>best-publishing-parent</artifactId> <version>1.1</version> </parent> This brings in all the properties configuration from the Parent POM, so we can pretty much leave the properties section empty: <properties> </properties>
  • 46. Learn. Connect. Collaborate. SDK Project POM Updates: Plugin configuration update The parent POM also contains most of the plugin configuration, except the correct alfresco-maven- plugin configuration to run the app server with the extension, so remove all plugins except the following: <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> </plugin> <plugin> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <version>${alfresco.sdk.version}</version> <configuration> <enableH2>true</enableH2> <enablePlatform>true</enablePlatform> <enableSolr>true</enableSolr> <enableShare>false</enableShare> <enableApiExplorer>true</enableApiExplorer> …….. Other config ……… </plugin></plugins>
  • 47. Learn. Connect. Collaborate. SDK Project POM Updates: Source Code Location The release process will interact with the Software Configuration/Code Management (SCM) tool used by the project, which means that we need to define the <scm> element in every extension module pom.xml: <scm> <connection>scm:git:https://github.com/{user}/{project}.git</connection> <url>http://github.com{user}/{project}</url> <developerConnection>scm:git:https://github.com/{user}/{project}.git </developerConnection> </scm>
  • 48. Learn. Connect. Collaborate. SDK Project POM Updates: Local Nexus Repo Location In order for Maven to be able to find artifacts in the local Nexus repository we need to add a repository element: <repositories> <repository> <id>local-releases</id> <url>http://localhost:8081/repository/maven-releases/</url> </repository> </repositories> Needed in every extension project to get access to parent POM.
  • 49. Learn. Connect. Collaborate. SDK Project Updates: Check so maven-javadoc-plugin will run OK For example, <p/> will generate an error and stop release process: self-closing element not allowed [INFO] [ERROR] * <p/> [INFO] [ERROR] ^
  • 50. Learn. Connect. Collaborate. Commit changes Before you can start releasing your standalone extension the changes that were made needs to be committed.
  • 52. Learn. Connect. Collaborate. Introduction to the Application Aggregator Project • The application aggregator project is used to aggregate all the standalone extension projects into one application that can be run (i.e. WAR) • It is based on a standard SDK 3 AIO project • It extends the custom Parent POM • It contains one submodule that will create the Platform App WAR • It contains one submodule that will create the Share App WAR
  • 53. Learn. Connect. Collaborate. Creating the Application Aggregator Project • Basically, use the parent POM in an AIO project: – Start out by generating an SDK 3 AIO project (mvn archetype:generate - Dfilter=org.alfresco:) – Update name and description in parent POM appropriately – Extend the custom Parent POM – Start updating the alfresco-maven-plugin configuration, specifically the platformModules and shareModules sections, and include all the platform and share extensions, using release versions – Define Local Nexus repository for artifact download
  • 54. Learn. Connect. Collaborate. Creating the Application Aggregator Project • Include platform extensions in alfresco-maven-plugin configuration: <platformModules> <moduleDependency> <groupId>${alfresco.groupId}</groupId> <artifactId>alfresco-share-services</artifactId> <version>${alfresco.share.version}</version> <type>amp</type> </moduleDependency> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>content-model</artifactId> <version>1.0</version> </moduleDependency> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>book-management-site-bootstrap</artifactId> <version>1.1</version> </moduleDependency> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>utils</artifactId> <version>1.0</version> </moduleDependency> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>content-ingestion</artifactId> <version>1.2</version> </moduleDependency> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>metadata-ingestion</artifactId> <version>1.0</version> </moduleDependency> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>publishing-workflow</artifactId> <version>1.1</version> </moduleDependency> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>book-management-site-actions</artifactId> <version>1.0</version> </moduleDependency> </platformModules>
  • 55. Learn. Connect. Collaborate. Creating the Application Aggregator Project • Include share extensions in alfresco-maven-plugin configuration: <shareModules> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>content-model-ui</artifactId> <version>1.0</version> </moduleDependency> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>book-management-site-ui</artifactId> <version>1.1</version> </moduleDependency> <moduleDependency> <groupId>org.acme.bestpublishing</groupId> <artifactId>publishing-workflow-ui</artifactId> <version>1.0</version> </moduleDependency> </shareModules>
  • 56. Learn. Connect. Collaborate. Creating the Application Aggregator Project – Platform App Module • Create a new submodule called platform-app • It will use the maven-war-plugin to assemble the custom alfresco.war <artifactId>platform-app</artifactId> <name>Alfresco Platform WAR Application</name> <packaging>war</packaging> <parent> <groupId>org.acme.bestpublishing</groupId> <artifactId>best-publishing-aggregator</artifactId> <version>1.2-SNAPSHOT</version> </parent> <properties> <alfresco.platform.war.artifactId>alfresco-platform </alfresco.platform.war.artifactId> </properties> <dependencies> Platform WAR dependency All Platform extensions dependencies </dependencies> <build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>3.2.0</version> <configuration> <overlays> <overlay /> <overlay> <groupId>${alfresco.groupId}</groupId> <artifactId>${alfresco.platform.war.artifactId}</artifactId> <type>war</type> <excludes /> </overlay> <!-- Include all platform extension JARs here --> </overlays> </configuration></plugin> </plugins></build>
  • 57. Learn. Connect. Collaborate. Creating the Application Aggregator Project – Share App Module • Create a new submodule called share-app • It will use the maven-war-plugin to assemble the custom share.war <artifactId>share-app</artifactId> <name>Alfresco Share WAR Application</name> <packaging>war</packaging> <parent> <groupId>org.acme.bestpublishing</groupId> <artifactId>best-publishing-aggregator</artifactId> <version>1.2-SNAPSHOT</version> </parent> <properties> <alfresco.share.war.artifactId>share</alfresco.share.war.artifactId> </properties> <dependencies> Share WAR dependency All Share extensions dependencies </dependencies> <build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>3.2.0</version> <configuration> <overlays> <overlay /> <overlay> <groupId>${alfresco.groupId}</groupId> <artifactId>${alfresco.share.war.artifactId}</artifactId> <type>war</type> <excludes /> </overlay> <!-- Include all share extension JARs here --> </overlays> </configuration></plugin> </plugins></build>
  • 58. Learn. Connect. Collaborate. Results of Performing a Release: In Nexus Repo After a successful release to Nexus we should see the WAR artifacts in the maven- release repository under the correct package and version:
  • 60. All source code available at https://github.com/gravitonian/bp-* Thank you!