Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update Maven Plugin Versions and add Apache Maven Wrapper #426

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e62ad63
Remove flaky test of detectedBoard.getBoardModel().getModel()
FDelporte Nov 20, 2024
eb187b9
Fix javadoc (e.g. add missing tags)
dariuszzbyrad Nov 20, 2024
c30abd1
Fix javadoc
dariuszzbyrad Nov 20, 2024
f1ea6ce
Merge pull request #417 from dariuszzbyrad/fix-checkstyle
FDelporte Nov 20, 2024
58d0297
Fix generating javadoc
dariuszzbyrad Nov 21, 2024
1d20bc3
Merge pull request #418 from dariuszzbyrad/fix-javadoc-plugin
FDelporte Nov 21, 2024
ffcdc13
Bump to 2.7.1-SNAPSHOT
FDelporte Nov 21, 2024
08a8199
Update to provider logic to allow the function Pi4J.newContextBuilder…
taartspi Nov 22, 2024
73c8c70
Merge branch 'develop' into build_on_pi_mocks
taartspi Nov 22, 2024
0013c8a
Merge pull request #420 from Pi4J/build_on_pi_mocks
FDelporte Nov 22, 2024
b213ecc
Extended use of List.of instead of Collections
FDelporte Nov 22, 2024
38b19ca
Refactor BoardInfoHelper class and belonging classes
dariuszzbyrad Nov 25, 2024
467d77c
Refactor BoardInfoHelper class and belonging classes
dariuszzbyrad Nov 25, 2024
3108ebe
Refactor BoardInfoHelper class and belonging classes
dariuszzbyrad Nov 25, 2024
eeeb8bc
Simplifies the loop by using an early continue to skip irrelevant lin…
dariuszzbyrad Nov 25, 2024
1c0f323
Merge pull request #422 from dariuszzbyrad/refactor-boardinfo
eitch Nov 26, 2024
bbe6188
Add Javadoc comments and small refactor code
dariuszzbyrad Nov 26, 2024
2f381f1
Merge pull request #424 from dariuszzbyrad/boardinfo-add-missing-java…
FDelporte Nov 26, 2024
e6b76c2
Bump plugin versions and add maven wrapper
dariuszzbyrad Nov 27, 2024
88d32d8
Fixed invalid maven-resources-plugin plugin version
dariuszzbyrad Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
80 changes: 49 additions & 31 deletions libraries/pi4j-library-gpiod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-library</artifactId>
<version>2.7.0-SNAPSHOT</version>
<version>2.7.1-SNAPSHOT</version>
<relativePath>../pi4j-library/pom.xml</relativePath>
</parent>

<!-- MAVEN ARTIFACT INFORMATION -->
<artifactId>pi4j-library-gpiod</artifactId>
<name>Pi4J :: LIBRARY :: JNI Wrapper for GpioD Library</name>
<name>Pi4J :: LIBRARY :: JNI Wrapper for GpioD Library</name>
<description>Pi4J wrapper for the GpioD library</description>
<packaging>jar</packaging>

