From 251fc2778d54866d9f6d43bea1f4f515c3654a7a Mon Sep 17 00:00:00 2001 From: xudan16 Date: Mon, 9 Oct 2023 17:26:05 +0800 Subject: Update pom.xml and add standalone to build docker image Issue-ID: MODELING-680 Change-Id: I044b8dfd050fe46c9736017fc172f8612cfdcd48 Signed-off-by: xudan16 --- pom.xml | 29 ++- standalone/pom.xml | 210 ++++++++++++++++ standalone/src/main/assembly/Dockerfile | 12 + yang-compiler/pom.xml | 407 +++++++++++++++++--------------- 4 files changed, 468 insertions(+), 190 deletions(-) create mode 100644 standalone/pom.xml create mode 100644 standalone/src/main/assembly/Dockerfile diff --git a/pom.xml b/pom.xml index 0ecc534..cffb21b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,19 @@ + @@ -14,11 +29,23 @@ yang-compiler yang-comparator + standalone pom yangkit yangkit:yang tools + + UTF-8 + UTF-8 + ${project.version} + yyyyMMdd'T'HHmm + https://nexus.onap.org + content/repositories/snapshots/ + content/repositories/releases/ + content/sites/site/${project.groupId}/${project.artifactId}/${project.version}/ + + release @@ -60,4 +87,4 @@ - \ No newline at end of file + diff --git a/standalone/pom.xml b/standalone/pom.xml new file mode 100644 index 0000000..f58e82d --- /dev/null +++ b/standalone/pom.xml @@ -0,0 +1,210 @@ + + + + 4.0.0 + + org.onap.modeling.yangkit + yangkit-parent + 1.0.0-SNAPSHOT + + + org.onap.modeling.yangkit + standalone + 1.0.0-SNAPSHOT + standalone + Distribute Binary Files and Docker Image for yang-kit + + + 5.2.0 + UTF-8 + UTF-8 + 1.8 + yyyyMMdd'T'HHmmss'Z' + target/assembly/linux64 + target/version/${intent.version} + + + + + + org.onap.modeling.yangkit + yang-compiler + ${project.version} + + + + + + yang-compiler + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-resources-linux64 + process-resources + + copy-resources + + + ${linux64outputdir} + + + src/main/assembly/ + false + + **/* + + + Dockerfile + + + + true + + + + copy-dockerfile + process-resources + + copy-resources + + + ${dockeroutput} + + + src/main/assembly/ + false + + Dockerfile + + + + true + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-jar-linux64 + + copy + + prepare-package + + + + org.onap.modeling.yangkit + yang-compiler + jar + true + ${linux64outputdir} + modeling-yang-compiler.jar + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + distribution + package + + run + + + + + + + + + + + + + + + + + + + + + + + docker + + + + io.fabric8 + docker-maven-plugin + 0.16.5 + false + + + + onap/modeling-yang-kit + + try + ${basedir}/${dockeroutput} + ${basedir}/${dockeroutput}/Dockerfile + + ${intent.version}-SNAPSHOT-latest + ${intent.version}-STAGING-latest + ${intent.version}-STAGING-${maven.build.timestamp} + + + + + + + + generate-images + package + + build + + + + push-images + deploy + + build + push + + + + + + + + + + diff --git a/standalone/src/main/assembly/Dockerfile b/standalone/src/main/assembly/Dockerfile new file mode 100644 index 0000000..2bbc781 --- /dev/null +++ b/standalone/src/main/assembly/Dockerfile @@ -0,0 +1,12 @@ +FROM nexus3.onap.org:10001/onap/integration-java11:9.0.0 + +USER root + +RUN mkdir /home/yangkit + +ADD modeling-yang-kit-*-linux64.tar.gz /home/yangkit + +WORKDIR /home/yangkit + +ENTRYPOINT ["sh", "-c"] +CMD ["exec java -jar modeling-yang-compiler.jar"] diff --git a/yang-compiler/pom.xml b/yang-compiler/pom.xml index 742a745..6ee4bc6 100644 --- a/yang-compiler/pom.xml +++ b/yang-compiler/pom.xml @@ -1,189 +1,218 @@ - - - 4.0.0 - - org.onap.modeling.yangkit - yangkit-parent - 1.0.0-SNAPSHOT - - - org.onap.modeling.yangkit - yang-compiler - 1.0.0-SNAPSHOT - - 8 - 8 - UTF-8 - UTF-8 - UTF-8 - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.0 - - - - true - org.onap.modeling.yangkit.compiler.app.YangCompilerRunner - libs/ - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.1.1 - - - copy-dependencies - package - - copy-dependencies - - - - ${project.build.directory}/libs - - - - - - - - - - io.github.yang-central.yangkit - yangkit-parser - 1.4.0 - - - - jaxen - jaxen - 2.0.0 - - - org.apache.commons - commons-lang3 - 3.12.0 - - - org.dom4j - dom4j - 2.1.4 - - - - com.google.code.gson - gson - 2.10.1 - - - org.apache.poi - poi - 5.2.3 - - - org.apache.poi - poi-ooxml - 5.2.3 - - - yang compiler - yang compiler: compile yang modules regardless where the dependencies are (by resolve and download - dependencies automatically) - - - release - - true - - - - - org.apache.maven.plugins - maven-release-plugin - 2.5.3 - - true - false - release - deploy - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - - - - - - - + + + + 4.0.0 + + org.onap.modeling.yangkit + yangkit-parent + 1.0.0-SNAPSHOT + + + org.onap.modeling.yangkit + yang-compiler + 1.0.0-SNAPSHOT + yang compiler + Source code of compile yang modules + + UTF-8 + UTF-8 + 11 + java + ${project.build.directory}/surefire-reports + ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml + true + ${project.version} + reuseReports + 5.9.0-RC1 + 1.9.0-RC1 + + + + io.github.yang-central.yangkit + yangkit-parser + 1.4.0 + + + + jaxen + jaxen + 2.0.0 + + + org.apache.commons + commons-lang3 + 3.12.0 + + + org.dom4j + dom4j + 2.1.4 + + + + com.google.code.gson + gson + 2.10.1 + + + org.apache.poi + poi + 5.2.3 + + + org.apache.poi + poi-ooxml + 5.2.3 + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.0 + + + + true + org.onap.modeling.yangkit.compiler.app.YangCompilerRunner + libs/ + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.3 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.1 + + + copy-dependencies + package + + copy-dependencies + + + + ${project.build.directory}/libs + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19 + + true + + **/*Spec* + **/Test*.java + **/*Test.java + **/*TestCase.java + **/Test*.scala + **/*Test.scala + **/*TestCase.scala + + + + + org.jacoco + jacoco-maven-plugin + + + prepare-agent + + prepare-agent + + + + report + + report + + + ${project.build.directory}/code-coverage/jacoco.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + + + + + + src/main/resources + + + src/main/java + false + + + + + + release + + true + + + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + true + false + release + deploy + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + + -- cgit 1.2.3-korg