Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions boot/maven-parent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target/
!**/src/main/**/target/
!**/src/test/**/target/
1 change: 1 addition & 0 deletions boot/maven-parent/multi-buildpacks/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Multi-projects with Cloud Native Buildpacks
38 changes: 38 additions & 0 deletions boot/maven-parent/multi-buildpacks/multi-buildpacks-app/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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>com.example.multinbt</groupId>
<artifactId>multi-buildpacks</artifactId>
<version>${revision}</version>
</parent>
<artifactId>multi-buildpacks-app</artifactId>
<name>multi-buildpacks-app</name>

<dependencies>
<dependency>
<groupId>com.example.multinbt</groupId>
<artifactId>multi-buildpacks-lib</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.example.multibuildpacks.app;

import com.example.multibuildpacks.lib.MultiBuildpacksService;

import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class MultiBuildpacksApplication {

public static void main(String[] args) {
SpringApplication application = new SpringApplication(MultiBuildpacksApplication.class);
application.run(args);
}

@Bean
public ApplicationRunner runner() {
return args -> new MultiBuildpacksService().sayHello();
}

}
14 changes: 14 additions & 0 deletions boot/maven-parent/multi-buildpacks/multi-buildpacks-lib/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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>com.example.multinbt</groupId>
<artifactId>multi-buildpacks</artifactId>
<version>${revision}</version>
</parent>
<artifactId>multi-buildpacks-lib</artifactId>
<name>multi-buildpacks-lib</name>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.example.multibuildpacks.lib;

public class MultiBuildpacksService {

public void sayHello() {
System.out.println("Hello Native");
}

}
99 changes: 99 additions & 0 deletions boot/maven-parent/multi-buildpacks/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?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>3.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>com.example.multinbt</groupId>
<artifactId>multi-buildpacks</artifactId>
<packaging>pom</packaging>
<version>${revision}</version>
<name>multi-buildpacks</name>

<properties>
<revision>0.0.1-SNAPSHOT</revision>
</properties>

<modules>
<module>multi-buildpacks-app</module>
<module>multi-buildpacks-lib</module>
</modules>


<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.example.multinbt</groupId>
<artifactId>multi-buildpacks-lib</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</dependencyManagement>

<profiles>
<profile>
<id>native</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>build-image</id>
<goals>
<goal>build-image-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>

</project>
1 change: 1 addition & 0 deletions boot/maven-parent/multi-nbt/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Multi-projects with Native Build Tools
38 changes: 38 additions & 0 deletions boot/maven-parent/multi-nbt/multi-nbt-app/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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>com.example.multinbt</groupId>
<artifactId>multi-nbt</artifactId>
<version>${revision}</version>
</parent>
<artifactId>multi-nbt-app</artifactId>
<name>multi-nbt-app</name>

<dependencies>
<dependency>
<groupId>com.example.multinbt</groupId>
<artifactId>multi-nbt-lib</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.example.multinbt.app;

import com.example.multinbt.lib.MultiNbtService;

import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class MultiNbtApplication {

public static void main(String[] args) {
SpringApplication application = new SpringApplication(MultiNbtApplication.class);
application.run(args);
}

@Bean
public ApplicationRunner runner() {
return args -> new MultiNbtService().sayHello();
}

}
14 changes: 14 additions & 0 deletions boot/maven-parent/multi-nbt/multi-nbt-lib/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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>com.example.multinbt</groupId>
<artifactId>multi-nbt</artifactId>
<version>${revision}</version>
</parent>
<artifactId>multi-nbt-lib</artifactId>
<name>multi-nbt-lib</name>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.example.multinbt.lib;

public class MultiNbtService {

public void sayHello() {
System.out.println("Hello Native");
}

}
99 changes: 99 additions & 0 deletions boot/maven-parent/multi-nbt/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?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>3.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>com.example.multinbt</groupId>
<artifactId>multi-nbt</artifactId>
<packaging>pom</packaging>
<version>${revision}</version>
<name>multi-nbt</name>

<properties>
<revision>0.0.1-SNAPSHOT</revision>
</properties>

<modules>
<module>multi-nbt-app</module>
<module>multi-nbt-lib</module>
</modules>


<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.example.multinbt</groupId>
<artifactId>multi-nbt-lib</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</dependencyManagement>

<profiles>
<profile>
<id>native</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<executions>
<execution>
<id>build-image</id>
<goals>
<goal>compile-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>

</project>
1 change: 1 addition & 0 deletions boot/maven-parent/single-buildpacks/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Single project with Cloud Native Buildpacks
Loading