Skip to content

Commit

Permalink
Add Maven module for symkey
Browse files Browse the repository at this point in the history
A pom.xml has been added to define Maven module for symkey.
The build test has been added to compare the jss-symkey.jar
created by CMake and by Maven to ensure that they contain
the same files.

For now Maven will only build symkey Java code and SonarCloud
will ignore symkey native code.
  • Loading branch information
edewata committed Apr 12, 2023
1 parent 427c10e commit e218f8e
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,24 @@ jobs:

- name: Compare jss.jar
run: |
jar tvf ~/build/jss/jss.jar | awk '{print $8;}' | sort | tee cmake.out
jar tvf base/target/jss-5.4.0-SNAPSHOT.jar | awk '{print $8;}' | grep -v '^META-INF/maven/' | sort > maven.out
jar tvf ~/build/jss/jss.jar | awk '{print $8;}' | sort \
| grep -v '/$' \
| tee cmake.out
jar tvf base/target/jss-5.4.0-SNAPSHOT.jar | awk '{print $8;}' | sort \
| grep -v '/$' \
| grep -v '^META-INF/maven/' \
| tee maven.out
diff cmake.out maven.out
- name: Compare jss-symkey.jar
run: |
jar tvf ~/build/jss/symkey/jss-symkey.jar | awk '{print $8;}' | sort \
| grep -v '/$' \
| tee cmake.out
jar tvf symkey/target/jss-symkey-5.4.0-SNAPSHOT.jar | awk '{print $8;}' | sort \
| grep -v '/$' \
| grep -v '^META-INF/maven/' \
| tee maven.out
diff cmake.out maven.out
# TODO: Run examples
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
<revision>5.4.0-SNAPSHOT</revision>
<sonar.organization>dogtagpki</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.c.file.suffixes>-</sonar.c.file.suffixes>
<sonar.cpp.file.suffixes>-</sonar.cpp.file.suffixes>
<sonar.objc.file.suffixes>-</sonar.objc.file.suffixes>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<modules>
<module>base</module>
<module>native</module>
<module>symkey</module>
<module>examples</module>
</modules>

Expand Down
45 changes: 45 additions & 0 deletions symkey/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.dogtagpki</groupId>
<artifactId>jss-parent</artifactId>
<version>${revision}</version>
</parent>

<artifactId>jss-symkey</artifactId>
<packaging>jar</packaging>

<dependencies>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jss</artifactId>
<version>${project.version}</version>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>17</source>
<target>17</target>
<compilerArgs>
<arg>-proc:none</arg>
<arg>-h</arg><arg>${project.build.directory}/include/_jni</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>

</project>

0 comments on commit e218f8e

Please sign in to comment.