Just google org/apache/maven/execution/DefaultRuntimeInformation.java .
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.maven/maven-core/2.0.5/org/apache/maven/execution/DefaultRuntimeInformation.java?av=h
Cheers,
Guillaume
Le 11/01/2012 15:03, Steve Cohen a écrit :
A solution to
Thanks.
But according to this:
http://maven.apache.org/ref/3.0.4-SNAPSHOT/apidocs/org/apache/maven/execution/DefaultRuntimeInformation.html
the getApplicationVersion() method has been deprecated, with no
indication as to what I should use instead.
Also, it seems that this introduces a
It appears that this entire class and the interface it is based on are
deprecated, in favor of org.apache.maven.rtinfo.RuntimeInformation and
org.apache.maven.rtinfo.internal.DefaultRuntimeInformation.
But this non-deprecated version of the interface/impl REMOVE the
getApplicationVersion()
Hm, is this really heading into the direction you intended with your
question originally?
The api your are looking at is more for maven internal use (or for
dealing with maven world (poms, etc.).
If your application is into this direction you might find interesting
hints with maven plugin
On Wed, Jan 11, 2012 at 09:07:29AM -0600, Steve Cohen wrote:
It appears that this entire class and the interface it is based on are
deprecated, in favor of org.apache.maven.rtinfo.RuntimeInformation and
org.apache.maven.rtinfo.internal.DefaultRuntimeInformation.
But this non-deprecated
Agreed.
I filter-copy a properties file with the following:
project.name=${project.name}
project.version=${project.version}
build.date=${build.date}
...
Then I can load this file and have at it.
matt
On Jan 11, 2012, at 7:48 AM, Mark H. Wood wrote:
On Wed, Jan 11, 2012 at 09:07:29AM -0600,
to roll my own manifest reader, since I AM encoding the
version there, or perhaps read the maven.properties.
Original Message
Subject: Re: Howto access project version programmatically within
application
Date: Wed, 11 Jan 2012 16:41:49 +0100
From: Rainer Pruy rainer.p
: Howto access project version programmatically within
application
Date: Wed, 11 Jan 2012 16:41:49 +0100
From: Rainer Pruy rainer.p...@acrys.com
Reply-To: Maven Users List users@maven.apache.org
Organization: Acrys Consult GmbH Co. KG
To: users@maven.apache.org
Hm, is this really heading
On 01/11/2012 10:50 AM, Stephen Connolly wrote:
getClass().getClassLoader().getPackage().getImplementationVersion()
I really liked the simplicity of this idea. Alas,
ClassLoader.getPackage(String) is a protected method, so this won't help.
Accessible to me is:
));
System.out.println(Build: + atts.getValue(Implementation-Build));
-Original Message-
From: Steve Cohen [mailto:sco...@javactivity.org]
Sent: Wednesday, January 11, 2012 10:29 AM
To: users@maven.apache.org
Subject: Re: Howto access project version programmatically within
application
@maven.apache.org
Subject: Re: Howto access project version programmatically within
application
On 01/11/2012 10:50 AM, Stephen Connolly wrote:
getClass().getClassLoader().getPackage().getImplementationVersion()
I really liked the simplicity of this idea. Alas,
ClassLoader.getPackage(String
getResourceAsStream(META_INF/MANIFEST.MF) and
getResourceAsStream(/META_INF/MANIFEST.MF) without success even though
I've verified that the file exists in the jar,
Uhh that should be META-INF, right?
Wayne
-
To unsubscribe,
: Steve Cohen [mailto:sco...@javactivity.org]
Sent: Wednesday, January 11, 2012 10:29 AM
To: users@maven.apache.org
Subject: Re: Howto access project version programmatically within
application
On 01/11/2012 10:50 AM, Stephen Connolly wrote:
getClass().getClassLoader().getPackage
Subject: Re: Howto access project version programmatically within
application
Hmm, intriguing but not working in my case which is a jar, not a war
or
ear. This is standalone java app.
I've tried
getResourceAsStream(META_INF/MANIFEST.MF) and
getResourceAsStream(/META_INF/MANIFEST.MF) without
On 01/11/2012 12:14 PM, Wayne Fay wrote:
getResourceAsStream(META_INF/MANIFEST.MF) and
getResourceAsStream(/META_INF/MANIFEST.MF) without success even though
I've verified that the file exists in the jar,
Uhh that should be META-INF, right?
Wayne
Looks like there are other jar (or classes directories) in classpath.
getRessourceAsStream() will access the first entry (according to current
classloader logic)
and this need not be the one from the jar you are interested in.
You might use getRessources() to get all candidates enumerated.
-
From: Steve Cohen [mailto:sco...@javactivity.org]
Sent: Wednesday, January 11, 2012 10:29 AM
To: users@maven.apache.org
Subject: Re: Howto access project version programmatically within
application
On 01/11/2012 10:50 AM, Stephen Connolly wrote:
getClass().getClassLoader().getPackage
17 matches
Mail list logo