summaryrefslogtreecommitdiffstats
path: root/dgbuilder-docker
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2021-03-21 23:45:12 -0400
committerSingal, Kapil (ks220y) <ks220y@att.com>2021-03-21 23:45:12 -0400
commit2eeb0ccd7b4c35dfde5a874c8a253f98714d1f60 (patch)
treeb4feb291caed9d471913e6b073c3cb7f974208b1 /dgbuilder-docker
parent545f4f8d8895d2b95ec766aa76fbbd135136e570 (diff)
Replacing exec-maven-plugin with maven-antrun-plugin
With changes users with Windows environment can build module Note: Couldn't find alternate for running a bash script, so moved same into a profile which only gets activated only if OS family is UNIX Issue-ID: CCSDK-3226 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: Idc7c0874525502553b6290dc151a2db84447fd68
Diffstat (limited to 'dgbuilder-docker')
-rw-r--r--dgbuilder-docker/pom.xml133
1 files changed, 70 insertions, 63 deletions
diff --git a/dgbuilder-docker/pom.xml b/dgbuilder-docker/pom.xml
index a857723b..d5f2df4a 100644
--- a/dgbuilder-docker/pom.xml
+++ b/dgbuilder-docker/pom.xml
@@ -66,93 +66,64 @@
</execution>
</executions>
</plugin>
-
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.5.0</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
<executions>
<execution>
- <id>Make-stage-dir</id>
+ <id>make-stage-dir</id>
<phase>generate-sources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
<configuration>
- <executable>/bin/mkdir</executable>
- <arguments>
- <argument>-p</argument>
- <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
- </arguments>
+ <target>
+ <mkdir dir="${basedir}/target/docker-stage/opt/onap/ccsdk"/>
+ </target>
</configuration>
- </execution>
- <execution>
- <id>Unzip dgbuilder</id>
- <phase>generate-sources</phase>
<goals>
- <goal>exec</goal>
+ <goal>run</goal>
</goals>
- <configuration>
- <executable>/usr/bin/unzip</executable>
- <arguments>
- <argument>-d</argument>
- <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
- <argument>../dgbuilder/target/*.zip</argument>
- </arguments>
- </configuration>
</execution>
<execution>
- <id>Copy dgbuilder</id>
+ <id>unzip-dgbuilder</id>
<phase>generate-sources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
<configuration>
- <executable>/bin/cp</executable>
- <arguments>
- <argument>-r</argument>
- <argument>../dgbuilder</argument>
- <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
- </arguments>
+ <target>
+ <unzip dest="${basedir}/target/docker-stage/opt/onap/ccsdk">
+ <fileset dir="${basedir}/../dgbuilder/target/">
+ <include name="**/*.zip"/>
+ </fileset>
+ </unzip>
+ </target>
</configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
</execution>
-
<execution>
- <id>dgbuilder createReleaseDir</id>
+ <id>copy-dgbuilder</id>
<phase>generate-sources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
<configuration>
- <executable>/bin/bash</executable>
- <arguments>
- <argument>${basedir}/target/docker-stage/opt/onap/ccsdk/dgbuilder/createReleaseDir.sh</argument>
- <argument>1702</argument>
- <argument>dguser</argument>
- <argument>change_email_id@dgbuilder.com</argument>
- </arguments>
+ <target>
+ <copy todir="${basedir}/target/docker-stage/opt/onap/ccsdk/dgbuilder">
+ <fileset dir="${basedir}/../dgbuilder" excludes="target/**"/>
+ </copy>
+ </target>
</configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
</execution>
-
<execution>
<id>change shell permissions</id>
<phase>process-sources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
<configuration>
- <executable>/usr/bin/find</executable>
- <arguments>
- <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
- <argument>-name</argument>
- <argument>*.sh</argument>
- <argument>-exec</argument>
- <argument>chmod</argument>
- <argument>+x</argument>
- <argument>{}</argument>
- <argument>;</argument>
- </arguments>
+ <target>
+ <chmod dir="${basedir}/target/docker-stage/opt/onap/ccsdk" perm="+x" includes="**/*.sh"/>
+ </target>
</configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
</execution>
</executions>
</plugin>
@@ -161,6 +132,42 @@
<profiles>
<profile>
+ <id>unix</id>
+ <activation>
+ <os>
+ <family>unix</family>
+ </os>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.5.0</version>
+ <executions>
+ <!-- TODO: Need to see alternate for below, so that it can execute on Windows Environment -->
+ <execution>
+ <id>dgbuilder-createReleaseDir</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/bin/bash</executable>
+ <arguments>
+ <argument>${basedir}/target/docker-stage/opt/onap/ccsdk/dgbuilder/createReleaseDir.sh</argument>
+ <argument>1702</argument>
+ <argument>dguser</argument>
+ <argument>change_email_id@dgbuilder.com</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>docker</id>
<build>
<plugins>