Skip to content

Commit 286208f

Browse files
authored
Merge pull request #1 from jhuttana/pick_relevant_sources
Add the application sources from archived openshift-quickstarts repository which are referenced in our tests
2 parents d9b0f95 + 072dabc commit 286208f

File tree

55 files changed

+2917
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2917
-0
lines changed

OPENJDK-1549/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Test for OPENJDK-1549
2+
3+
<https://issues.redhat.com/browse/OPENJDK-1549>
4+
5+
This is a minimal Maven project for which the `validate` target will fail
6+
if the environment variable `MAVEN_ARGS` is defined.
7+
8+
This is achieved using the Enforcer plugin. We could not use the
9+
`requireEnvironmentVariable` built-in rule as it can only fail if a variable
10+
is undefined, rather than if it is. Instead we use `evaluateBeanshell` and
11+
a very short Beanshell expression.
12+
13+
Maven expands strings of the form `${env.foo}` within the POM only if the
14+
variable is defined. That is, when `MAVEN_ARGS` is not defined in the
15+
environment, the string `${env.MAVEN_ARGS}` is passed through unaltered.
16+
If the variable is defined (including defined but empty), Maven will expand
17+
it. Some string concatenation trickery is needed to match against the
18+
un-expanded form.

OPENJDK-1549/pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project>
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.acme</groupId>
5+
<artifactId>getting-started</artifactId>
6+
<version>1.0.0-SNAPSHOT</version>
7+
<build>
8+
<plugins>
9+
<plugin>
10+
<groupId>org.apache.maven.plugins</groupId>
11+
<artifactId>maven-enforcer-plugin</artifactId>
12+
<version>3.3.0</version>
13+
<executions>
14+
15+
<!-- ensure the environment variable MAVEN_ARGS is unset -->
16+
<execution>
17+
<id>enforce-beanshell</id>
18+
<goals>
19+
<goal>enforce</goal>
20+
</goals>
21+
<configuration>
22+
<rules>
23+
<evaluateBeanshell>
24+
<condition>"${env.MAVEN_ARGS}".equals("${env."+"MAVEN_ARGS}")</condition>
25+
</evaluateBeanshell>
26+
</rules>
27+
<fail>true</fail>
28+
</configuration>
29+
</execution>
30+
31+
</executions>
32+
</plugin>
33+
</plugins>
34+
</build>
35+
</project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
set -ueo pipefail
3+
4+
cd /tmp/src
5+
javac TestDNSCaching.java
6+
java TestDNSCaching # run this so S2I build logs contain the output
7+
jar cfe /deployments/TestDNSCaching.jar TestDNSCaching TestDNSCaching.class
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This is a small example of a standalone Java CLI application and a
2+
custom s2i assemble script to build (and run) it.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import java.security.Security;
2+
3+
public class TestDNSCaching
4+
{
5+
public static void main(String[] args)
6+
{
7+
final String s = "networkaddress.cache.negative.ttl";
8+
System.out.println(s + "=" + Security.getProperty(s));
9+
}
10+
}

getting-started/.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!target/*-runner
3+
!target/*-runner.jar
4+
!target/lib/*
5+
!target/quarkus-app/

getting-started/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Eclipse
2+
.project
3+
.classpath
4+
.settings/
5+
bin/
6+
7+
# IntelliJ
8+
.idea
9+
*.ipr
10+
*.iml
11+
*.iws
12+
13+
# NetBeans
14+
nb-configuration.xml
15+
16+
# Visual Studio Code
17+
.vscode
18+
19+
# OSX
20+
.DS_Store
21+
22+
# Vim
23+
*.swp
24+
*.swo
25+
26+
# patch
27+
*.orig
28+
*.rej
29+
30+
# Maven
31+
target/
32+
pom.xml.tag
33+
pom.xml.releaseBackup
34+
pom.xml.versionsBackup
35+
release.properties
58.5 KB
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

getting-started/.s2i/environment

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
MAVEN_S2I_ARTIFACT_DIRS=target/quarkus-app
2+
MAVEN_OPTS=-XX:+UseCompressedOops -XX:+UseCompressedClassPointers
3+
MAVEN_ARGS=-Dquarkus.platform.version=2.16.6.Final -Dquarkus.package.create-appcds=true -Dquarkus.package.type=fast-jar package
4+
S2I_SOURCE_DEPLOYMENTS_FILTER=app lib quarkus app-cds.jsa quarkus-run.jar
5+
JAVA_OPTS_APPEND=-XX:+UseCompressedClassPointers -XX:+UseCompressedOops -Xshare:on -XX:SharedArchiveFile=/deployments/app-cds.jsa -Dquarkus.http.host=0.0.0.0
6+
AB_JOLOKIA_OFF=true
7+
JAVA_APP_JAR=/deployments/quarkus-run.jar

0 commit comments

Comments
 (0)