Expand Down Expand Up @@ -43,9 +43,11 @@
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
<include>README.md</include>
<include>lib/armhf/pi4j-gpiod/libpi4j-gpiod.so</include> <!-- include the native 32-bit JNI library as a resource -->
<include>lib/armhf/pi4j-gpiod/libpi4j-gpiod.so
</include> <!-- include the native 32-bit JNI library as a resource -->
<include>lib/armhf/pi4j-gpiod/libgpiod.so</include>
<include>lib/aarch64/pi4j-gpiod/libpi4j-gpiod.so</include> <!-- include the native 64-bit JNI library as a resource -->
<include>lib/aarch64/pi4j-gpiod/libpi4j-gpiod.so
</include> <!-- include the native 64-bit JNI library as a resource -->
<include>lib/aarch64/pi4j-gpiod/libgpiod.so</include>
</includes>
</resource>
Expand Down Expand Up @@ -75,10 +77,12 @@
<requireFilesExist>
<files>
<!-- include 32-bit (ARMHF) Pi4J GpioD JNI Library -->
<file>${project.build.outputDirectory}/lib/armhf/pi4j-gpiod/libpi4j-gpiod.so</file>
<file>${project.build.outputDirectory}/lib/armhf/pi4j-gpiod/libpi4j-gpiod.so
</file>
<file>${project.build.outputDirectory}/lib/armhf/pi4j-gpiod/libgpiod.so</file>
<!-- include 64-bit (AARCH64) Pi4J GpioD JNI Library -->
<file>${project.build.outputDirectory}/lib/aarch64/pi4j-gpiod/libpi4j-gpiod.so</file>
<file>${project.build.outputDirectory}/lib/aarch64/pi4j-gpiod/libpi4j-gpiod.so
</file>
<file>${project.build.outputDirectory}/lib/aarch64/pi4j-gpiod/libgpiod.so</file>
</files>
</requireFilesExist>
Expand All @@ -104,14 +108,15 @@
<configuration>
<target>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath" />
classpathref="maven.plugin.classpath"/>
<if>
<equals arg1="${pi4j.dev.transfer}" arg2="true" />
<equals arg1="${pi4j.dev.transfer}" arg2="true"/>
<then>
<!-- ensure the target directory exists on the Raspberry Pi via SSH -->
<sshexec host="${pi4j.dev.host}" port="${pi4j.dev.port}" username="${pi4j.dev.user}"
<sshexec host="${pi4j.dev.host}" port="${pi4j.dev.port}"
username="${pi4j.dev.user}"
password="${pi4j.dev.password}" trust="true" failonerror="false"
verbose="false" command="mkdir --parents ${pi4j.dev.directory}" />
verbose="false" command="mkdir --parents ${pi4j.dev.directory}"/>

<!-- copy the JAR file to the Raspberry Pi vs SCP -->
<scp file="${project.build.directory}/${project.build.finalName}.jar"
Expand All @@ -133,15 +138,20 @@
<goal>run</goal>
</goals>
<configuration>
<target name="pi4j-attach-native-library" >
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath"/>
<target name="pi4j-attach-native-library">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath"/>
<!-- attach 32-bit (ARMHF) Pi4J GpioD JNI Library -->
<attachartifact file="${project.build.directory}/lib/armhf/pi4j-gpiod/libpi4j-gpiod.so" classifier="armhf" type="so"/>
<attachartifact file="${project.build.directory}/lib/armhf/pi4j-gpiod/libgpiod.so" classifier="armhf" type="so"/>
<attachartifact file="${project.build.directory}/lib/armhf/pi4j-gpiod/libpi4j-gpiod.so"
classifier="armhf" type="so"/>
<attachartifact file="${project.build.directory}/lib/armhf/pi4j-gpiod/libgpiod.so"
classifier="armhf" type="so"/>
<!-- attach 64-bit (AARCH64) Pi4J GpioD JNI Library -->
<attachartifact file="${project.build.directory}/lib/aarch64/pi4j-gpiod/libpi4j-gpiod.so" classifier="aarch64" type="so"/>
<attachartifact file="${project.build.directory}/lib/aarch64/pi4j-gpiod/libgpiod.so" classifier="aarch64" type="so"/>
<attachartifact
file="${project.build.directory}/lib/aarch64/pi4j-gpiod/libpi4j-gpiod.so"
classifier="aarch64" type="so"/>
<attachartifact file="${project.build.directory}/lib/aarch64/pi4j-gpiod/libgpiod.so"
classifier="aarch64" type="so"/>
</target>
</configuration>
</execution>
Expand Down Expand Up @@ -213,7 +223,8 @@
<classifier>armhf</classifier>
<type>so</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib/armhf/pi4j-gpiod</outputDirectory>
<outputDirectory>${project.build.directory}/lib/armhf/pi4j-gpiod
</outputDirectory>
<destFileName>libpi4j-gpiod.so</destFileName>
</artifactItem>
<artifactItem>
Expand All @@ -223,7 +234,8 @@
<classifier>armhf</classifier>
<type>so</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib/armhf/pi4j-gpiod</outputDirectory>
<outputDirectory>${project.build.directory}/lib/armhf/pi4j-gpiod
</outputDirectory>
<destFileName>libgpiod.so</destFileName>
</artifactItem>

