[
http://jira.codehaus.org/browse/MECLIPSE-423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Barrie Treloar updated MECLIPSE-423:
------------------------------------
Assignee: Barrie Treloar
Fix Version/s: 2.6
EclipseManifestWriter and RadManifestWriter are a cut-and-paste. Created
AbstractEclipseManifestWriter as shared parent class
and moved all the common stuff up. Where the code varied
EclipseManifestWriter's implementation was chosen. This was because the
variation was often a bug fix.
The only variation that could not be easily sorted was in
addDependencyToClassPath where they only differ at the end:
EclipseManifestWriter:
classpath.append( dependency.getEclipseProjectName() + ".jar" );
RadManifestWriter
classpath.append( dependency.getArtifactId() + ".jar" );
I have taken the eclipse one as being correct and changed RadPlugin to override
getProjectNameForArifact() to return artifact.getArtifactId() to match
RadManifestWriter dependency.getArtifactId() as above. Integration tests still
work but I need a RAD person to validate this for me.
Added testProject8 for IT test. Prior to patch this exercised the defect.
After the patch it looks like it is fixed.
However have asked for clarifiction about write() when a new MANIFEST.MF needs
to be written but there is already an existing file.
See
http://www.nabble.com/m-eclipse-p%3A-EclipseManifestWriter.write%28%29---doesn%27t-retain-any-keys-except-CLASS_PATH-and-MANIFEST_VERSION-td19546126.html
The problem is that the old values will be lost. Need to check if that is the
correct intention.
Michael, can you please try this in your RAD environment. I can't guarantee
that the refactoring done works as the ITs are sparse in this area.
> NullPointerException when existing Manifest.MF file has no Class-Path element
> -----------------------------------------------------------------------------
>
> Key: MECLIPSE-423
> URL: http://jira.codehaus.org/browse/MECLIPSE-423
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Affects Versions: 2.5
> Reporter: Michael Johns
> Assignee: Barrie Treloar
> Priority: Minor
> Fix For: 2.6
>
> Attachments: pom.xml
>
>
> A NullPointerException arises when running the rad goal against a project
> containing a manifest that has no Class-Path element. The exception is
> caught and the only error on the screen is "No
> <project-path>\META-INF\MANIFEST.MF file found". The problem is in the
> RadManifestWriter.orderClasspath() method. It needs to check newValue for
> null before trying to split it up.
> Here's the manifest I had that caused the problem:
> {code}
> Manifest-Version: 1.0
> Build-Jdk: 1.4.2
> Built-By: Michael Johns
> Created-By: Apache Maven
> {code}
> Notice that it has no Class-Path element.
--
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