[ 
http://jira.codehaus.org/browse/MJAR-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_116438
 ] 

Olivier Lamy commented on MJAR-71:
----------------------------------

Thanks for patch but I'm not sure adding a new parameter to set the default 
manifest file is needed.
Because the manifestFile configuration is in the the archive configuration part.
Something with readonly should be better like 
{code}
/**
 * Path to the default MANIFEST file to use will be use if 
useDefaultManifestFile is set to true
 *
 * @parameter expression="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
 * @required
 * @readonly
 */
 private File defaultManifestFile;
/**
 * Set to true to enable the use of the defaultManifestFile
 *
 * @parameter expression="${jar.useDefaultManifestFile}" default-value="false"
 */
private boolean useDefaultManifestFile;
{code}
And I have added a test to not override the manifestFile in the archive 
configuration if it exists.
Even if the user set useDefaultManifestFile to true.



> use manifest in classesdir/META-INF if exists
> ---------------------------------------------
>
>                 Key: MJAR-71
>                 URL: http://jira.codehaus.org/browse/MJAR-71
>             Project: Maven 2.x Jar Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Carlos Sanchez
>             Fix For: 2.2
>
>         Attachments: MJAR-71-disabled_by_default.diff, 
> MJAR-71-enabled_by_default.diff
>
>
> With 2.1 I need to add this to the pom to use the manifest that it's already 
> in the classes folder, make this the default
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-jar-plugin</artifactId>
>         <version>2.1</version>
>         <configuration>
>           <archive>
>             
> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
>           </archive>
>         </configuration>
>       </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

        

Reply via email to