Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01bf94c60a | ||
|
|
dad2e0356e |
No files matched your search
+1
-8
@@ -1,15 +1,8 @@
|
||||
.git
|
||||
.github
|
||||
.idea
|
||||
.mvn
|
||||
src
|
||||
classes
|
||||
logs
|
||||
target/*
|
||||
!target/netneutrality.jar
|
||||
target
|
||||
*.iml
|
||||
README.md
|
||||
checkstyle.xml
|
||||
mvnw
|
||||
mvnw.cmd
|
||||
pom.xml
|
||||
@@ -50,6 +50,7 @@ jobs:
|
||||
name: maven-artifacts
|
||||
path: |
|
||||
target/netneutrality.jar
|
||||
target/lib
|
||||
startup.sh
|
||||
if-no-files-found: error
|
||||
|
||||
|
||||
+14
-2
@@ -1,3 +1,14 @@
|
||||
FROM eclipse-temurin:25-jdk AS build
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY .mvn .mvn
|
||||
COPY mvnw pom.xml checkstyle.xml ./
|
||||
RUN chmod +x mvnw && ./mvnw -B -q dependency:go-offline
|
||||
|
||||
COPY src src
|
||||
RUN ./mvnw -B -q package -DskipTests
|
||||
|
||||
FROM eclipse-temurin:25-jre@sha256:ff82c74a630c08b417502c4c18189e62074edbb28eb1f2d31b799ac138c01058
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends netcat-openbsd curl && rm -rf /var/lib/apt/lists/*
|
||||
@@ -8,7 +19,8 @@ ARG API_PORT=9000
|
||||
EXPOSE ${API_PORT}
|
||||
|
||||
COPY startup.sh ./
|
||||
COPY target/netneutrality.jar ./
|
||||
COPY --from=build /build/target/lib ./lib
|
||||
COPY --from=build /build/target/netneutrality.jar ./
|
||||
|
||||
RUN ["chmod", "+x", "./startup.sh"]
|
||||
CMD ["./startup.sh"]
|
||||
CMD ["./startup.sh"]
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?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">
|
||||
@@ -87,9 +87,12 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<configuration>
|
||||
<finalName>netneutrality</finalName>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>${main.class}</mainClass>
|
||||
<addClasspath>true</addClasspath>
|
||||
<classpathPrefix>lib/</classpathPrefix>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
@@ -97,52 +100,18 @@
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.6.2</version>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<id>copy-libs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<finalName>netneutrality</finalName>
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>*:*</artifact>
|
||||
<excludes>
|
||||
<exclude>module-info.class</exclude>
|
||||
<exclude>META-INF/versions/*/module-info.class</exclude>
|
||||
<exclude>META-INF/MANIFEST.MF</exclude>
|
||||
<exclude>META-INF/LICENSE*</exclude>
|
||||
<exclude>META-INF/NOTICE*</exclude>
|
||||
<exclude>META-INF/DEPENDENCIES</exclude>
|
||||
<exclude>META-INF/jandex.idx</exclude>
|
||||
<exclude>META-INF/versions/9/OSGI-INF/MANIFEST.MF</exclude>
|
||||
<exclude>META-INF/*.SF</exclude>
|
||||
<exclude>META-INF/*.DSA</exclude>
|
||||
<exclude>META-INF/*.RSA</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
<filter>
|
||||
<artifact>com.squareup.okhttp3:okhttp</artifact>
|
||||
<excludes>
|
||||
<exclude>**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>${main.class}</mainClass>
|
||||
</transformer>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<manifestEntries>
|
||||
<Multi-Release>true</Multi-Release>
|
||||
</manifestEntries>
|
||||
</transformer>
|
||||
</transformers>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||||
<includeScope>runtime</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
@@ -350,4 +319,4 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
Reference in new issue
Block a user