- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <id>copy-dockerfile</id>
- <goals>
- <goal>copy-resources</goal>
- </goals><!-- here the phase you need -->
- <phase>validate</phase>
- <configuration>
- <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/docker</directory>
- <includes>
- <include>Dockerfile</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.5.0</version>
- <executions>
- <execution>
- <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>
- </configuration>
- </execution>
- <execution>
- <id>Unzip dgbuilder</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>exec</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>
- <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>
- </configuration>
- </execution>
-
- <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>
-
- <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>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-dockerfile</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/docker</directory>
+ <includes>
+ <include>Dockerfile</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <id>make-stage-dir</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <target>
+ <mkdir dir="${basedir}/target/docker-stage/opt/onap/ccsdk"/>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>unzip-dgbuilder</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <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>copy-dgbuilder</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <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>
+ <configuration>
+ <target>
+ <chmod dir="${basedir}/target/docker-stage/opt/onap/ccsdk" perm="+x" includes="**/*.sh"/>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>