Ok, I figured out what is going on.
If we want our manifest.mf file in our jar to show the implementation
version, then we need to:
1. Add a manifest.mf file in the META-INF directory that has the
implementation-version in it.
2. Add this configuration element to the pom.xml file:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
* <configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>*
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
We are missing both of these.
Does anyone object to my adding this to get our version in the
manifest.mf that's in the jar?
Should I do this for the api jar as well?
What should the version string be? This string will be in the generated
css file, at least for now. I plan to raise
another issue regarding the version string in the filename, but that can
wait.
Thanks,
- Jeanne
Jeanne Waldman wrote:
I know how this could work (is supposed to work?), because we are
doing something similar in our internal project . We have a
MANIFEST.MF file in the impl's META-INF directory that defines
implementation-version, and I think mvn automatically appends this
information into the impl jar's MANIFEST.MF file.
In Trinidad, though, I don't see this MANIFEST.MF file in the impl's
META-INF directory. If I add it myself, do mvn clean install, it still
doesn't work. But then after looking into it for our internal project,
I found that it stopped working recently there, too.
Anyway, Bud and I are looking into it, and I'll keep you posted. If
you know something that I am missing, let me know. :)
Thanks,
Jeanne
Jeanne Waldman wrote:
Hi Adam,
That's what I figured based, but I don't see the implementation
version in the manifest.mf.
So I should have asked, how does it get in the manifest.mf file?
Maybe I'm not building the jars with the correct flag.
I'm using "mvn install jdev:jdev".
- Jeanne
Adam Winer wrote:
The implementation version is defined in the manifest;
since we're going from the StyleSheetDocumentParser's
Package object, that should be the trinidad-impl.jar's
MANIFEST.MF file.
-- Adam
On 1/19/07, Jeanne Waldman <[EMAIL PROTECTED]> wrote:
Hi,
I see that when I run a demo jspx file, the generated css file has
"unknown-version" in the name.
The reason, I believe, is that the
'implPkg.getImplementationVersion()'
in the below code is returning null.
Why is this? Where are we setting (or supposed to be setting) the
implementation version exactly?
Does anyone else see this problem?
I think this code was added in this JIRA issue:
http://issues.apache.org/jira/browse/ADFFACES-147.
Thanks,
Jeanne
// If the document version is ${trinidad-version}, replace it
// with the version number right out of our manifest
if ("${trinidad-version}".equals(_documentVersion))
{
Class<StyleSheetDocumentParser> implClass =
StyleSheetDocumentParser.class;
Package implPkg = implClass.getPackage();
if ((implPkg != null) && (implPkg.getImplementationVersion()
!= null))
{
_documentVersion =
implPkg.getImplementationVersion().replace('.','_');
}
else
{
_documentVersion = "unknown-version";
}
}