You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/01/16 08:40:46 UTC

[incubator-plc4x] branch develop updated: - Moved the enforcer-checks to a dedicated "development" profile as they only make sense there and could otherwise cause problems when building previous releases.

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new a9412d3  - Moved the enforcer-checks to a dedicated "development" profile as they only make sense there and could otherwise cause problems when building previous releases.
a9412d3 is described below

commit a9412d32dc6dcde1171cae9b4a963812571dae5e
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Jan 16 09:40:43 2019 +0100

    - Moved the enforcer-checks to a dedicated "development" profile as they only make sense there and could otherwise cause problems when building previous releases.
---
 Jenkinsfile |  2 +-
 pom.xml     | 92 ++++++++++++++++++++++++++++++++++++++-----------------------
 2 files changed, 59 insertions(+), 35 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index f6f7d14..237cecf 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -107,7 +107,7 @@ pipeline {
 
                 // We'll deploy to a relative directory so we can save
                 // that and deploy in a later step on a different node
-                sh 'mvn -P${JENKINS_PROFILE} ${MVN_TEST_FAIL_IGNORE} ${JQASSISTANT_NEO4J_VERSION} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy'
+                sh 'mvn -P${JENKINS_PROFILE},development ${MVN_TEST_FAIL_IGNORE} ${JQASSISTANT_NEO4J_VERSION} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy'
 
                 // Stash the build results so we can deploy them on another node
                 stash name: 'plc4x-build-snapshots', includes: 'local-snapshots-dir/**'
diff --git a/pom.xml b/pom.xml
index 065feff..a7f98f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -346,40 +346,6 @@
 
   <build>
     <plugins>
-      <!-- As some plugins require a minimum version of maven, check that this requirement is meet. -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-enforcer-plugin</artifactId>
-        <version>3.0.0-M1</version> <!--$NO-MVN-MAN-VER$-->
-        <executions>
-          <!-- Make sure no dependencies are used for which known vulnerabilities exist. -->
-          <execution>
-            <id>vulnerability-checks</id>
-            <phase>validate</phase>
-            <goals>
-              <goal>enforce</goal>
-            </goals>
-            <configuration>
-              <rules>
-                <requireJavaVersion>
-                  <version>1.8.0</version>
-                </requireJavaVersion>
-                <!-- Disabled for now as it breaks the ability to build single modules -->
-                <!--reactorModuleConvergence/-->
-                <banVulnerable implementation="org.sonatype.ossindex.maven.enforcer.BanVulnerableDependencies"/>
-              </rules>
-            </configuration>
-          </execution>
-        </executions>
-        <dependencies>
-          <dependency>
-            <groupId>org.sonatype.ossindex.maven</groupId>
-            <artifactId>ossindex-maven-enforcer-rules</artifactId>
-            <version>1.0.0</version>
-          </dependency>
-        </dependencies>
-      </plugin>
-
       <plugin>
         <artifactId>maven-jar-plugin</artifactId>
         <configuration>
@@ -1090,6 +1056,12 @@
       </modules>
     </profile>
 
+    <!--
+      This profile is intended to help when having problems with Maven.
+      When enabled, it automatically generates an "effective.pom" in the target directory.
+      This version is the fully expanded version where all inherited configuration is in
+      place and all variables are resolved and profile configuration is included.
+    -->
     <profile>
       <id>debug-pom</id>
       <build>
@@ -1114,6 +1086,9 @@
       </build>
     </profile>
 
+    <!--
+      This profile adds some additional configuration that should only be applied when running on jenkins.
+    -->
     <profile>
       <id>jenkins-build</id>
       <properties>
@@ -1121,6 +1096,50 @@
     </profile>
 
     <!--
+      This profile adds some additional checks and settings that should apply during development,
+      but could cause problems after that. As an example it would be impossible to build a released
+      version, if after the release CVEs were reported for one of its dependencies.
+    -->
+    <profile>
+      <id>development</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-enforcer-plugin</artifactId>
+            <version>3.0.0-M1</version> <!--$NO-MVN-MAN-VER$-->
+            <executions>
+              <!-- Make sure no dependencies are used for which known vulnerabilities exist. -->
+              <execution>
+                <id>vulnerability-checks</id>
+                <phase>validate</phase>
+                <goals>
+                  <goal>enforce</goal>
+                </goals>
+                <configuration>
+                  <rules>
+                    <requireJavaVersion>
+                      <version>1.8.0</version>
+                    </requireJavaVersion>
+                    <reactorModuleConvergence/>
+                    <banVulnerable implementation="org.sonatype.ossindex.maven.enforcer.BanVulnerableDependencies"/>
+                  </rules>
+                </configuration>
+              </execution>
+            </executions>
+            <dependencies>
+              <dependency>
+                <groupId>org.sonatype.ossindex.maven</groupId>
+                <artifactId>ossindex-maven-enforcer-rules</artifactId>
+                <version>1.0.0</version>
+              </dependency>
+            </dependencies>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <!--
       This profile has java-specific plugin configurations
       that might not apply to other languages.
     -->
@@ -1379,6 +1398,11 @@
       </build>
     </profile>
 
+    <!--
+      This profile extends the default "apache-release" configuration with automatic checksum-
+      generation for the release source artifact. It is automatically activated during the
+      release build and only needed there.
+    -->
     <profile>
       <id>apache-release</id>
       <build>