-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#25] Signed-off-by: Jacques Chester <[email protected]>
- Loading branch information
1 parent
5edff37
commit 06510a9
Showing
20 changed files
with
344 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
target/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
.mvn/wrapper/maven-wrapper.jar |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?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"> | ||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>pack.buildpacks.io</groupId> | ||
<artifactId>testdata-sample-app</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.nanohttpd</groupId> | ||
<artifactId>nanohttpd</artifactId> | ||
<version>2.3.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
|
||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
<mainClass>io.buildpacks.pack.testdata.App</mainClass> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>assemble-all</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
26 changes: 26 additions & 0 deletions
26
acceptance/testdata/maven_app/src/main/java/io/buildpacks/pack/testdata/App.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package io.buildpacks.pack.testdata; | ||
|
||
import java.io.IOException; | ||
import java.util.Map; | ||
import fi.iki.elonen.NanoHTTPD; | ||
|
||
public class App extends NanoHTTPD { | ||
public App() throws IOException { | ||
super(8080); | ||
start(NanoHTTPD.SOCKET_READ_TIMEOUT, false); | ||
System.out.println("\nRunning at http://localhost:8080/ \n"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
try { | ||
new App(); | ||
} catch (IOException ioe) { | ||
System.err.println("Couldn't start server:\n" + ioe); | ||
} | ||
} | ||
|
||
@Override | ||
public Response serve(IHTTPSession session) { | ||
return newFixedLengthResponse("Maven buildpack worked!"); | ||
} | ||
} |
Empty file.
Empty file.
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo Here are the deps: | ||
|
||
cat *-dep | ||
|
||
echo "I hope they're what you wanted" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[[buildpacks]] | ||
id = "mock.bp.first" | ||
uri = "file://first" | ||
|
||
[[buildpacks]] | ||
id = "mock.bp.second" | ||
uri = "file://second" | ||
|
||
[[buildpacks]] | ||
id = "mock.bp.third" | ||
uri = "file://third" | ||
|
||
[[groups]] | ||
buildpacks = [{ id = "mock.bp.first", version = "1.2.3" }] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "---> First mock buildpack" | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
launch_dir=$3 | ||
|
||
mkdir "$launch_dir/first-layer" | ||
echo "First Dep Contents" > "$launch_dir/first-layer/first-dep" | ||
ln -snf "$launch_dir/first-layer/first-dep" first-dep | ||
|
||
echo 'processes = [{ type = "web", command = "run"}]' > "$launch_dir/launch.toml" | ||
|
||
echo "---> Done" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
|
||
if [[ ! -f detect_first ]]; then | ||
exit 100 | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[buildpack] | ||
id = "mock.bp.first" | ||
version = "0.0.1-mock" | ||
name = "First Mock Buildpack" | ||
|
||
[[stacks]] | ||
id = "io.buildpacks.stacks.bionic" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
echo "---> Second mock buildpack" | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
launch_dir=$3 | ||
|
||
mkdir "$launch_dir/second-layer" | ||
echo "Second Dep Contents" > "$launch_dir/second-layer/second-dep" | ||
ln -snf "$launch_dir/second-layer/second-dep" second-dep | ||
|
||
echo 'processes = [{ type = "web", command = "run"}]' > "$launch_dir/launch.toml" | ||
|
||
echo "---> Done" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
if [[ ! -f detect_second ]]; then | ||
exit 100 | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[buildpack] | ||
id = "mock.bp.second" | ||
version = "0.0.1-mock" | ||
name = "Second Mock Buildpack" | ||
|
||
[[stacks]] | ||
id = "io.buildpacks.stacks.bionic" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
echo "---> Third mock buildpack" | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
launch_dir=$3 | ||
|
||
mkdir "$launch_dir/third-layer" | ||
echo "Third Dep Contents" > "$launch_dir/third-layer/third-dep" | ||
ln -snf "$launch_dir/third-layer/third-dep" third-dep | ||
|
||
echo 'processes = [{ type = "web", command = "run"}]' > "$launch_dir/launch.toml" | ||
|
||
echo "---> Done" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
if [[ ! -f detect_third ]]; then | ||
exit 100 | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[buildpack] | ||
id = "mock.bp.third" | ||
version = "0.0.1-mock" | ||
name = "Third Mock Buildpack" | ||
|
||
[[stacks]] | ||
id = "io.buildpacks.stacks.bionic" |
Oops, something went wrong.