[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16181316#comment-16181316 ] Nicholas DiPiazza commented on MASSEMBLY-833: - I have the following assembly {{ plugin zip false false runtime lib *:jar:* target/plugin-classes classes }} and {{ maven-assembly-plugin 2.3 src/main/assembly/assembly.xml false provided make-assembly package attached }} In my maven pom in many of my projects I have only "provided" dependencies. But in other projects I have provided and a few compile dependencies. In the ones with only provided dep's I get: *Failed to create assembly: Error creating assembly archive plugin: You must set at least one file.* Does this patch fix this? If so, what version of Maven has it? > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026164#comment-16026164 ] Michael Osipov commented on MASSEMBLY-833: -- PR has been merged. > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995370#comment-15995370 ] Michael Osipov commented on MASSEMBLY-833: -- Guys, I will soon merge https://github.com/codehaus-plexus/plexus-archiver/pull/55 which will require Java 7. We can boldly bump to a new major version cleaning up Plexus Archiver. Otherwise I will bump only minor and merge the PR as well as PR #52. > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15626667#comment-15626667 ] Guillaume Boué commented on MASSEMBLY-833: -- Created [Issue 52|https://github.com/codehaus-plexus/plexus-archiver/issues/52] to track this on Plexus Archiver. > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15623820#comment-15623820 ] Guillaume Boué commented on MASSEMBLY-833: -- [~plamenttv] I was initially thinking that {{DotDirectiveArchiveFinalizer}} wouldn't be an issue because the plugin doesn't add it, but the user can configure the archiver dynamically with the {{archiverConfig}} property of the plugin, and this could contain a {{dotFileDirectory}} (I tested this and it works fine). Maybe I'm missing a simple solution here, but what's worse is that {{DotDirectiveArchiveFinalizer}} is ran at the moment the archive is created, so there's no real good way to know in advance if it's going to add something to the archive, apart from running a dry-run on a mock archiver (or duplicating the logic done inside of them, which isn't really an option). This could be done inside the plugin, but using Reflection since {{dotFileDirectory}} does not have a getter, and furthermore, it wouldn't be able to be in sync with update made to archivers. An {{archiver.isEmpty()}} would be very convenient here, and the archiver itself will also have to do this work of running the finalizers having a {{finalizeArchiveCreation}} on a mock to see if they would add anything. I don't see an easier way here, that's a bit cumbersome... still cleaner than throwing a custom exception though. Also, wouldn't adding {{isEmpty()}} on the {{Archiver}} interface require a major version update of Plexus Archiver? It would be a breaking change for existing implementations. I'll make a GitHub issue tomorrow to ask for their feedback on this. > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15623230#comment-15623230 ] Plamen Totev commented on MASSEMBLY-833: [~gboue], just to mention that the archivers themselves can add finalizers(and some of them are adding real not virtual files). For example {{AbstractArchiver}} adds {{DotDirectiveArchiveFinalizer}} if {{dotFileDirectory}} is set. {{DotDirectiveArchiveFinalizer#getVirtualFiles}} returns empty list because it adds real files (directories stored in {{.plxarc}}) file. So I'm not completely sure if there is reliable method outside {{AbstractArchiver}} to check if the archive is going to be empty. Of course since the assembly plugin have quite a lot of control over the {{Archiver}} configuration I guess it's safe to say there are no added extra finalizers apart the ones added by the plugin itself. I just wanted to mention that just in case :) > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15620772#comment-15620772 ] Guillaume Boué commented on MASSEMBLY-833: -- [~plamenttv], you're right that it would be cleaner to not try to create the archive in the first place. Looking at the code, we have a way to do that by checking the virtual files of each finalizers. I will work on something, without involving any change in Plexus Archiver. > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15617625#comment-15617625 ] Plamen Totev commented on MASSEMBLY-833: Hi, I was thinking what would make wore sense. 1. To have a public method that returns {{boolean}} value that indicates if there is any content (files or virtual files like manifests). Then we could have something like this: {code:java} if ( archiver.isEmpty() && !skipEmptyArchives ) { // fail the build or do something else } {code} Personally I think this is the more natural approach as it is more explicit about the concept of the empty archive files. If you don't have files in the archive (and that's not really an error condition - it's part of the regular use of the object) probably you should not try to create the archive in first place. As a matter of fact I find it strange that exception is thrown when there are no files since as far I know it is perfectly legal to have empty zip files. 2. To throw specific exception. Keep in mind that currently not all archivers throw {{ArchiveException}} when there is no content. Some of them (the single file ones as bzip2) do not check if there are resources to add - they just take the next one: {code:java} ResourceIterator iter = getResources(); ArchiveEntry entry = iter.next(); {code} This will throw {{NoSuchElementException}} instead of {{ArchiveException}}. Of course the code could be refactored, but my point is that throwing {{ArchiveException}} if the archive is empty is not part of the {{Archiver}} interface. Of course can't be absolutely sure as {{Archiver#createArchive}} does not have documentation. Also I have a question. Would it make sense to be able to create empty archives with the assembly plugin? > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15563088#comment-15563088 ] Guillaume Boué commented on MASSEMBLY-833: -- No I didn't create an issue for {{plexus-archiver}}, you can create it. {{AbstractZipArchiver}} also [does|https://github.com/codehaus-plexus/plexus-archiver/blob/plexus-archiver-3.4/src/main/java/org/codehaus/plexus/archiver/zip/AbstractZipArchiver.java#L255-L258] {code:java} if ( !iter.hasNext() && !hasVirtualFiles() ) { throw new ArchiverException( "You must set at least one file." ); } {code} and it's this added check of {{hasVirtualFiles()}}, that calls the archive finalizers. You can submit a pull request directly on the [Github repo|https://github.com/codehaus-plexus/plexus-archiver], the guidelines with regard to code formatting are the same as here. I'm not sure either if they have a release planned but the latest releases [were in May and June|https://github.com/codehaus-plexus/plexus-archiver/releases], so it should be fine. > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15561474#comment-15561474 ] Martin Vehovský commented on MASSEMBLY-833: --- Hi Guillaume, thanks for spotting this. Quick search in _plexus-archiver_ shows this exception is in fact thrown only for dir/zip/tar archivers: _AbstractZipArchiver_ _DirectoryArchiver_ _TarArchiver_ In all cases they do following check: {code:borderStyle=solid} if ( !iter.hasNext() ) { throw new ArchiverException( "You must set at least one file." ); } {code} Anyway throwing some subclass of _ArchiveException_ sounds good to me. Sub-optimal solution would be to check the error message, too bad they don't use at least some public constant. Did you already created the item for _plexus-archiver_? I can contribute it to plexus, assuming there are same guidelines for contribution as here? What I don't know is plexus release cycle? Once plexus is released I can provide new patch here. > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15560747#comment-15560747 ] Guillaume Boué commented on MASSEMBLY-833: -- The attached patch has a side-effect when a JAR assembly is created only with a Manifest. If the configuration of the Assembly Plugin is: {noformat} MANIFEST.MF assembly.xml {noformat} and the assembly descriptor is simply: {noformat} http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd";> its jar {noformat} Setting the new attribute {{ignoreNoFiles}} to {{true}} results in no assembly being created, when the JAR should be created, with the Manifest inside. Basically, this corner-case happens when there are {{ArchiveFinalizer}} that are set on the archiver, and those finalizers would add files to the assembly. I think the only good work-around here is to update {{plexus-archiver}} and throw a more specific exception when no files were set: instead of an {{ArchiverException}}, we could throw a {{EmptyArchiveException}} that would be a subclass of {{ArchiverException}}. In the Assembly Plugin, this specific exception can then be catched, and then making the build fail depending on the value {{ignoreNoFiles}}. If someone doesn't see another way, I'll make an issue for {{plexus-archiver}} with this. > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15558544#comment-15558544 ] Martin Vehovský commented on MASSEMBLY-833: --- Hi Karl, thank you very much. I've attached the patch. One more question if I may, I have added javadoc for the new 'ignoreNoFiles' property, but I didn't know where the user Documentation is. (the one available on http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html) And BTW I think I stumbled on your plugin already, but our use case is a actually little different, we don't have only 'configuration' files but also something let's call is simply 'data' and those can and in most cases are also for other 'application' modules. Imagine one 'application' module handles task scheduling, so other 'application' modules can provide their own 'data' for it, etc. > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Attachments: > _MASSEMBLY_833__added_ignoreNoFiles_parameter_allowing_not_to_fail_when_there_are_no_files.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1353#comment-1353 ] Karl Heinz Marbaise commented on MASSEMBLY-833: --- It would be great to see your ideas and enhancements...The guide lines are to follow the [code style|http://maven.apache.org/guides/development/guide-helping.html] and create a patch via svn diff ...furthermore attach the patch to this issue..Apart from that I have [created a plugin for such purposes|https://github.com/khmarbaise/multienv-maven-plugin] which sounds like it could solve your problem as well... > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environments this solution starts to be messy and > hard to maintain. > Do you think that having assembly Parameter "ignoreNoFiles" that will cause > to skip the archive creation for cases there are no files to package seems > like reasonable solution? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MASSEMBLY-833) Ability to ignore errors about no files to package in assembly
[ https://issues.apache.org/jira/browse/MASSEMBLY-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15554970#comment-15554970 ] Martin Vehovský commented on MASSEMBLY-833: --- I would like to contribute this enhancement. I already have working prototype. Only need someone to point me to some contribution guidelines. Thank you > Ability to ignore errors about no files to package in assembly > -- > > Key: MASSEMBLY-833 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-833 > Project: Maven Assembly Plugin > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Martin Vehovský > Original Estimate: 4h > Remaining Estimate: 4h > > Motivation: Having extremely large multi-module project, some modules lets > call them "application" modules provide "configuration" files, and they > provide them for different environments. Problem is that not all > "application" modules provide "configuration" files for all environments. In > case there are no files available for assembly, the single goal ends up with > ERROR: > Failed to > create assembly: Error creating assembly archive : You must > set at least one file. > Available workaround is to specify a property to by default skip the assembly > execution and only if there are files for given environment set this property > to not skip the given assembly execution. > However for large number of environment this solution start to be messy and > hard to maintain. > Having assembly Parameter "ignoreNoFiles" that will cause to skip the archive > creation for cases there aro no files to package seems like reasonable > solution. -- This message was sent by Atlassian JIRA (v6.3.4#6332)