NIFI-228 fixed build to always create assembly non-attached and to use curren maven approaches

This commit is contained in:
joewitt 2015-01-06 13:43:54 -05:00
parent 23dcdeb61b
commit 33ad7934ea
2 changed files with 118 additions and 121 deletions

View File

@ -28,68 +28,26 @@
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<id>unpack-shared-resources</id>
<id>make shared resource</id>
<goals>
<goal>unpack-dependencies</goal>
<goal>single</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
<includeArtifactIds>nifi-resources</includeArtifactIds>
<includeGroupIds>org.apache.nifi</includeGroupIds>
<excludeTransitive>false</excludeTransitive>
</configuration>
</execution>
<execution>
<id>unpack-docs</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${project.build.directory}/generated-docs</outputDirectory>
<includeArtifactIds>nifi-docs</includeArtifactIds>
<includeGroupIds>org.apache.nifi</includeGroupIds>
<excludeTransitive>false</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>src/main/assembly/dependencies.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>${project.build.directory}/${project.artifactId}-${project.version}-${nifi.assembly.id}.dir/${nifi.executable}</executable>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
<resource>
<directory>${project.build.directory}/generated-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<dependencies>
<dependency>
@ -133,14 +91,14 @@
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-resources</artifactId>
<classifier>resources</classifier>
<scope>provided</scope> <!-- Provided - we don't want the zip in the libs -->
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-docs</artifactId>
<classifier>resources</classifier>
<scope>provided</scope> <!-- Provided - we don't want the zip in the libs -->
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
@ -359,6 +317,37 @@
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-shared-resources</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
<includeArtifactIds>nifi-resources</includeArtifactIds>
<includeGroupIds>org.apache.nifi</includeGroupIds>
<excludeTransitive>false</excludeTransitive>
</configuration>
</execution>
<execution>
<id>unpack-docs</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${project.build.directory}/generated-docs</outputDirectory>
<includeArtifactIds>nifi-docs</includeArtifactIds>
<includeGroupIds>org.apache.nifi</includeGroupIds>
<excludeTransitive>false</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
@ -401,6 +390,9 @@
<source>
<location>../NOTICE</location>
</source>
<source>
<location>../DISCLAIMER</location>
</source>
<source>
<location>../README.md</location>
<destination>README</destination>
@ -433,6 +425,8 @@
<dependency>
<excludes>
<exclude>org.apache.nifi:nifi-bootstrap</exclude>
<exclude>org.apache.nifi:nifi-resources</exclude>
<exclude>org.apache.nifi:nifi-docs</exclude>
</excludes>
</dependency>
</mapping>

View File

@ -17,94 +17,97 @@
<id>bin</id>
<formats>
<format>dir</format>
<format>zip</format>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
<dependencySets>
<!-- Write out all dependency artifacts to lib directory -->
<dependencySet>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<directoryMode>0750</directoryMode>
<fileMode>0640</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
<exclude>nifi-bootstrap</exclude>
<exclude>nifi-resources</exclude>
<exclude>nifi-docs</exclude>
</excludes>
</dependencySet>
<!-- Write out the bootstrap lib component to its own dir -->
<dependencySet>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib/bootstrap</outputDirectory>
<directoryMode>0750</directoryMode>
<fileMode>0640</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<includes>
<include>nifi-bootstrap</include>
</includes>
</dependencySet>
<!-- Write out the conf directory contents -->
<dependencySet>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>./</outputDirectory>
<directoryMode>0750</directoryMode>
<fileMode>0640</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<includes>
<include>nifi-resources</include>
</includes>
<unpack>true</unpack>
<unpackOptions>
<filtered>true</filtered>
<includes>
<include>conf/*</include>
</includes>
</unpackOptions>
</dependencySet>
<!-- Write out the bin directory contents -->
<dependencySet>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>./</outputDirectory>
<directoryMode>0750</directoryMode>
<fileMode>0750</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<includes>
<include>nifi-resources</include>
</includes>
<unpack>true</unpack>
<unpackOptions>
<filtered>true</filtered>
<includes>
<include>bin/*</include>
</includes>
</unpackOptions>
</dependencySet>
<!-- Writes out the docs directory contents -->
<dependencySet>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>docs/</outputDirectory>
<useTransitiveFiltering>true</useTransitiveFiltering>
<includes>
<include>nifi-docs</include>
</includes>
<unpack>true</unpack>
<unpackOptions>
<filtered>false</filtered>
</unpackOptions>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.build.directory}/generated-resources/bin</directory>
<outputDirectory>bin</outputDirectory>
<directoryMode>0750</directoryMode>
<fileMode>0750</fileMode>
<filtered>false</filtered>
</fileSet>
<fileSet>
<directory>${project.build.directory}/generated-resources/conf</directory>
<outputDirectory>conf</outputDirectory>
<excludes>
<exclude>nifi.properties</exclude>
</excludes>
<directoryMode>0750</directoryMode>
<fileMode>0640</fileMode>
<filtered>true</filtered>
</fileSet>
<fileSet>
<directory>${project.build.directory}/generated-resources/lib</directory>
<outputDirectory>lib</outputDirectory>
<directoryMode>0750</directoryMode>
<fileMode>0640</fileMode>
</fileSet>
<fileSet>
<directory>${project.build.directory}/generated-resources/logs</directory>
<outputDirectory>logs</outputDirectory>
<directoryMode>0750</directoryMode>
<fileMode>0640</fileMode>
</fileSet>
<fileSet>
<directory>${project.build.directory}/generated-resources/docs</directory>
<outputDirectory>docs</outputDirectory>
<directoryMode>0750</directoryMode>
<fileMode>0640</fileMode>
<filtered>false</filtered>
</fileSet>
<fileSet>
<directory>${project.build.directory}/generated-docs/</directory>
<outputDirectory>docs</outputDirectory>
<directoryMode>0750</directoryMode>
<fileMode>0640</fileMode>
<filtered>false</filtered>
</fileSet>
</fileSets>
<files>
<file>
<source>${project.build.directory}/generated-resources/conf/nifi.properties</source>
<outputDirectory>conf</outputDirectory>
<destName>${project.artifactId}.properties</destName>
<fileMode>0640</fileMode>
<filtered>true</filtered>
</file>
<file>
<source>${project.build.directory}/generated-resources/bin/nifi.sh</source>
<outputDirectory>bin</outputDirectory>
<destName>nifi.sh</destName>
<fileMode>0750</fileMode>
<filtered>true</filtered>
</file>
<file>
<source>../README.md</source>
<outputDirectory>./</outputDirectory>