Skip to content

Commit

Permalink
[Build] Improve method by which examples are included from deployment
Browse files Browse the repository at this point in the history
When using local staging the deployment is deferred to the last module.
Because half the project consists of examples that should not be
deployed and thus skip the execution of the nexus staging plugin
this causes the whole whole project to skip deployment.

By having `continuous-deployment` as last module in the build we ensured
that the nexus plugin is triggered uploads all artifacts at the end of
the build.

This however results in the inclusion of the `continuous-deployment`
artifact. By putting examples in a profile that is active by default
we do ensure it will always be build and but can exclude it from the
actual release.
  • Loading branch information
mpkorstanje committed Sep 23, 2018
1 parent 49d8f68 commit f8183b2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 47 deletions.
2 changes: 1 addition & 1 deletion continuous-deployment/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
if [ "$TRAVIS_BRANCH" = 'master' ] && [ "$TRAVIS_PULL_REQUEST" == 'false' ]; then
mvn deploy -Psign-source-javadoc --settings continuous-deployment/travis-settings.xml -DskipTests=true
mvn deploy -P-examples -Psign-source-javadoc --settings continuous-deployment/travis-settings.xml -DskipTests=true
else
echo "Artifacts are only deployed on a build of the master branch"
fi
43 changes: 0 additions & 43 deletions continuous-deployment/pom.xml

This file was deleted.

13 changes: 10 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -519,12 +519,19 @@
<module>weld</module>
<module>openejb</module>
<module>needle</module>
<module>examples</module>
<!--This should always be the last module -->
<module>continuous-deployment</module>
</modules>

<profiles>
<profile>
<id>examples</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>examples</module>
</modules>
</profile>

<profile>
<id>sign-source-javadoc</id>
<build>
Expand Down

0 comments on commit f8183b2

Please sign in to comment.