4.0.0
org.onap.cli
cli-deployment
1.1.1
cli-zip
cli/deployment/zip
pom
org.codehaus.gmaven
gmaven-plugin
1.5
onap-cli-deployment
package
execute
System.out.println("******** Going to make release zip ********")
deployFolder =
"${project.build.directory}/deployoutput"
deployUnzip =
"${project.build.directory}/deployunzip"
outfileName =
"${package.name}-${project.version}.zip"
ant.delete(dir: "${deployFolder}")
ant.mkdir(dir: "${deployFolder}")
ant.delete(dir: "${deployUnzip}")
ant.mkdir(dir: "${deployUnzip}")
ant.delete(dir: "${deployUnzip}/lib")
ant.mkdir(dir: "${deployUnzip}/lib")
ant.delete(dir: "${deployUnzip}/onap-cli-schema")
ant.mkdir(dir: "${deployUnzip}/onap-cli-schema")
ant.delete(dir: "${deployUnzip}/data")
ant.mkdir(dir: "${deployUnzip}/data")
ant.copy(todir: "${deployUnzip}") {
fileset(dir: "${basedir}/src/main/release"){
exclude(name: "**/.gitignore")
}
}
ant.copy(todir: "${deployUnzip}") {
fileset(file: "${basedir}/installer/cli-init.sh")
}
ant.chmod(file: "${deployUnzip}/bin/onap.sh", perm: "ugo+x")
ant.chmod(file: "${deployUnzip}/cli-init.sh", perm: "ugo+x")
ant.copy(todir:
"${deployUnzip}/lib") {
fileset(file:
"${project.build.directory}/../../../main/target/cli-main-${project.version}.jar")
fileset(dir:
"${project.build.directory}/../../../main/target/lib/")
fileset(dir:
"${project.build.directory}/../../../plugins/target/lib/")
}
ant.copy(todir:
"${deployUnzip}/conf") {
fileset(file:
"${project.build.directory}/../../../framework/src/main/resources/onap.properties")
}
ant.copy(todir:
"${deployUnzip}/conf") {
fileset(file:
"${project.build.directory}/../../../framework/src/main/resources/log4j.properties")
}
ant.copy(todir:
"${deployUnzip}/docs") {
fileset(file:
"${project.build.directory}/../../../README.md")
}
ant.zip(destfile:
"${deployFolder}/${outfileName}") {
zipfileset(dir: "${deployUnzip}", excludes: "**/*.sh")
zipfileset(dir: "${deployUnzip}", includes: "**/*.sh", filemode: "755")
}
System.out.println("******** completed. ************")
org.codehaus.mojo
build-helper-maven-plugin
3.0.0
attach-artifacts
package
attach-artifact
${project.build.directory}/deployoutput/${package.name}-${project.version}.zip
zip