Add maven package in stdlib
Signed-off-by: Alvise <vitalvise@gmail.com>
This commit is contained in:
43
stdlib/java/maven/tests/maven.cue
Normal file
43
stdlib/java/maven/tests/maven.cue
Normal file
@@ -0,0 +1,43 @@
|
||||
package maven
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"alpha.dagger.io/dagger"
|
||||
"alpha.dagger.io/alpine"
|
||||
"alpha.dagger.io/os"
|
||||
)
|
||||
|
||||
TestData: dagger.#Artifact
|
||||
|
||||
TestConfig: mavenOpts: strings.Join([
|
||||
"-client",
|
||||
"-XX:+TieredCompilation",
|
||||
"-XX:TieredStopAtLevel=1",
|
||||
"-Xverify:none",
|
||||
"-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dorg.slf4j.simpleLogger.showDateTime=true",
|
||||
"-Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss",
|
||||
], " ")
|
||||
|
||||
TestSpringBoot: {
|
||||
project: #Project & {
|
||||
source: TestData
|
||||
|
||||
phases: ["install"]
|
||||
|
||||
env: MAVEN_OPTS: TestConfig.mavenOpts
|
||||
|
||||
args: ["--batch-mode"]
|
||||
}
|
||||
|
||||
test: os.#Container & {
|
||||
image: alpine.#Image & {
|
||||
package: bash: "=5.1.0-r0"
|
||||
}
|
||||
copy: "/build": from: project.build
|
||||
command: """
|
||||
count=$(ls -1 /build/**/*.jar 2>/dev/null | wc -l)
|
||||
test "$count" != "0"
|
||||
"""
|
||||
}
|
||||
}
|
33
stdlib/java/maven/tests/testdata/.gitignore
vendored
Normal file
33
stdlib/java/maven/tests/testdata/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
41
stdlib/java/maven/tests/testdata/pom.xml
vendored
Normal file
41
stdlib/java/maven/tests/testdata/pom.xml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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.5.2</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>io.dagger.maven</groupId>
|
||||
<artifactId>spring-boot-test</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>spring-boot-test</name>
|
||||
<description>Dagger maven spring boot test</description>
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</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>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -0,0 +1,13 @@
|
||||
package io.dagger.maven.springboottest;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class SpringBootTestApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SpringBootTestApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
1
stdlib/java/maven/tests/testdata/src/main/resources/application.properties
vendored
Normal file
1
stdlib/java/maven/tests/testdata/src/main/resources/application.properties
vendored
Normal file
@@ -0,0 +1 @@
|
||||
|
@@ -0,0 +1,13 @@
|
||||
package io.dagger.maven.springboottest;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class SpringBootTestApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user