You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by dc...@apache.org on 2021/03/24 12:27:01 UTC
[datasketches-memory] branch multi-module-experimental updated: Add
module definition
This is an automated email from the ASF dual-hosted git repository.
dcromberge pushed a commit to branch multi-module-experimental
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
The following commit(s) were added to refs/heads/multi-module-experimental by this push:
new 1e2873e Add module definition
1e2873e is described below
commit 1e2873ef9aeb655ccd342ac55b8acba78199f77b
Author: David Cromberge <da...@gmail.com>
AuthorDate: Wed Mar 24 12:26:41 2021 +0000
Add module definition
---
datasketches-memory-java11/pom.xml | 4 ++--
.../java/module-info.java} | 28 +++-------------------
.../datasketches/memory/AllocateDirectTest.java | 3 +++
datasketches-memory-multirelease/pom.xml | 1 +
.../src/assembly/mrjar.xml | 15 ++++++++++++
5 files changed, 24 insertions(+), 27 deletions(-)
diff --git a/datasketches-memory-java11/pom.xml b/datasketches-memory-java11/pom.xml
index a3fcd86..ee92c7d 100644
--- a/datasketches-memory-java11/pom.xml
+++ b/datasketches-memory-java11/pom.xml
@@ -61,9 +61,9 @@
<target>11</target>
<compilerArgs>
<arg>--add-exports</arg>
- <arg>java.base/sun.nio.ch=ALL-UNNAMED</arg>
+ <arg>java.base/sun.nio.ch=org.apache.datasketches.memory</arg>
<arg>--add-exports</arg>
- <arg>java.base/jdk.internal.ref=ALL-UNNAMED</arg>
+ <arg>java.base/jdk.internal.ref=org.apache.datasketches.memory</arg>
</compilerArgs>
<jdkToolchain>
<version>11</version>
diff --git a/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java b/datasketches-memory-java11/src/main/java/module-info.java
similarity index 57%
copy from datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java
copy to datasketches-memory-java11/src/main/java/module-info.java
index e89396a..b5a79a1 100644
--- a/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java
+++ b/datasketches-memory-java11/src/main/java/module-info.java
@@ -17,28 +17,6 @@
* under the License.
*/
-/*
- * Note: Lincoln's Gettysburg Address is in the public domain. See LICENSE.
- */
-
-package org.apache.datasketches.memory;
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-@SuppressWarnings("javadoc")
-public class AllocateDirectTest {
-
- @Test
- public void simpleAllocateDirect() {
- int longs = 32;
- try (WritableDirectHandle wh = WritableMemory.allocateDirect(longs << 3)) {
- WritableMemory wMem1 = wh.get();
- for (int i = 0; i < longs; i++) {
- wMem1.putLong(i << 3, i);
- assertEquals(wMem1.getLong(i << 3), i);
- }
- }
- }
-}
+module org.apache.datasketches.memory {
+ exports org.apache.datasketches.memory;
+}
\ No newline at end of file
diff --git a/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java b/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java
index e89396a..d99a768 100644
--- a/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java
+++ b/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java
@@ -21,6 +21,8 @@
* Note: Lincoln's Gettysburg Address is in the public domain. See LICENSE.
*/
+// Commented out, testing needs to be a standalone module
+/*
package org.apache.datasketches.memory;
import org.testng.annotations.Test;
@@ -42,3 +44,4 @@ public class AllocateDirectTest {
}
}
}
+*/
\ No newline at end of file
diff --git a/datasketches-memory-multirelease/pom.xml b/datasketches-memory-multirelease/pom.xml
index 9845c73..2631571 100644
--- a/datasketches-memory-multirelease/pom.xml
+++ b/datasketches-memory-multirelease/pom.xml
@@ -61,6 +61,7 @@
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
+ <Automatic-Module-Name>org.apache.datasketches.memory</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
diff --git a/datasketches-memory-multirelease/src/assembly/mrjar.xml b/datasketches-memory-multirelease/src/assembly/mrjar.xml
index 1900300..8618753 100644
--- a/datasketches-memory-multirelease/src/assembly/mrjar.xml
+++ b/datasketches-memory-multirelease/src/assembly/mrjar.xml
@@ -52,5 +52,20 @@
</unpackOptions>
</binaries>
</moduleSet>
+ <moduleSet>
+ <useAllReactorProjects>true</useAllReactorProjects>
+ <includes>
+ <include>org.apache.datasketches:datasketches-memory-java11</include>
+ </includes>
+ <binaries>
+ <unpack>true</unpack>
+ <includeDependencies>false</includeDependencies>
+ <unpackOptions>
+ <includes>
+ <include>module-info.class</include>
+ </includes>
+ </unpackOptions>
+ </binaries>
+ </moduleSet>
</moduleSets>
</assembly>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org