Copy resources later

This commit is contained in:
Julien Lengrand-Lambert
2020-07-16 18:13:53 +02:00
parent 491ae16fb8
commit c5b90cd513
4 changed files with 44 additions and 11 deletions

View File

@@ -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

20
.idea/jarRepositories.xml generated Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

29
pom.xml
View File

@@ -14,14 +14,6 @@
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>libdht11.so</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -50,6 +42,27 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes/libs/raspberry</outputDirectory>
<resources>
<resource>
<directory>src/main/resources/libs/raspberry</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>

View File

@@ -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