-
Notifications
You must be signed in to change notification settings - Fork 289
/
Copy pathmaven.yaml
79 lines (66 loc) · 2.5 KB
/
maven.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package:
name: maven
version: 3.9.6
epoch: 1
description: A Java project management and project comprehension tool.
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
# The first time this is built, it depends on maven-stage0.yaml being built first,
# using pre-built maven binaries, which `provides` a maven package at an earlier version.
# Afterwards it depends on previous versions of this package built from source.
- maven
- openjdk-11-default-jvm
- openjdk-11-jre
pipeline:
- uses: git-checkout
with:
repository: https://github.com/apache/maven
tag: maven-${{package.version}}
expected-commit: bc0240f3c744dd6b6ec2920b3cd08dcc295161ae
destination: maven
- runs: |
cd maven
mkdir -p ${{targets.destdir}}/usr/share/java/maven
mkdir -p ${{targets.destdir}}/usr/share/java/maven/bin
mkdir -p ${{targets.destdir}}/usr/share/java/maven/boot
mkdir -p ${{targets.destdir}}/usr/share/java/maven/lib
mvn clean package
tar -xf ./apache-maven/target/apache-maven-${{package.version}}-bin.tar.gz
cd apache-maven-${{package.version}}
install -m644 -Dt ${{targets.destdir}}/usr/share/java/maven/bin ./bin/*.conf
install -m644 -Dt ${{targets.destdir}}/usr/share/java/maven/boot ./boot/*.jar
install -m644 -Dt ${{targets.destdir}}/usr/share/java/maven/lib ./lib/*.jar
cp -Rp ./conf ${{targets.destdir}}/usr/share/java/maven/
mkdir -p ${{targets.destdir}}/usr/bin
install -m755 -Dt ${{targets.destdir}}/usr/share/java/maven/bin ./bin/mvn
ln -sf /usr/share/java/maven/bin/mvn ${{targets.destdir}}/usr/bin/mvn
install -m755 -Dt ${{targets.destdir}}/usr/share/java/maven/bin ./bin/mvnDebug
ln -sf /usr/share/java/maven/bin/mvnDebug ${{targets.destdir}}/usr/bin/mvnDebug
install -m755 -Dt ${{targets.destdir}}/usr/share/java/maven/bin ./bin/mvnyjp
ln -sf /usr/share/java/maven/bin/mvnyjp ${{targets.destdir}}/usr/bin/mvnyjp
update:
enabled: true
github:
identifier: apache/maven
strip-prefix: maven-
test:
environment:
contents:
packages:
- openjdk-11-default-jvm
- openjdk-11-jre
environment:
JAVA_HOME: /usr/lib/jvm/java-11-openjdk
pipeline:
- runs: |
mvn --version
- working-directory: helloworld
runs: |
mvn clean install
java -cp target/hellowolfi-1.0-SNAPSHOT.jar com.example.HelloWolfi