Add Vproc and main class
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/7a41338c Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/7a41338c Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/7a41338c Branch: refs/heads/master Commit: 7a41338c46a153464a2b04d52fe0a3c387baba9e Parents: eb9bf5a Author: Kevin Xu <[email protected]> Authored: Tue Jan 12 10:29:51 2016 +0800 Committer: Kevin Xu <[email protected]> Committed: Tue Jan 12 10:29:51 2016 +0800 ---------------------------------------------------------------------- core/sql/lib_mgmt/.gitignore | 2 + core/sql/lib_mgmt/pom.xml | 40 ++++++++++++++++++++ .../java/org/trafodion/libmgmt/Vproc.java.tmpl | 35 +++++++++++++++++ 3 files changed, 77 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a41338c/core/sql/lib_mgmt/.gitignore ---------------------------------------------------------------------- diff --git a/core/sql/lib_mgmt/.gitignore b/core/sql/lib_mgmt/.gitignore index c541155..fcb79a9 100644 --- a/core/sql/lib_mgmt/.gitignore +++ b/core/sql/lib_mgmt/.gitignore @@ -2,3 +2,5 @@ /bin/ /.classpath /.project +/src/main/java/org/trafodion/libmgmt/Vproc.java +/antrun/ http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a41338c/core/sql/lib_mgmt/pom.xml ---------------------------------------------------------------------- diff --git a/core/sql/lib_mgmt/pom.xml b/core/sql/lib_mgmt/pom.xml index 8b08de4..41ffcff 100644 --- a/core/sql/lib_mgmt/pom.xml +++ b/core/sql/lib_mgmt/pom.xml @@ -22,6 +22,7 @@ * * @@@ END COPYRIGHT @@@ --> + <modelVersion>4.0.0</modelVersion> <groupId>org.trafodion</groupId> <artifactId>lib_mgmt</artifactId> @@ -34,10 +35,42 @@ <scope>provided</scope> </dependency> </dependencies> + <properties> + <maven.antrun.plugin.version>1.6</maven.antrun.plugin.version> + </properties> <build> <plugins> <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <version>${maven.antrun.plugin.version}</version> + <executions> + <execution> + <id>generate</id> + <phase>generate-sources</phase> + <configuration> + <target> + <property name="vproc.dir" + value="${basedir}/src/main/java/org/trafodion/libmgmt" /> + <property name="vproc.str" value="Traf_libmgmt_Build_" /> + <exec executable="git" outputproperty="rev_head"> + <arg value="rev-parse" /> + <arg value="--short" /> + <arg value="HEAD" /> + </exec> + <copy file="${vproc.dir}/Vproc.java.tmpl" tofile="${vproc.dir}/Vproc.java" + overwrite="true" /> + <replace file="${vproc.dir}/Vproc.java" token="@@@VPROC@@@" + value="${vproc.str}${rev_head}" /> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.3</version> @@ -46,6 +79,13 @@ <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> + <archive> + <manifest> + <addClasspath>false</addClasspath> + <classpathPrefix>lib/</classpathPrefix> + <mainClass>org.trafodion.libmgmt.Vproc</mainClass> + </manifest> + </archive> </configuration> <executions> <execution> http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a41338c/core/sql/lib_mgmt/src/main/java/org/trafodion/libmgmt/Vproc.java.tmpl ---------------------------------------------------------------------- diff --git a/core/sql/lib_mgmt/src/main/java/org/trafodion/libmgmt/Vproc.java.tmpl b/core/sql/lib_mgmt/src/main/java/org/trafodion/libmgmt/Vproc.java.tmpl new file mode 100644 index 0000000..4dd2415 --- /dev/null +++ b/core/sql/lib_mgmt/src/main/java/org/trafodion/libmgmt/Vproc.java.tmpl @@ -0,0 +1,35 @@ +/** +* @@@ START COPYRIGHT @@@ +* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +* +* @@@ END COPYRIGHT @@@ + */ +package org.trafodion.libmgmt; + +class Vproc { + private static final String vprocStr = "@@@VPROC@@@"; + + public static void main(String[] args) { + System.out.println(vprocStr); + } + + static String getVproc() { + return vprocStr; + } +}
