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/07/11 15:11:52 UTC

[plc4x] 05/06: - Fixed some final issues in the build ... - Moved the build of boost out of a self-activating profile (When doing a "mvn clean install" the lib/boost directory would initially exist, therefore maven would skip building it, unfortunately the clean would then delete it and the profile would not be re-enabled, causing the build to fail)

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

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

commit ac02d0e9d99be33d4b868ca7f72a1fdb046dc8d6
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Jul 11 11:30:10 2019 +0200

    - Fixed some final issues in the build ...
    - Moved the build of boost out of a self-activating profile (When doing a "mvn clean install" the lib/boost directory would initially exist, therefore maven would skip building it, unfortunately the clean would then delete it and the profile would not be re-enabled, causing the build to fail)
---
 plc4cpp/pom.xml                           | 158 +++++++++++++-----------------
 pom.xml                                   |   6 ++
 sandbox/code-gen/pom.xml                  |   5 +
 sandbox/test-java-knxnetip-driver/pom.xml |   5 +
 4 files changed, 84 insertions(+), 90 deletions(-)

diff --git a/plc4cpp/pom.xml b/plc4cpp/pom.xml
index 2607250..09b1330 100644
--- a/plc4cpp/pom.xml
+++ b/plc4cpp/pom.xml
@@ -120,100 +120,11 @@
         </plugins>
       </build>
     </profile>
-    <!--
-      Build Boost, if it's not available yet.
-    -->
-    <profile>
-      <id>build-boost</id>
-      <activation>
-        <file>
-          <missing>target/lib/boost</missing>
-        </file>
-      </activation>
-      <build>
-        <plugins>
-          <!-- First download the sources for building the boost library -->
-          <plugin>
-            <groupId>com.googlecode.maven-download-plugin</groupId>
-            <artifactId>download-maven-plugin</artifactId>
-            <version>1.4.0</version>
-            <executions>
-              <execution>
-                <id>get-boost</id>
-                <phase>generate-sources</phase>
-                <goals>
-                  <goal>wget</goal>
-                </goals>
-                <configuration>
-                  <url>${boost.url}</url>
-                  <unpack>true</unpack>
-                  <outputDirectory>${project.build.directory}</outputDirectory>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <!--
-            Then execute two boost build phases:
-
-            1) bootstrap the boost build
-            2) Perform the actual boost build and install
-          -->
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>exec-maven-plugin</artifactId>
-            <version>1.6.0</version>
-            <executions>
-              <execution>
-                <id>bootstrap-boost</id>
-                <phase>process-sources</phase>
-                <goals>
-                  <goal>exec</goal>
-                </goals>
-                <configuration>
-                  <executable>${boost.bootstrap.executable}</executable>
-                  <arguments>
-                    <argument>gcc</argument>
-                  </arguments>
-                  <workingDirectory>${project.build.directory}/boost_${boost.version.underline}</workingDirectory>
-                </configuration>
-              </execution>
-              <execution>
-                <id>compile-boost</id>
-                <phase>process-sources</phase>
-                <goals>
-                  <goal>exec</goal>
-                </goals>
-                <configuration>
-                  <executable>${boost.build.executable}</executable>
-                  <arguments>
-                    <!-- Have the build install the built libraries -->
-                    <argument>install</argument>
-                    <!-- Tell it where to install the libraries and header files -->
-                    <argument>--prefix=${project.build.directory}/lib/boost</argument>
-                    <!-- List of modules to build -->
-                    <argument>--with-system</argument>
-                    <argument>--with-thread</argument>
-                    <argument>--with-date_time</argument>
-                    <argument>--with-regex</argument>
-                    <argument>--with-log</argument>
-                    <!-- On Windows machines the build failed, if this was not explicitly set -->
-                    <argument>address-model=64</argument>
-                    <!-- On Linux machines the build failed, if this is not set -->
-                    <argument>cxxflags=-fPIC</argument>
-                  </arguments>
-                  <workingDirectory>${project.build.directory}/boost_${boost.version.underline}</workingDirectory>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
   </profiles>
 
   <build>
     <plugins>
-      <!-- First download the sources for building the boost library -->
+      <!-- First download the cmake binaries and sources for building the boost library -->
       <plugin>
         <groupId>com.googlecode.maven-download-plugin</groupId>
         <artifactId>download-maven-plugin</artifactId>
@@ -231,6 +142,73 @@
               <outputDirectory>${project.build.directory}</outputDirectory>
             </configuration>
           </execution>
+          <execution>
+            <id>get-boost</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>wget</goal>
+            </goals>
+            <configuration>
+              <url>${boost.url}</url>
+              <unpack>true</unpack>
+              <outputDirectory>${project.build.directory}</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!--
+        Then execute two boost build phases:
+
+        1) bootstrap the boost build
+        2) Perform the actual boost build and install
+      -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.6.0</version>
+        <executions>
+          <execution>
+            <id>bootstrap-boost</id>
+            <phase>process-sources</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>${boost.bootstrap.executable}</executable>
+              <arguments>
+                <argument>gcc</argument>
+              </arguments>
+              <workingDirectory>${project.build.directory}/boost_${boost.version.underline}</workingDirectory>
+            </configuration>
+          </execution>
+          <execution>
+            <id>compile-boost</id>
+            <phase>process-sources</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>${boost.build.executable}</executable>
+              <arguments>
+                <!-- Have the build install the built libraries -->
+                <argument>install</argument>
+                <!-- Tell it where to install the libraries and header files -->
+                <argument>--prefix=${project.build.directory}/lib/boost</argument>
+                <!-- List of modules to build -->
+                <argument>--with-system</argument>
+                <argument>--with-thread</argument>
+                <argument>--with-date_time</argument>
+                <argument>--with-regex</argument>
+                <argument>--with-log</argument>
+                <!-- On Windows machines the build failed, if this was not explicitly set -->
+                <argument>address-model=64</argument>
+                <!-- On Linux machines the build failed, if this is not set -->
+                <argument>cxxflags=-fPIC</argument>
+              </arguments>
+              <workingDirectory>${project.build.directory}/boost_${boost.version.underline}</workingDirectory>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
 
diff --git a/pom.xml b/pom.xml
index ba5e8c9..6a0e20f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -610,6 +610,12 @@
         <version>${junit.jupiter.version}</version>
       </dependency>
       <dependency>
+        <groupId>org.junit.platform</groupId>
+        <artifactId>junit-platform-launcher</artifactId>
+        <version>1.5.0</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <version>${mockito.version}</version>
diff --git a/sandbox/code-gen/pom.xml b/sandbox/code-gen/pom.xml
index e5af414..8e7d37c 100644
--- a/sandbox/code-gen/pom.xml
+++ b/sandbox/code-gen/pom.xml
@@ -62,6 +62,11 @@
       <artifactId>junit-jupiter-api</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.platform</groupId>
+      <artifactId>junit-platform-launcher</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 
diff --git a/sandbox/test-java-knxnetip-driver/pom.xml b/sandbox/test-java-knxnetip-driver/pom.xml
index 7cd88c8..ebb071a 100644
--- a/sandbox/test-java-knxnetip-driver/pom.xml
+++ b/sandbox/test-java-knxnetip-driver/pom.xml
@@ -91,6 +91,11 @@
       <artifactId>junit-jupiter-engine</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.platform</groupId>
+      <artifactId>junit-platform-launcher</artifactId>
+      <scope>test</scope>
+    </dependency>
 
     <dependency>
       <groupId>org.apache.plc4x</groupId>