Build batchsamples zip

This commit is contained in:
David Turanski
2019-05-02 16:48:12 -04:00
parent 9c6d1c1f13
commit 48f67223c9
4 changed files with 91 additions and 0 deletions

View File

@@ -13,6 +13,12 @@ From the root project execute the following:
```
$ ./mvnw clean package
```
== Build the project zip file
```
$./mvnw clean package -Pdist
```
== Build the Docker Images for the project
```
$ ./mvnw clean package jib:dockerBuild

View File

@@ -112,6 +112,70 @@
</plugins>
</build>
<profiles>
<profile>
<id>dist</id>
<build>
<plugins>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<version>0.1</version>
<executions>
<execution>
<id>directories</id>
<goals>
<goal>highest-basedir</goal>
</goals>
<phase>initialize</phase>
<configuration>
<property>streams.basedir</property>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<tasks>
<copy file="${streams.basedir}/target/spring-cloud-task-edu-samples-${project.version}.zip"
tofile="${streams.basedir}/dist/batchsamples.zip" overwrite="true"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${streams.basedir}/src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<repositories>
<repository>
<id>spring-snapshots</id>

View File

@@ -0,0 +1,21 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>zip</id>
<includeBaseDirectory>true</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<baseDirectory>batchsamples</baseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<excludes>
<exclude>**/target/**</exclude>
<exclude>src/**</exclude>
<exclude>**/dist/**</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>