forked from liferay/liferay-nativity
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.ps1
39 lines (34 loc) · 981 Bytes
/
build.ps1
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
Param(
[Switch] $skipBuild,
[Switch] $skipInstall,
[String] $version,
[Switch] $debugBuild
)
if (-not $version) {
$pom = [xml](Get-Content pom.xml)
$version = [String]$pom.project.version
}
Write-Host "** Building for ${version} **"
$configuration = "";
if ($debugBuild) {
$configuration = "-Dmsbuild.configuration=Debug"
}
else {
$configuration = "-Dmsbuild.configuration=Release"
}
if (-not $skipBuild) {
mvn clean install
ant -f build-overlays.xml overlays $configuration
ant -f build.xml build-windows-menus $configuration
}
if (-not $skipInstall) {
foreach ($file in Get-ChildItem dist\*.dll) {
Write-Host "Adding $($file.BaseName)"
mvn install:install-file `
-Dfile="$($file.FullName)" `
-DgroupId="ch.iterate.liferay" `
-DartifactId="$($file.BaseName)" `
-Dversion="${version}" `
-Dpackaging="dll" -Dclassifier="native" -DgeneratePom="true"
}
}