gregturn
gregturn

Reputation: 2693

How do I pull in rt.jar through maven?

I'm trying to build a Java 5 system using Java 6. I have configured and with 1.5, but I also need to set to point at a Java 5 rt.jar to ensure there are no faulty linkages like using Java 6 APIs. Has anyone ever configured maven to somehow pull rt.jar from a repository and reference it this way?

Upvotes: 1

Views: 3048

Answers (2)

Robert Munteanu
Robert Munteanu

Reputation: 68268

You can verify your usage of external libraries - and implicitly of the Java core APIs - by using the Animal Sniffer Maven Plugin

The Animal Sniffer Plugin is used to build signatures of APIs and to check your classes against previously generated signatures.

The plugin website shows how to generate signatures for the Java runtime and how to check against generated signatures.

Upvotes: 1

Pace
Pace

Reputation: 43817

You can send the source and target options down to javac by configuring the default maven java compiler plugin. Take a look at this page for an example.

Upvotes: 0

Related Questions