Create deployable zip

Deployable zip is a unit that can be shared with others containing all files required by JLupin Platform's microservice. It contains at least two files: microservice's fat jar and configuration file. Microservice name is set by top level directory inside zip file. Deployable zip is used by JLupin Platform tools for upload and deployment.

To create deployable zip zip command is used. By default it is bind to pakcage phase. Example usage is shown below:

Native microservice:

[...]
    <build>
        <finalName>${project.artifactId}-app-${project.version}</finalName>

        <plugins>
            <plugin>
                <groupId>com.jlupin</groupId>
                <artifactId>jlupin-platform-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jlupin-repackage</id>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jlupin-zip</id>
                        <goals>
                            <goal>zip</goal>
                        </goals>
                        <configuration>
                            <additionalFilesDirectories>
                                <param>additional-files</param>
                            </additionalFilesDirectories>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
[...]

Servlet microservice:

[...]
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.jlupin</groupId>
                <artifactId>jlupin-platform-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jlupin-zip</id>
                        <goals>
                            <goal>zip</goal>
                        </goals>
                        <configuration>
                            <additionalFilesDirectories>
                                <param>additional-files</param>
                            </additionalFilesDirectories>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
[...]

Directory named additional-files is used as source of extra files put in zip like microservice configuration file. Also repackage goal is configured before zip goal to prepare it for platform. Of course you can use only zip goal if you have your jar/war prepared before.

Of course you can configure creation of your deployable. Go here to see all configuration options.