Thanks for the info Brett. The rest of my response is not directed at
you, I just need to vent after trying to understand animal-sniffer.
The documentation for the animal-sniffer-maven-plugin is terrible - in
particular the examples are abysmal. How are people supposed to learn
how to use it - especially for the first time. Just my impression, but
whoever(s) designed and documented this plug-in did not seem to have
enough pride in their work to motivate others to want to make use of it.
In general, why do too many maven documentation authors find it
necessary to taunt the reader with examples that sort of explain things,
instead of actually explaining things, then forcing the reader to do all
kinds of extra research to figure out what the author expects us to just
know by ESP or something. Why does too little plugin documentation offer
any principles of operation, forcing people to rely on the tribal
knowledge in the mail-lists?
The wiki was a slight help, and asks some important questions about the
poor quality of the documentation, but the wiki is also incomplete with
information.
To be specific in
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>____</groupId>
<artifactId>____</artifactId>
<version>____</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>___id of execution___</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Would it be too hard to just give specific examples of the execution-id
someone might use, such as a best naming practice? Or in
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.7</version>
...
<configuration>
...
<signature>
<groupId>___group id of signature___</groupId>
<artifactId>___artifact id of signature___</artifactId>
<version>___version of signature___</version>
</signature>
...
</configuration>
...
</plugin>
...
</plugins>
...
</build>
...
</project>
Would it be too hard to just give some specific examples (as the wiki
does)? In particular, the wiki does explain how to find the group-id of
signatures.
Finally, how am I supposed to figure out if there are any signatures for
the hibernate APIs?
- Eric
On 2011-10-08 10:52 PM, Brett Porter wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org