From c5b90cd513fec8585f001461684ed49202fb11d5 Mon Sep 17 00:00:00 2001 From: Julien Lengrand-Lambert Date: Thu, 16 Jul 2020 18:13:53 +0200 Subject: [PATCH] Copy resources later --- .github/workflows/maven.yml | 4 ++-- .idea/jarRepositories.xml | 20 ++++++++++++++++++++ pom.xml | 29 +++++++++++++++++++++-------- src/main/c/Makefile | 2 +- 4 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 .idea/jarRepositories.xml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 76f5515..8db9300 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -27,9 +27,9 @@ jobs: with: java-version: 11 - name: Build with Maven - run: mvn clean install + run: mvn clean install; mvn clean install - name: package - run: mkdir staging && cp target/*.jar staging && cp src/main/resources/libdht11.so staging + run: mkdir staging && cp target/*.jar staging && cp src/main/resources/libs/raspberry/* staging - uses: actions/upload-artifact@v1 with: name: Package diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 54278df..34cd899 100644 --- a/pom.xml +++ b/pom.xml @@ -14,14 +14,6 @@ - - - src/main/resources - - libdht11.so - - - maven-compiler-plugin @@ -50,6 +42,27 @@ + + maven-resources-plugin + 3.1.0 + + + copy-resources + package + + copy-resources + + + ${basedir}/target/classes/libs/raspberry + + + src/main/resources/libs/raspberry + + + + + + maven-assembly-plugin diff --git a/src/main/c/Makefile b/src/main/c/Makefile index 7d8e60d..cda8308 100644 --- a/src/main/c/Makefile +++ b/src/main/c/Makefile @@ -14,7 +14,7 @@ library: gcc -shared -fPIC -o $(OUT).so $(INCLUDES) $(FILES) copy: - -cp $(OUT).so ../resources/ + -cp $(OUT).so ../resources/libs/raspberry/ clean: -rm -f $(OUT).so