You can load the pom properties off the class path so every maven built
artifact in your class path has version information.
Don't copy and paste this but it gives you the idea...
InputStream in
getClass().getResourceAsStream("META-INF/maven/path/to/pom.properties");
Properties p = new Properti
Though it is not exactly a best practice it is possible to filter the
source "in place" using just a configuration similar to
that posted (referencing src/main/java) - this would not require the
buildhelper plugin.
Andy
On 20 Aug 2007, at 12:09, Tim Kettler wrote:
Create a new directory
Create a new directory (for example 'src/main/classtemplates') and put
you class template under the correct package directory in there.
Then declare a additional resource in your pom:
[...]
src/main/classtemplates
true
target/generated-sources
[...]
and us
---
>> 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]
>
&
You could configure the filtering to filter your java code as well as
standard resources, though I don't know if that is what you want.
Andy
On 22 Jul 2007, at 22:56, Francois Fernandes wrote:
Hi list,
for some time now I've been looking for a easy way to generate a
simple class containin
Java JDK has simple way to do this. If You know some class located in
your jar file simple way to get implementation version from this jar's
manifest file is to call this known
<>.getPackage().*getImplementationVersion*().
rgds,
Markku
Francois Fernandes wrote:
Yes, you're right. But the pro
Hi Francois,
Francois Fernandes wrote:
> 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
I've used JRelease in the past under ant to do this sort of thing - it
generates a class with your version info (can't seem to find a website for
it now thou..)
On 7/23/07, Dirk Olmes <[EMAIL PROTECTED]> wrote:
Another idea would be to use the maven-exec-plugin as part of the build
process to
Francois Fernandes wrote:
> 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
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 caus
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 e
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
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 h
13 matches
Mail list logo