Expand All @@ -237,7 +249,8 @@
<type>so</type>
<classifier>aarch64</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib/aarch64/pi4j-gpiod</outputDirectory>
<outputDirectory>${project.build.directory}/lib/aarch64/pi4j-gpiod
</outputDirectory>
<destFileName>libpi4j-gpiod.so</destFileName>
</artifactItem>
<artifactItem>
Expand All @@ -247,7 +260,8 @@
<type>so</type>
<classifier>aarch64</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib/aarch64/pi4j-gpiod</outputDirectory>
<outputDirectory>${project.build.directory}/lib/aarch64/pi4j-gpiod
</outputDirectory>
<destFileName>libgpiod.so</destFileName>
</artifactItem>
</artifactItems>
Expand Down Expand Up @@ -283,10 +297,10 @@
<phase>generate-resources</phase>
<configuration>
<target>
<mkdir dir="target" />
<mkdir dir="target/classes" />
<mkdir dir="target/build" />
<mkdir dir="target/build/native" />
<mkdir dir="target"/>
<mkdir dir="target/classes"/>
<mkdir dir="target/build"/>
<mkdir dir="target/build/native"/>
<copy todir="target/build/native">
<fileset dir="src/main/native"/>
</copy>
Expand All @@ -311,28 +325,32 @@
<configuration>
<target>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath" />
classpathref="maven.plugin.classpath"/>
<if>
<!-- check for DOCKER-COMPILER setting in the 'pi4j.native.compiler' property -->
<equals arg1="${pi4j.native.compiler.effective}" arg2="DOCKER-COMPILER" />
<equals arg1="${pi4j.native.compiler.effective}" arg2="DOCKER-COMPILER"/>
<then>
<!-- perform native build using Pi4J Docker Builder Image for native cross-compiling -->
<exec dir="${project.build.directory}/build/native" executable="/bin/bash" failonerror="true">
<exec dir="${project.build.directory}/build/native"
executable="/bin/bash" failonerror="true">
<arg value="build-docker.sh"/>
</exec>
</then>
<else>
<if>
<!-- check for CROSS-COMPILER setting in the 'pi4j.native.compiler' property -->
<equals arg1="${pi4j.native.compiler.effective}" arg2="CROSS-COMPILER" />
<equals arg1="${pi4j.native.compiler.effective}"
arg2="CROSS-COMPILER"/>
<then>
<!-- perform native build using cross-compiler toolchains directly on host -->
<exec dir="${project.build.directory}/build/native" executable="/bin/bash" failonerror="true">
<exec dir="${project.build.directory}/build/native"
executable="/bin/bash" failonerror="true">
<arg value="build.sh"/>
</exec>
</then>
<else>
<fail message="NATIVE BUILD FAILED/ABORTED; Missing or invalid 'pi4j.native.compiler' property. [${pi4j.native.compiler}]; Expected 'CROSS-COMPILER|DOCKER-COMPILER'"/>
<fail
message="NATIVE BUILD FAILED/ABORTED; Missing or invalid 'pi4j.native.compiler' property. [${pi4j.native.compiler}]; Expected 'CROSS-COMPILER|DOCKER-COMPILER'"/>
</else>
</if>
</else>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ else if (libpath.equalsIgnoreCase("local")) {

/**
* Loads library from classpath
*
* <p>
* The file from classpath is copied into system temporary directory and then loaded. The temporary file is
* deleted after exiting. Method uses String as filename because the pathname is
* "abstract", not system-dependent.
Expand Down
Loading