Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

java-microprofile: Maven cache share #162

Merged
merged 4 commits into from
Aug 12, 2019
Merged
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
12 changes: 6 additions & 6 deletions incubator/java-microprofile/image/Dockerfile-stack
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ RUN mvn -Dmaven.repo.local=/mvn/repository install dependency:go-offline -DskipT

WORKDIR /project/user-app

ENV APPSODY_MOUNTS="src:/project/user-app/src;pom.xml:/project/user-app/pom.xml"
ENV APPSODY_DEPS=/mvn/repository
ENV APPSODY_MOUNTS="~/.m2/repository:/mvn/repository;src:/project/user-app/src;pom.xml:/project/user-app/pom.xml"
ENV APPSODY_DEPS=

# ENV APPSODY_WATCH_DIR=/project/src
# ENV APPSODY_WATCH_IGNORE_DIR=
# ENV APPSODY_WATCH_REGEX=""

ENV APPSODY_INSTALL="mvn -Dmaven.repo.local=/mvn/repository install -DskipTests"
ENV APPSODY_INSTALL="../validate.sh && mvn -Dmaven.repo.local=/mvn/repository install -DskipTests"

ENV APPSODY_RUN="../validate.sh && mvn -Dmaven.repo.local=/mvn/repository liberty:run"
ENV APPSODY_RUN="mvn -Dmaven.repo.local=/mvn/repository liberty:run"
ENV APPSODY_RUN_ON_CHANGE="mvn -Dmaven.repo.local=/mvn/repository package -DskipTests"
ENV APPSODY_RUN_KILL=false

ENV APPSODY_DEBUG="../validate.sh && mvn -Dmaven.repo.local=/mvn/repository liberty:debug"
ENV APPSODY_DEBUG="mvn -Dmaven.repo.local=/mvn/repository liberty:debug"
ENV APPSODY_DEBUG_ON_CHANGE="mvn -Dmaven.repo.local=/mvn/repository package -DskipTests"
ENV APPSODY_DEBUG_KILL=false

ENV APPSODY_TEST="../validate.sh && mvn -Dmaven.repo.local=/mvn/repository verify"
ENV APPSODY_TEST="mvn -Dmaven.repo.local=/mvn/repository verify"
ENV APPSODY_TEST_ON_CHANGE=""
ENV APPSODY_TEST_KILL=false

Expand Down
2 changes: 1 addition & 1 deletion incubator/java-microprofile/image/project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>dev.appsody</groupId>
<artifactId>java-microprofile</artifactId>
<version>0.2.4</version>
<version>0.2.5</version>
<packaging>pom</packaging>

<properties>
Expand Down
5 changes: 5 additions & 0 deletions incubator/java-microprofile/image/project/validate.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/bin/bash

# Get parent pom information (../pom.xml)
args='export PARENT_GROUP_ID=${project.groupId}; export PARENT_ARTIFACT_ID=${project.artifactId}; export PARENT_VERSION=${project.version}
export LIBERTY_GROUP_ID=${liberty.groupId}; export LIBERTY_ARTIFACT_ID=${liberty.artifactId}; export LIBERTY_VERSION=${version.openliberty-runtime}'
eval $(mvn -q -Dexec.executable=echo -Dexec.args="${args}" --non-recursive -f ../pom.xml exec:exec 2>/dev/null)

# Install parent pom
echo "Installing parent ${PARENT_GROUP_ID}:${PARENT_ARTIFACT_ID}:${PARENT_VERSION}"
mvn install -Dmaven.repo.local=/mvn/repository -Denforcer.skip=true -f ../pom.xml

# Check child pom for required parent project
if ! grep -Gz "<parent>.*<groupId>${PARENT_GROUP_ID}</groupId>.*</parent>" pom.xml | grep -Gz "<parent>.*<artifactId>${PARENT_ARTIFACT_ID}</artifactId>.*</parent>" | grep -Gzq "<parent>.*<version>${PARENT_VERSION}</version>.*</parent>"
then
Expand Down
2 changes: 1 addition & 1 deletion incubator/java-microprofile/stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Eclipse MicroProfile®
version: 0.2.4
version: 0.2.5
description: Eclipse MicroProfile using OpenJ9 and Maven
license: Apache-2.0
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion incubator/java-microprofile/templates/default/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>dev.appsody</groupId>
<artifactId>java-microprofile</artifactId>
<version>0.2.4</version>
<version>0.2.5</version>
</parent>

<groupId>dev.appsody.starter.java-microprofile</groupId>
Expand Down