[ 
https://issues.apache.org/jira/browse/NIFI-3628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15933202#comment-15933202
 ] 

ASF GitHub Bot commented on NIFI-3628:
--------------------------------------

GitHub user ottobackwards opened a pull request:

    https://github.com/apache/nifi-maven/pull/2

    NIFI-3628  allow override additions for extention and id prefixes

    This PR introduces the ability to change the extension name though changing 
the type property as well as specifying the prefix on the Nar-XXXX manifest 
entries.
    
    The type property is used to specify the file extension, and hardcoded 
instances of 'nar' are changed to use this property consistantly.
    
    The property is also used in the NarDependencyMojo, such that the hardcoded 
NAR='nar' usage is changed to use the type property.   The configuration of 
this property will govern both mojos.
    
    The defaults are all left as [N,n]ar.  Such that there are NO required 
changes to existing POMs or archetypes to continue working after this change.
    
    This was tested by building building the archetype, and building nifi with 
the pom reference changed to the version built ( validating from the logs the 
plugin version used ).
    
    All tests run and pass
    
    Nifi was run from the assembly dir, and a flow created, logs viewed to 
verify that there were no errors loading / unpacking the nars, running the 
flows.
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ottobackwards/nifi-maven NIFI-3628

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi-maven/pull/2.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2
    
----
commit f876fb78d90a3a93363c4d9473ad4315eca0b58a
Author: Otto Fowler <ottobackwa...@gmail.com>
Date:   2017-03-20T14:00:35Z

    override additions for extention and id prefixes
    override prefix for Nar-* manifest properties

----


> Allow configuration of nifi-nar-maven-plugin to control output and manifest
> ---------------------------------------------------------------------------
>
>                 Key: NIFI-3628
>                 URL: https://issues.apache.org/jira/browse/NIFI-3628
>             Project: Apache NiFi
>          Issue Type: New Feature
>            Reporter: Otto Fowler
>
> The nifi-nar-maven-plugin produces .nar files, and also looks for 'special' 
> nar dependencies with .nar extensions. 
> It also inserts manifest entries with special nifi properties used by the 
> nifi runtime system ( nifi-nar-utils ).
> The changes proposed here would allow for other projects to use nar formatted 
> archives while specializing them to fit that project.
> Specifically - 
> Allowing the configuration of the prefix used when writing out the nar 
> specific manifest entries ( Nar-Group etc ), such that another project could 
> change those properters to be Other-Group etc.
> Utilizing the 'type' property to control the output file extension name, and 
> removing hard coded 'nar' strings.
> This should be done in both the NarMojo and the NarDependencyMojo.
> The NarDependencyMojo should be modified to honor the type parameter setting, 
> instead of a hard coded value as well.
> These changes should be made such as with default settings no modifications 
> to existing NiFi bundles will be required
> With these changes, other projects, such as Apache Metron (incubating) will 
> have the ability to use and adapt the nar artifacts without forking or 
> creating duplicate functionality in the long run.
> A sample configuration would be :
> <plugins>
>       <plugin>
>         <groupId>org.apache.nifi</groupId>
>         <artifactId>nifi-nar-maven-plugin</artifactId>
>         <version>1.2.1-SNAPSHOT</version>
>         <configuration>
>           <packageIDPrefix>Par</packageIDPrefix>
>           <narDependencyVersion>1.0</narDependencyVersion>
>           <narDependencyId>foo</narDependencyId>
>           <narDependencyGroup>foobars</narDependencyGroup>
>           <type>par</type>
>           <mode>pom</mode>
>         </configuration>
>       </plugin>
>     </plugins>



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to