Yes, you're right. But the problem is that our jar is not the only one on the classpath. That means that it is hard to ensure that we're loading the right manifest file to read the version. (btw. we're placing version information already inside this jar.) Loading resources even inside files causes us some trouble as we've got to support applets in very restrictive environments and different VMs (including Microsoft). That means that using a class is the most simple and stable way to gain version information of our product.

Francois


Kalle Korhonen schrieb:
Or, just generate and use a manifest file in META-INF. The manifest is meant to be used exactly for that purpose (to hold the version etc. information).

Kalle


On 7/22/07, Dirk Olmes <[EMAIL PROTECTED]> wrote:

Francois Fernandes wrote:
> Hi list,
>
> for some time now I've been looking for a easy way to generate a simple > class containing version information of our artifact. I know that it is > possible to filter resources. But to avoid any resource loading issues I
> would like maven to generate such a class.
> Does anyone have a idea how to solve this? I'm sure that using resource > filtering of a specific class template and then attaching the generated
> source(-folder) using the build-helper-maven-plugin, but is this a
> elegant way?

Maven packages a pom.porperties inside a jar's META-INF directory. I'd
use that instead of generating a class.

-dirk

--
A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to