Skip to content

Commit

Permalink
Fixed some issues with the build that surfaced during the last releas…
Browse files Browse the repository at this point in the history
…e attempt.
  • Loading branch information
chrisdutz committed May 21, 2019
1 parent d8ecf5d commit e84a660
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 15 deletions.
10 changes: 5 additions & 5 deletions plc4j/integrations/apache-karaf/karaf-demo-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@
<usedDependencies>
<usedDependency>org.apache.karaf.features:framework</usedDependency>
<usedDependency>org.apache.karaf.features:standard</usedDependency>
<usedDependency>org.apache.plc4x:karaf-ads-feature</usedDependency>
<usedDependency>org.apache.plc4x:karaf-ethernet-ip-feature</usedDependency>
<usedDependency>org.apache.plc4x:karaf-modbus-feature</usedDependency>
<usedDependency>org.apache.plc4x:karaf-s7-feature</usedDependency>
<usedDependency>org.apache.plc4x:karaf-simulated-feature</usedDependency>
<usedDependency>org.apache.plc4x:plc4j-karaf-ads-feature</usedDependency>
<usedDependency>org.apache.plc4x:plc4j-karaf-ethernet-ip-feature</usedDependency>
<usedDependency>org.apache.plc4x:plc4j-karaf-modbus-feature</usedDependency>
<usedDependency>org.apache.plc4x:plc4j-karaf-s7-feature</usedDependency>
<usedDependency>org.apache.plc4x:plc4j-karaf-simulated-feature</usedDependency>
</usedDependencies>
</configuration>
</plugin>
Expand Down
29 changes: 26 additions & 3 deletions plc4j/utils/interop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<failOnWarning>true</failOnWarning>
<usedDependencies combine.children="append">
<usedDependency>org.apache.plc4x:plc4x-tools-thrift</usedDependency>
<usedDependency>org.apache.plc4x:plc4x-protocols-proxy</usedDependency>
<usedDependency>javax.annotation:jsr250-api</usedDependency>
</usedDependencies>
</configuration>
Expand Down Expand Up @@ -182,13 +183,35 @@
</dependency>

<!-- Make sure this is built before this module -->
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-proxy</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-tools-thrift</artifactId>
<version>0.4.0-SNAPSHOT</version>
<type>pom</type>
<optional>true</optional>
<type>zip</type>
<classifier>compiler-${os.classifier}</classifier>
<scope>provided</scope>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-proxy</artifactId>
<version>0.4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-tools-thrift</artifactId>
<version>0.4.0-SNAPSHOT</version>
<type>zip</type>
<classifier>compiler-${os.classifier}</classifier>
</dependency>
</dependencies>
</dependencyManagement>

</project>
16 changes: 9 additions & 7 deletions src/site/asciidoc/developers/release.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ This is the version the `develop` branch will be changed to.
The parameter `autoVersionSubmodules` will tell the release plugin to release all modules with the same version.
Otherwise we would have to define the working copy version for each module.

mvn release:branch -Pwith-cpp,with-dotnet,with-java,with-proxies,with-python,with-sandbox -DbranchName=rel/{minor-version} -DautoVersionSubmodules=true
mvn release:branch -P with-cpp,with-dotnet,with-java,with-proxies,with-python,with-sandbox -DbranchName=rel/{minor-version} -DautoVersionSubmodules=true

Per default the plugin suggests the next bugfix version as working version, however we want it to use the next minor version.
So in case of preparing the release branch for `0.4.0-SNAPSHOT` the command would be the following:

mvn release:branch -Pwith-cpp,with-dotnet,with-java,with-proxies,with-python,with-sandbox -DbranchName=rel/0.4 -DautoVersionSubmodules=true
mvn release:branch -P with-cpp,with-dotnet,with-java,with-proxies,with-python,with-sandbox -DbranchName=rel/0.4 -DautoVersionSubmodules=true

The plugin will then aks for the version:

Expand Down Expand Up @@ -161,9 +161,9 @@ In order to prepare a release-candidate, the first step is switching to the corr
After that, the following command will to all preparation steps for the release:
mvn release:prepare -P with-cpp -DautoVersionSubmodules=true
mvn release:prepare -P with-cpp,with-dotnet,with-java,with-proxies,with-python,with-sandbox -DautoVersionSubmodules=true
(The `-P with-cpp` tells maven to activace the `with-cpp` profile which also enables the C++ modules and makes sure the versions of these modules are updated as part of the release)
(The `-P with-cpp,with-dotnet,with-java,with-proxies,with-python,with-sandbox` tells maven to activate the all profiles that partition the build and makes sure the versions of all modules are updated as part of the release)
In general the plugin will now ask you 3 questions:
1. The version we want to release as (It will suggest the version you get by omitting the `-SNAPSHOT` suffix)
Expand Down Expand Up @@ -221,16 +221,18 @@ However it will not delete the tag in GIT (locally and remotely). So you have to
This is done by executing another goal of the `maven-release-plugin`:
mvn release:perform
mvn release:perform -DreleaseProfiles=apache-release,with-java,with-proxies
This executes automatically as all information it requires is located in the `release.properties` file the `prepare` goal prepared.
The first step is that the `perform` goal checks out the previously tagged revision into the root modules `target/checkout` directory.
Here it automatically executes a maven build (You don't have to do this, it's just that you know what's happening):
mvn clean deploy -P apache-release
mvn clean deploy -P apache-release,with-java,with-proxies
This builds and tests the project as well as creates the JavaDocs, Source packages and signs each of these with your PGP key.
As the `apache-release` profile is also activated, this builds and tests the project as well as creates the JavaDocs, Source packages and signs each of these with your PGP key.
We are intentionally not adding the other profiles, as these either produce binary artifacts that usually only work on the system they were compiled on (C++, .Net) or we haven't found a good way to distribute them via Maven yet (Python) or deployment is disabled anyway (sandbox).
As this time the build is building with release versions, Maven will automatically choose the release url for deploying artifacts.
Expand Down

0 comments on commit e84a660

Please sign in to comment.