Skip to content

Commit 1feb58f

Browse files
author
Aaron O'Mullan
committed
Add Maven project support
1 parent d3042c4 commit 1feb58f

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed

core/cb.project/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var SUPPORTED = [
1414
require("./appengine"),
1515
require("./procfile"),
1616
require("./parse"),
17+
require("./maven"),
1718

1819
// Frameworks
1920
require("./django"),

core/cb.project/maven/detector.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
# bin/use <build-dir>
3+
4+
WORKSPACE=$1
5+
6+
if [ -f "${1}/pom.xml" ]; then
7+
echo "Maven" && exit 0
8+
else
9+
echo "no" && exit 1
10+
fi

core/cb.project/maven/index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var path = require("path");
2+
3+
module.exports = {
4+
id: "maven",
5+
name: "Maven",
6+
7+
detector: path.resolve(__dirname, "detector.sh"),
8+
runner: [
9+
{
10+
id: "run",
11+
script: path.resolve(__dirname, "run.sh")
12+
},
13+
{
14+
id: "install",
15+
script: path.resolve(__dirname, "install.sh")
16+
}
17+
]
18+
};

core/cb.project/maven/install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
# Script args
4+
WORKSPACE=$1
5+
PORT=$2
6+
7+
mvn install

core/cb.project/maven/run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
# Script args
4+
WORKSPACE=$1
5+
PORT=$2
6+
7+
mvn exec:java

0 commit comments

Comments
 (0)