You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ro...@apache.org on 2022/07/12 14:46:55 UTC

[activemq-artemis-native] branch main updated (729d53e -> c63e202)

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

robbie pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis-native.git


    from 729d53e  add a GHA CI build job to run the build+test and some checks
     new 75bd61d  adjust steps so that the .h is always [re]generated before cmake runs in regular mvn builds
     new e24521f  make slf4j-api use provided scope, broker will supply an appropriate version
     new c63e202  make indent consistent and reorder for clarity

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                            | 73 +++++++++++++---------
 .../artemis/nativo/jlibaio/LibaioContext.java      |  6 +-
 2 files changed, 48 insertions(+), 31 deletions(-)


[activemq-artemis-native] 01/03: adjust steps so that the .h is always [re]generated before cmake runs in regular mvn builds

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis-native.git

commit 75bd61d966d4617ed34fd61ffe9c6b03564b93ce
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Tue Jul 12 14:02:16 2022 +0100

    adjust steps so that the .h is always [re]generated before cmake runs in regular mvn builds
---
 pom.xml                                            | 39 ++++++++++++++--------
 .../artemis/nativo/jlibaio/LibaioContext.java      |  6 ++--
 2 files changed, 30 insertions(+), 15 deletions(-)

diff --git a/pom.xml b/pom.xml
index 179f082..9a5691c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,7 +134,7 @@
                         <executions>
                             <execution>
                                 <id>build</id>
-                                <phase>generate-sources</phase>
+                                <phase>process-sources</phase>
                                 <goals>
                                     <goal>exec</goal>
                                 </goals>
@@ -158,7 +158,7 @@
                         <executions>
                             <execution>
                                 <id>build</id>
-                                <phase>generate-sources</phase>
+                                <phase>process-sources</phase>
                                 <goals>
                                     <goal>exec</goal>
                                 </goals>
@@ -182,7 +182,7 @@
                         <executions>
                             <execution>
                                 <id>build</id>
-                                <phase>generate-sources</phase>
+                                <phase>process-sources</phase>
                                 <goals>
                                     <goal>exec</goal>
                                 </goals>
@@ -259,16 +259,6 @@
     <build>
         <pluginManagement>
             <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <configuration>
-                        <compilerArgs>
-                            <arg>-h</arg>
-                            <arg>./src/main/c</arg>
-                        </compilerArgs>
-                    </configuration>
-                </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-surefire-plugin</artifactId>
@@ -410,6 +400,29 @@
                 <artifactId>maven-help-plugin</artifactId>
                 <version>2.2</version>
             </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-compile</id>
+                        <!-- Running compilation at generate-sources stage instead, to also generate the .h file
+                             ahead of running the cmake build at process-sources phase, in the profiles above -->
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                        <configuration>
+                            <compilerArgs>
+                                <arg>-h</arg>
+                                <arg>./src/main/c</arg>
+                            </compilerArgs>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
diff --git a/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LibaioContext.java b/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LibaioContext.java
index 2e6d6fe..d776ea7 100644
--- a/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LibaioContext.java
+++ b/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LibaioContext.java
@@ -44,9 +44,11 @@ import org.slf4j.LoggerFactory;
  * <a href="https://ext4.wiki.kernel.org/index.php/Clarifying_Direct_IO's_Semantics">Interesting reading for this.</a>
  */
 public class LibaioContext<Callback extends SubmitInfo> implements Closeable {
-   /* Notice: After making changes to the native interface, you have to use mvn install at least once to generate the include file.
+   /* Notice: After making changes to the native interface, mvn 'generate-sources' must occur at least once to generate the updated include file.
       This is because the maven compiler plugin is the one generating org_apache_activemq_artemis_native_jlibaio_LibaioContext.h
-      So that file needs to be updated before Cmake comes along to compile the module. */
+      So that file needs to be updated before Cmake comes along to compile the module.
+      This normally happens as needed in the regular mvn build, so if you use e.g 'mvn clean install -Ppodman' then no extra step is needed,
+      specific attention is only required if you e.g run the build scripts directly yourself. */
 
    private static final Logger logger = LoggerFactory.getLogger(LibaioContext.class);
 


[activemq-artemis-native] 03/03: make indent consistent and reorder for clarity

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis-native.git

commit c63e20275bbf7512e9af9a4d56cd5b31fd15a5d3
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Tue Jul 12 15:24:37 2022 +0100

    make indent consistent and reorder for clarity
---
 pom.xml | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/pom.xml b/pom.xml
index 95b0884..307aeec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -83,6 +83,14 @@
     </issueManagement>
 
     <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${slf4j.version}</version>
+            <scope>provided</scope>
+            <!-- License: MIT -->
+        </dependency>
+
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
@@ -90,24 +98,17 @@
             <scope>test</scope>
             <!-- License: EPL 1.0 -->
         </dependency>
-       <dependency>
-          <groupId>org.jacoco</groupId>
-          <artifactId>org.jacoco.ant</artifactId>
-          <version>${version.org.jacoco}</version>
-          <scope>test</scope>
-       </dependency>
-       <dependency>
-          <groupId>org.jacoco</groupId>
-          <artifactId>org.jacoco.core</artifactId>
-          <version>${version.org.jacoco}</version>
-           <scope>test</scope>
-       </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>${slf4j.version}</version>
-            <scope>provided</scope>
-            <!-- License: MIT -->
+            <groupId>org.jacoco</groupId>
+            <artifactId>org.jacoco.ant</artifactId>
+            <version>${version.org.jacoco}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jacoco</groupId>
+            <artifactId>org.jacoco.core</artifactId>
+            <version>${version.org.jacoco}</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>


[activemq-artemis-native] 02/03: make slf4j-api use provided scope, broker will supply an appropriate version

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis-native.git

commit e24521f0551eb3f78d48115b7c558f18c330b6a1
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Tue Jul 12 15:23:37 2022 +0100

    make slf4j-api use provided scope, broker will supply an appropriate version
---
 pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pom.xml b/pom.xml
index 9a5691c..95b0884 100644
--- a/pom.xml
+++ b/pom.xml
@@ -106,6 +106,7 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
             <version>${slf4j.version}</version>
+            <scope>provided</scope>
             <!-- License: MIT -->
         </dependency>
         <dependency>