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

James Wing commented on NIFI-3795:
----------------------------------

I believe the profiles are unintentionally related by fine print in Maven's 
activeByDefault setting used for the generateArchives profile.  From 
[Introduction to Build 
Profiles|http://maven.apache.org/guides/introduction/introduction-to-profiles.html]:

bq. This profile will automatically be active for all builds unless another 
profile in the same POM is activated using one of the previously described 
methods. All profiles that are active by default are automatically deactivated 
when a profile in the POM is activated on the command line or through its 
activation config.

My theory is mostly based on reasoning about the profiles, combining my 
near-complete ignorance of Maven with superstitious beliefs developed from 
earlier build issues.  I get some concrete support from running {{mvn 
help:active-profiles}} in the nifi-assembly directory.  In a typical git repo, 
this yields:

{code}
The following profiles are active:

 - generateArchives (source: org.apache.nifi:nifi-assembly:1.2.0-SNAPSHOT)
 - disable-doclint (source: org.apache.nifi:nifi:1.2.0-SNAPSHOT)
{code}
 
With -Pdir-only:

{code}
The following profiles are active:

 - dir-only (source: org.apache.nifi:nifi-assembly:1.2.0-SNAPSHOT)
 - disable-doclint (source: org.apache.nifi:nifi:1.2.0-SNAPSHOT)
{code}
 
And in a non-git source build:

{code}
The following profiles are active:

 - build-info-no-git (source: org.apache.nifi:nifi-assembly:1.2.0)
 - disable-doclint (source: org.apache.nifi:nifi:1.2.0)
{code}

I know that's not exactly the same as nifi-assembly in the middle of a build.  
Adding {{help:active-profiles}} as an additional NiFi build goal only seems to 
work when the build succeeds, so I haven't gotten to a "smoking gun" of a 
deactivated generateArchives profile at the time it runs into the error.


> nifi-assembly fails with "no formats specified" error
> -----------------------------------------------------
>
>                 Key: NIFI-3795
>                 URL: https://issues.apache.org/jira/browse/NIFI-3795
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Bryan Bende
>            Priority: Blocker
>             Fix For: 1.2.0
>
>
> After staging the 1.2.0 RC1 artifacts, I then downloaded the source zip from 
> the Nexus staging repo, unzipped it and ran "mvn clean install -DskipTests" 
> to verify that it would build. I encountered the below error:
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-assembly-plugin:2.5.2:single (make shared 
> resource) on project nifi-assembly: No formats specified in the execution 
> parameters or the assembly descriptor. -> [Help 1]
> After some debugging it was determined that one difference between this build 
> and the previous build that staged the artifacts, is that this build was not 
> within a git repo where as the other one was.
> After running git init, adding all files, and making a commit, then the build 
> passed. Still unclear as to why being in a git repo matters here, although 
> every NAR now tries to use the git info from the buildnumber plugin to filter 
> into the MANIFEST files.



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

Reply via email to