Re: Version API

2015-07-29 Thread Mike Kienenberger
Starting in 4.0.M3, you will be able to use object.getClass().getPackage().getImplementationVersion() to get the build version which will be stored in the jar's WEB-INF/MANIFEST.MF where object can be any class in the jar. I'm guessing something like ObjectContext.class will work in place of "obj

Re: Version API

2015-07-29 Thread Michael Gentry
Maybe we should add a Cayenne.getVersion() method? > On Jul 27, 2015, at 10:41 AM, Mike Kienenberger wrote: > > Our jar MANIFEST file also contains: > > Bundle-Version: 4.0.0.M2 > > But shouldn't we also be supplying this information as > > Implementation-Version: 4.0.0.M2 > > so it's in a

Re: Version API

2015-07-27 Thread Andrus Adamchik
> On Jul 27, 2015, at 5:41 PM, Mike Kienenberger wrote: > > Our jar MANIFEST file also contains: > > Bundle-Version: 4.0.0.M2 Yeah, that's OSGi stuff. > But shouldn't we also be supplying this information as > > Implementation-Version: 4.0.0.M2 Yeah, probably. > I'd guess that's a simple

Re: Version API

2015-07-27 Thread Mike Kienenberger
Our jar MANIFEST file also contains: Bundle-Version: 4.0.0.M2 But shouldn't we also be supplying this information as Implementation-Version: 4.0.0.M2 so it's in a standardized place? I'd guess that's a simple maven build change -- I know how to do it under ant, but not under maven. Once we d

Re: Version API

2015-07-27 Thread Joe Baldwin
The META-INF method is not as concise as the Project.CURRENT_PROJECT_VERSION method, but it appears to be more correct. You had a mistake in your code. Here is the corrected version. Properties props = new Properties(); String path = "META-INF/maven/org.apache.cayenne/cayenne

Re: Version API

2015-07-27 Thread Andrus Adamchik
> On Jul 27, 2015, at 4:21 PM, Joe Baldwin wrote: > > 1. My goal is to display the version of cayenne server jar I have added to > the project with Cayenne 4.0. As it happens, Project.CURRENT_PROJECT_VERSION (or its 4.0 alternative) is not the same as the version of cayenne server jar. It den

Re: Version API

2015-07-27 Thread Joe Baldwin
> No, it wasn't. You are not reading my reply. Perhaps, but if that is true, then it is possible you were not reading my question as well. 1. My goal is to display the version of cayenne server jar I have added to the project with Cayenne 4.0. 2. With Cayenne 3.0 this was *easily* accomplishe

Re: Version API

2015-07-27 Thread Andrus Adamchik
No, it wasn't. You are not reading my reply. > On Jul 27, 2015, at 3:25 PM, Joe Baldwin wrote: > > I am not using Maven. > > So it appears that the answer is that the version has been eliminated from > the runtime. > > Thanks anyway. > > > >> On Jul 27, 2015, at 8:13 AM, Andrus Adamchik

Re: Version API

2015-07-27 Thread Joe Baldwin
I am not using Maven. So it appears that the answer is that the version has been eliminated from the runtime. Thanks anyway. > On Jul 27, 2015, at 8:13 AM, Andrus Adamchik wrote: > > No, I was answering your question. I thought you'd be able to figure it out > from the information that I

Re: Version API

2015-07-27 Thread Andrus Adamchik
No, I was answering your question. I thought you'd be able to figure it out from the information that I shared already. But no worries, here are more details: 1. Download cayenne-project.jar from http://search.maven.org/#artifactdetails|org.apache.cayenne|cayenne-project|4.0.M2|jar and add it

Re: Version API

2015-07-27 Thread Joe Baldwin
Andrus, I am really not following what you are trying to say. Let ask again: 1. I am looking for an easy replacement to org.apache.cayenne.project.Project.CURRENT_PROJECT_VERSION since it *appears* to be eliminated from your 4.0 API. You then claim that there is a replacement in >>

Re: Version API

2015-07-27 Thread Andrus Adamchik
http://search.maven.org/#artifactdetails|org.apache.cayenne|cayenne-project|4.0.M2|jar This has sources, javadocs, etc. > On Jul 27, 2015, at 1:55 PM, Joe Baldwin wrote: > > I am looking for a simple replacement for version 3.0 API > >>> org.apache.cayenne.project.Project.CURRENT_PROJECT_

Re: Version API

2015-07-27 Thread Joe Baldwin
I am looking for a simple replacement for version 3.0 API >> org.apache.cayenne.project.Project.CURRENT_PROJECT_VERSION since it appears to be missing in 4.0. I could find no reference to any of the classes you mention in your 4.0 API. Do you have a url reference? > On Jul 27, 2015, a

Re: Version API

2015-07-27 Thread Andrus Adamchik
Not sure in what context you are using that, but "cayenne-project" DI module now has a service org.apache.cayenne.project.ProjectUpgrader that gives you access to UpgradeHandler that gives you access to UpgradeMetaData. UpgradeMetaData has the version supported by a given runtime. Andrus > On

Version API

2015-07-26 Thread Joe Baldwin
Migration 3.0 => 4.0 org.apache.cayenne.project.Project.CURRENT_PROJECT_VERSION appears to be no longer supported in 4.0. Is there a substitute (as easy to access)?