[
https://jira.codehaus.org/browse/MASSEMBLY-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=326193#comment-326193
]
Arthur Naseef commented on MASSEMBLY-628:
-----------------------------------------
How about this - don't generate the WARNING when the format is <dir>, so that a
list of formats such as
{code}
<formats>
<format>dir</format>
<format>tar.gz</format>
</formats>
{code}
can easily be used to get both the .tar.gz and the blown-out directory without
the WARNING?
Here's a patch against version 2.3:
{code}
Index:
src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java
===================================================================
---
src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java
(revision 1489534)
+++
src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java
(working copy)
@@ -498,7 +498,7 @@
projectHelper.attachArtifact( project, format,
null, destFile );
}
}
- else if ( attach )
+ else if ( attach && ( ! format.startsWith("dir") ) )
{
getLog().warn( "Assembly file: "
+ destFile
{code}
Or, at least the message can be taken down to an info-level message when format
startsWith("dir")...
> Bogus warning when assembling to a directory
> --------------------------------------------
>
> Key: MASSEMBLY-628
> URL: https://jira.codehaus.org/browse/MASSEMBLY-628
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.3
> Environment: Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
> Maven home: c:\Users\visola\Downloads\springsource\apache-maven-3.0.3
> Java version: 1.6.0_32, vendor: Sun Microsystems Inc.
> Java home: c:\Program Files\Java\jdk1.6.0_32\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
> maven-assembly-plugin:2.3
> Reporter: Vinicius Isola
> Attachments: test.zip
>
>
> When adding a "dir" format to the assembly file, it will output a bogus
> warning like the following:
> [WARNING] Assembly file: c:\Users\visola\temp\test\target\test-1.0.0 is not a
> regular file (it may be a directory). It cannot be attached to the project
> build for installation or deployment.
> I think it is related to bug: http://jira.codehaus.org/browse/MASSEMBLY-289
> Attached is an example project that can reproduce the problem just running
> "mvn clean install"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira