You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Julien Simon (JIRA)" <ji...@codehaus.org> on 2008/06/25 14:26:27 UTC

[jira] Created: (MASSEMBLY-332) MANIFEST.MF is not used when specified in configuration for a WAR format assembly

MANIFEST.MF is not used when specified in configuration for a WAR format assembly
---------------------------------------------------------------------------------

                 Key: MASSEMBLY-332
                 URL: http://jira.codehaus.org/browse/MASSEMBLY-332
             Project: Maven 2.x Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.2-beta-2
            Reporter: Julien Simon
            Priority: Minor
         Attachments: maven_project.zip

When you try to specify a manifestFile for an assembly with *war* format,  the manifest file specified is not used.

I have attached a zip archive which contains a maven project that reproduces the bug. The assembly generated during the package phase and named myArtifactId-1.0.0-source.war contains a manifest file, but not the one specified in the maven-assembly-plugin  configuration in the pom.

I tried different versions 2.1 and 2.2-beta-2 with jar and war assembly formats, here's the behavior description:
maven-assembly *2.1* + *war* assembly format              >>>>>>> good manifest file included
maven-assembly *2.2-beta-2* +*war* assembly format  >>>>>>> empty manifest file
maven-assembly *2.1* + *jar* assembly format                 >>>>>>> good manifest file included
maven-assembly *2.2-beta-2* + *jar* assembly format    >>>>>>> good manifest file included
 
The workaround is to use version 2.1 of the maven-assembly-plugin.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MASSEMBLY-332) MANIFEST.MF is not used when specified in configuration for a WAR format assembly

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MASSEMBLY-332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey closed MASSEMBLY-332.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2-beta-6
         Assignee: John Casey

this has been fixed for some time now, marking fixed now (at least).

> MANIFEST.MF is not used when specified in configuration for a WAR format assembly
> ---------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-332
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-332
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-2
>            Reporter: Julien Simon
>            Assignee: John Casey
>            Priority: Minor
>             Fix For: 2.2-beta-6
>
>         Attachments: MASSEMBLY-332-maven-assembly-plugin.patch, maven_project.zip
>
>
> When you try to specify a manifestFile for an assembly with *war* format,  the manifest file specified is not used.
> I have attached a zip archive which contains a maven project that reproduces the bug. The assembly generated during the package phase and named myArtifactId-1.0.0-source.war contains a manifest file, but not the one specified in the maven-assembly-plugin  configuration in the pom.
> I tried different versions 2.1 and 2.2-beta-2 with jar and war assembly formats, here's the behavior description:
> maven-assembly *2.1* + *war* assembly format              >>>>>>> good manifest file included
> maven-assembly *2.2-beta-2* +*war* assembly format  >>>>>>> empty manifest file
> maven-assembly *2.1* + *jar* assembly format                 >>>>>>> good manifest file included
> maven-assembly *2.2-beta-2* + *jar* assembly format    >>>>>>> good manifest file included
>  
> The workaround is to use version 2.1 of the maven-assembly-plugin.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MASSEMBLY-332) MANIFEST.MF is not used when specified in configuration for a WAR format assembly

Posted by "Julien Simon (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MASSEMBLY-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139567#action_139567 ] 

Julien Simon commented on MASSEMBLY-332:
----------------------------------------

I have looked at the source code of version 2.2-beta-2, and specifying a manifest file seems to be a functionality provided for only  jar format assembly descriptor. As this functionality works fine in version 2.1, is it a restriction introduced in 2.2-beta-2 ?

Here's the code excerpt :


package org.apache.maven.plugin.assembly.archive;
public class DefaultAssemblyArchiver
    extends AbstractLogEnabled
    implements AssemblyArchiver
{
...  
    protected Archiver createArchiver( String format, boolean includeBaseDir, String finalName, AssemblerConfigurationSource configSource,  List containerHandlers )
        throws ArchiverException, NoSuchArchiverException
    {
        ...
        List extraFinalizers = null;
        if ( "jar".equals( format ) )
        {
            extraFinalizers = Collections.singletonList( new ManifestCreationFinalizer( configSource.getProject(),
                                                                                        configSource.getJarArchiveConfiguration() ) );
        }
        ...
    }
...
}

> MANIFEST.MF is not used when specified in configuration for a WAR format assembly
> ---------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-332
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-332
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-2
>            Reporter: Julien Simon
>            Priority: Minor
>         Attachments: maven_project.zip
>
>
> When you try to specify a manifestFile for an assembly with *war* format,  the manifest file specified is not used.
> I have attached a zip archive which contains a maven project that reproduces the bug. The assembly generated during the package phase and named myArtifactId-1.0.0-source.war contains a manifest file, but not the one specified in the maven-assembly-plugin  configuration in the pom.
> I tried different versions 2.1 and 2.2-beta-2 with jar and war assembly formats, here's the behavior description:
> maven-assembly *2.1* + *war* assembly format              >>>>>>> good manifest file included
> maven-assembly *2.2-beta-2* +*war* assembly format  >>>>>>> empty manifest file
> maven-assembly *2.1* + *jar* assembly format                 >>>>>>> good manifest file included
> maven-assembly *2.2-beta-2* + *jar* assembly format    >>>>>>> good manifest file included
>  
> The workaround is to use version 2.1 of the maven-assembly-plugin.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MASSEMBLY-332) MANIFEST.MF is not used when specified in configuration for a WAR format assembly

Posted by "Edd Steel (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MASSEMBLY-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147134#action_147134 ] 

Edd Steel commented on MASSEMBLY-332:
-------------------------------------

This restriction (http://maven.apache.org/plugins/maven-assembly-plugin/usage.html confirms it is by design) seems so arbitrary.

If it were allowed with war assemblies as well as jar assemblies, skinny wars become very easy to create -- you just unpack a war, strip out libs and add this manifest, all in one assembly descriptor.

> MANIFEST.MF is not used when specified in configuration for a WAR format assembly
> ---------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-332
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-332
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-2
>            Reporter: Julien Simon
>            Priority: Minor
>         Attachments: maven_project.zip
>
>
> When you try to specify a manifestFile for an assembly with *war* format,  the manifest file specified is not used.
> I have attached a zip archive which contains a maven project that reproduces the bug. The assembly generated during the package phase and named myArtifactId-1.0.0-source.war contains a manifest file, but not the one specified in the maven-assembly-plugin  configuration in the pom.
> I tried different versions 2.1 and 2.2-beta-2 with jar and war assembly formats, here's the behavior description:
> maven-assembly *2.1* + *war* assembly format              >>>>>>> good manifest file included
> maven-assembly *2.2-beta-2* +*war* assembly format  >>>>>>> empty manifest file
> maven-assembly *2.1* + *jar* assembly format                 >>>>>>> good manifest file included
> maven-assembly *2.2-beta-2* + *jar* assembly format    >>>>>>> good manifest file included
>  
> The workaround is to use version 2.1 of the maven-assembly-plugin.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MASSEMBLY-332) MANIFEST.MF is not used when specified in configuration for a WAR format assembly

Posted by "Edd Steel (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MASSEMBLY-332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edd Steel updated MASSEMBLY-332:
--------------------------------

    Attachment: MASSEMBLY-332-maven-assembly-plugin.patch

Attached patch that allows manifest creation for wars as well as jars. Among other things, this allows easy creation of skinny wars from fat wars.

> MANIFEST.MF is not used when specified in configuration for a WAR format assembly
> ---------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-332
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-332
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-2
>            Reporter: Julien Simon
>            Priority: Minor
>         Attachments: MASSEMBLY-332-maven-assembly-plugin.patch, maven_project.zip
>
>
> When you try to specify a manifestFile for an assembly with *war* format,  the manifest file specified is not used.
> I have attached a zip archive which contains a maven project that reproduces the bug. The assembly generated during the package phase and named myArtifactId-1.0.0-source.war contains a manifest file, but not the one specified in the maven-assembly-plugin  configuration in the pom.
> I tried different versions 2.1 and 2.2-beta-2 with jar and war assembly formats, here's the behavior description:
> maven-assembly *2.1* + *war* assembly format              >>>>>>> good manifest file included
> maven-assembly *2.2-beta-2* +*war* assembly format  >>>>>>> empty manifest file
> maven-assembly *2.1* + *jar* assembly format                 >>>>>>> good manifest file included
> maven-assembly *2.2-beta-2* + *jar* assembly format    >>>>>>> good manifest file included
>  
> The workaround is to use version 2.1 of the maven-assembly-plugin.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira