- <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId>
- <version>3.0.2</version> </plugin> -->
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar-no-fork</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.5.3</version>
- <configuration>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- <checkModificationExcludes>
- </checkModificationExcludes>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-gitexe</artifactId>
- <version>1.9.4</version>
- </dependency>
- </dependencies>
- </plugin>
-
- <plugin>
- <groupId>org.sonatype.plugins</groupId>
- <artifactId>nexus-staging-maven-plugin</artifactId>
- <extensions>false</extensions>
- <executions>
- <execution>
- <id>injected-nexus-deploy</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>2.8</version>
- <executions>
- <execution>
- <id>default-deploy</id>
- <phase>none</phase>
- <configuration>
- <skip />
- </configuration>
- </execution>
- </executions>
- <configuration>
- <skip />
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <outputDirectory>target</outputDirectory>
- <encoding>UTF-8</encoding>
- <artifactItems>
- <artifactItem>
- <groupId>org.onap.dmaap.messagerouter.mirroragent</groupId>
- <artifactId>dmaapMMAgent</artifactId>
- <version>1.1.2</version>
- <destFileName>dmaapMMAgent.jar</destFileName>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.spotify</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>1.0.0</version>
- <configuration>
- <imageName>onap/dmaap/kafka111</imageName>
- <dockerDirectory>src/main/docker</dockerDirectory>
- <serverId>docker-hub</serverId>
- <imageTags>
- <imageTag>${dockertag1}</imageTag>
- <imageTag>${dockertag2}</imageTag>
- </imageTags>
- <resources>
- <!-- <resource> <targetPath>/</targetPath> <directory>${dockerLocation}</directory>
- <include>${project.build.finalName}.jar</include> </resource> -->
- <resource>
- <targetPath>/</targetPath>
- <directory>${project.build.directory}</directory>
- <include>**/**</include>
- </resource>
- <resource>
- <targetPath>/</targetPath>
- <directory>${project.build.directory}</directory>
- <include>dmaapMMAgent.jar</include>
- </resource>
- </resources>
- </configuration>
- <executions>
- <execution>
- <id>build-image</id>
- <phase>install</phase>
- <goals>
- <goal>build</goal>
- </goals>
- <configuration>
- <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
- </configuration>
- </execution>
-
- <execution>
- <id>tag-image-project-version</id>
- <phase>install</phase>
- <goals>
- <goal>tag</goal>
- </goals>
- <configuration>
- <image>onap/dmaap/kafka111</image>
- <newName>${docker.push.registry}/onap/dmaap/kafka111:${dockertag2}</newName>
- <skipDockerTag>${skip.docker.push}</skipDockerTag>
- </configuration>
- </execution>
-
- <execution>
- <id>tag-image-latest</id>
- <phase>install</phase>
- <goals>
- <goal>tag</goal>
- </goals>
- <configuration>
- <image>onap/dmaap/kafka111</image>
- <newName>${docker.push.registry}/onap/dmaap/kafka111:${dockertag1}</newName>
- <skipDockerTag>${skip.docker.push}</skipDockerTag>
- </configuration>
- </execution>
-
- <execution>
- <id>push-image</id>
- <phase>deploy</phase>
- <goals>
- <goal>push</goal>
- </goals>
- <configuration>
- <imageName>${docker.push.registry}/onap/dmaap/kafka111:${dockertag2}</imageName>
- <skipDockerPush>${skip.docker.push}</skipDockerPush>
- </configuration>
- </execution>
-
- <execution>
- <id>push-image-latest</id>
- <phase>deploy</phase>
- <goals>
- <goal>push</goal>
- </goals>
- <configuration>
- <imageName>${docker.push.registry}/onap/dmaap/kafka111:${dockertag1}</imageName>
- <skipDockerPush>${skip.docker.push}</skipDockerPush>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.4.1</version>
- <configuration>
- <!-- get all project dependencies -->
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- <!-- MainClass in mainfest make a executable jar -->
- <finalName>kafka11aaf</finalName>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <!-- bind to the packaging phase -->
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <timestamp>${maven.build.timestamp}</timestamp>
- <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
- <sitePath>/content/sites/site/org/onap/dmaap/kafka0111/${project.artifactId}/${project.version}</sitePath>
- <skip.docker.build>true</skip.docker.build>
- <skip.docker.push>true</skip.docker.push>
- <nexusproxy>https://nexus.onap.org</nexusproxy>
- <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
- <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
- </properties>
-
- <!-- Distribution management -->
- <distributionManagement>
- <site>
- <id>ecomp-site</id>
- <url>dav:${nexusproxy}${sitePath}</url>
- </site>
- </distributionManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.onap.aaf.authz</groupId>
- <artifactId>aaf-cadi-aaf</artifactId>
- <version>2.1.2</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.7.2</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>1.7.2</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.kafka</groupId>
- <artifactId>kafka_2.12</artifactId>
- <version>1.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
- <version>1.6.4</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>1.6.4</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4-rule</artifactId>
- <version>1.6.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>1.10.19</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <id>docker</id>
- <properties>
- <skip.docker.build>false</skip.docker.build>
- <skip.docker.tag>false</skip.docker.tag>
- <skip.docker.push>false</skip.docker.push>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <properties>
- <ver>${project.version}</ver>
- <timestamp>${maven.build.timestamp}</timestamp>
- </properties>
- <source>
- println project.properties['ver'];
- if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
- project.properties['dockertag1']=project.properties['ver'] +
- "-latest";
- project.properties['dockertag2']=project.properties['ver'] +
- "-" + project.properties['timestamp'];
- } else {
- project.properties['dockertag1']=project.properties['ver'] +
- "-STAGING-latest";
- project.properties['dockertag2']=project.properties['ver'] +
- "-STAGING-" + project.properties['timestamp'];
- }
- println 'docker tag 1: ' + project.properties['dockertag1'];
- println 'docker tag 2: ' + project.properties['dockertag2'];
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- </profiles>