On 09/10/2011, at 11:25 AM, Eric Kolotyluk wrote:

> I've been using Maven for about 6 months now so I am still a big green.
> 
> Recently I discovered that my project needs to be compatible with client code 
> that requires Java 5, because it needs to run on OS 10.5 32-bit Intel. 
> Unfortunately I have been doing all my development with Java 6. I am almost 
> complete reworking things to run on a Java 5 run-time, and while everything 
> compiles, things are dying in hibernate somewhere because there are Java 6 
> class files in some of the artifacts. Unfortunately from the diaganosics I 
> cannot tell which artifact I am importing that has the Java 6 class files.

It should give you the name of the class itself, which you can search for in 
your repository manager or on one of the public instances of repository search 
to find out which JAR it is coming from.

You might also try the animal sniffer plugin: 
http://mojo.codehaus.org/animal-sniffer-maven-plugin/examples/generating-other-api-signatures.html

> 
> Is there some common wisdom or best practices on how to determine which Java 
> versions were used to build an artifact. I know you can specify a java 
> version in the classifier, but is there a way to search for specific 
> coordinates based on the classifier, or some way to tell Maven to only use 
> artifacts with a specific version of Java class files?

Maven can't do dependency resolution based on this, because there is no global 
flag for a JAR that's applicable (each class in it can be different).

- Brett

--
Brett Porter
br...@apache.org
http://brettporter.wordpress.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to