diff options
author | lj1412 <lji@research.att.com> | 2017-02-14 15:11:30 +0000 |
---|---|---|
committer | lj1412 <lji@research.att.com> | 2017-02-14 15:11:32 +0000 |
commit | b82c3e96a97c346abdd26fa6a0fe9f657c6a2899 (patch) | |
tree | a41cd50aafb83c9892b33dea906937f7e577cb7e /ncomp-maven-parent-project/src/main | |
parent | 7c020e2eb1d12abcb96505cf1ba393eeb2e52e97 (diff) |
Init ncomp.maven
Change-Id: I2feb61bb7e8622fb1f2c03263ed0ceae8e1987d2
Signed-off-by: lj1412 <lji@research.att.com>
Diffstat (limited to 'ncomp-maven-parent-project/src/main')
7 files changed, 108 insertions, 0 deletions
diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/.gitignore b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/.project b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.project new file mode 100644 index 0000000..b037bcd --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>PPPP</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription> diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.core.resources.prefs b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/pom.xml b/ncomp-maven-parent-project/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..0151c7a --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,25 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>GNAMEEEE</groupId> + <artifactId>PPPP</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>PPPP</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <modules> + MMMM + </modules> + + <parent> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-base</artifactId> + <version>0.1.0-SNAPSHOT</version> + <relativePath>../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base</relativePath> + </parent> +</project> diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/src/main/resources/setup.sh b/ncomp-maven-parent-project/src/main/resources/archetype-resources/src/main/resources/setup.sh new file mode 100644 index 0000000..33e9e7d --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/src/main/resources/setup.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -v + +#STEP 1 build code +( cd git/GNAMEEE/PPPP ; mvn clean install ) || exit + +#STEP 2 install and start service controller +bin/ncomp-tool install-sirius-controller GNAMEEE PPPP-server 7112 || exit + +#STEP 3 start controller GUI +bin/ncomp-tool install-sirius-controller-gui PPPP-server "XXXX" + + +#STEP 4 start console and create anormaly +echo make console +echo :load scripts/console.groovy + + + + diff --git a/ncomp-maven-parent-project/src/main/resources/new_project.sh b/ncomp-maven-parent-project/src/main/resources/new_project.sh new file mode 100644 index 0000000..997dfcf --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/new_project.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +GIT=$1 +PREFIX=$2 +GNAMEEEE=$3 + +RRRR=`echo $PPPP | sed s/-//g` +SSSS=`echo $PPPP | sed s/-/./g` +XXXX=`echo $PPPP | sed sx-x/xg` +##TTTT=`echo $QQQQ | sed s/-/./g` +##YYYY=`echo $QQQQ | sed sx-x/xg` +BBBB=$(tr '[:upper:]' '[:lower:]' <<< $ZZZZ) + +SDIR=$(dirname $0)/archetype-resources + +DIR=$GIT/$PREFIX + + +if [ -e $DIR ]; then + echo $DIR exists + exit 1 +fi + +echo Creating Maven Parent project $DIR + +cp -rp $SDIR $DIR + +find $DIR -type f | xargs -I X sed -i s/PPPP/$PREFIX/g X +find $DIR -type f | xargs -I YY sed -i s/GNAMEEEE/$GNAMEEEE/g YY + +for d1 in $(ls -1d $GIT/$PREFIX-*); do + d=$(basename $d1) + ## echo DIR $d + ## echo sed -i "s=MMMM=<module>../$d</module>\nMMMM=" $DIR/pom.xml + sed -i "s=MMMM=<module>../$d</module>\n MMMM=" $DIR/pom.xml +done +sed -i "s/.*MMMM.*//" $DIR/pom.xml + + |