Last active
October 19, 2021 11:08
-
-
Save bojanv55/c708a9bf0737f619369ca32d42a54b1a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>TestSpringResourceLoad</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-parent</artifactId> | |
<version>2.6.0-SNAPSHOT</version> | |
<relativePath/> <!-- lookup parent from repository --> | |
</parent> | |
<groupId>com.repro</groupId> | |
<artifactId>spring-native-resources</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>spring-native-resources</name> | |
<description>Repro of Spring not loading resources after compilation to binary</description> | |
<properties> | |
<java.version>11</java.version> | |
<repackage.classifier/> | |
<spring-native.version>0.11.0-SNAPSHOT</spring-native.version> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-web</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.springframework.experimental</groupId> | |
<artifactId>spring-native</artifactId> | |
<version>${spring-native.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-test</artifactId> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-maven-plugin</artifactId> | |
<configuration> | |
<classifier>${repackage.classifier}</classifier> | |
<image> | |
<builder>paketobuildpacks/builder:tiny</builder> | |
<env> | |
<BP_NATIVE_IMAGE>true</BP_NATIVE_IMAGE> | |
</env> | |
</image> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.springframework.experimental</groupId> | |
<artifactId>spring-aot-maven-plugin</artifactId> | |
<version>${spring-native.version}</version> | |
<executions> | |
<execution> | |
<id>generate</id> | |
<goals> | |
<goal>generate</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
<repositories> | |
<repository> | |
<id>spring-snapshots</id> | |
<name>Spring Snapshots</name> | |
<url>https://repo.spring.io/snapshot</url> | |
<releases> | |
<enabled>false</enabled> | |
</releases> | |
</repository> | |
<repository> | |
<id>spring-milestones</id> | |
<name>Spring Milestones</name> | |
<url>https://repo.spring.io/milestone</url> | |
<snapshots> | |
<enabled>false</enabled> | |
</snapshots> | |
</repository> | |
</repositories> | |
<pluginRepositories> | |
<pluginRepository> | |
<id>spring-snapshots</id> | |
<name>Spring Snapshots</name> | |
<url>https://repo.spring.io/snapshot</url> | |
<releases> | |
<enabled>false</enabled> | |
</releases> | |
</pluginRepository> | |
<pluginRepository> | |
<id>spring-milestones</id> | |
<name>Spring Milestones</name> | |
<url>https://repo.spring.io/milestone</url> | |
<snapshots> | |
<enabled>false</enabled> | |
</snapshots> | |
</pluginRepository> | |
</pluginRepositories> | |
<profiles> | |
<profile> | |
<id>native</id> | |
<properties> | |
<repackage.classifier>exec</repackage.classifier> | |
<native-buildtools.version>0.9.5</native-buildtools.version> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>org.graalvm.buildtools</groupId> | |
<artifactId>junit-platform-native</artifactId> | |
<version>${native-buildtools.version}</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.graalvm.buildtools</groupId> | |
<artifactId>native-maven-plugin</artifactId> | |
<version>${native-buildtools.version}</version> | |
<executions> | |
<execution> | |
<id>build-native</id> | |
<phase>package</phase> | |
<goals> | |
<goal>build</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</profile> | |
</profiles> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.repro.springnativeresources; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
@SpringBootApplication | |
public class SpringNativeResourcesApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(SpringNativeResourcesApplication.class, args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment