-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from CodinGame/project_init
feat: add all the files to build the project
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM openjdk:8-jdk | ||
|
||
MAINTAINER CodinGame <[email protected]> | ||
|
||
ARG MAVEN_VERSION=3.3.9 | ||
ARG USER_HOME_DIR="/root" | ||
|
||
# Install maven | ||
RUN mkdir -p /usr/share/maven /usr/share/maven/ref \ | ||
&& curl -fsSL http://apache.osuosl.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz \ | ||
| tar -xzC /usr/share/maven --strip-components=1 \ | ||
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn | ||
|
||
ENV MAVEN_HOME /usr/share/maven | ||
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" | ||
|
||
COPY settings.xml $USER_HOME_DIR/.m2/ | ||
|
||
COPY ./docker-entrypoint.sh / | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# maven3-builder | ||
The maven3 builder | ||
This is the maven3 builder. | ||
It aims at building the project, that is: | ||
- create all the jar files | ||
- copy the jar files into the target directory | ||
- copy all the dependencies into the target directory |
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
SRC_DIR=${1:-/project/source} | ||
TARGET_DIR=${2:-/project/target} | ||
|
||
cd ${SRC_DIR} | ||
|
||
# Build the project: create all the jar files | ||
mvn clean install jar:test-jar -DskipTests | ||
# Copy the jar files into the target directory | ||
find . -name "*.jar" -exec cp {} ${TARGET_DIR} \; | ||
# Copy all the dependencies into the target directory | ||
mvn dependency:copy-dependencies -DoutputDirectory=${TARGET_DIR} |
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 @@ | ||
<settings> | ||
<mirrors> | ||
<mirror> | ||
<!--This sends everything else to /public --> | ||
<id>nexus</id> | ||
<mirrorOf>central</mirrorOf> | ||
<url>https://nexus.codingame.com/repository/maven-central/</url> | ||
</mirror> | ||
</mirrors> | ||
</settings> |