1

Possible Duplicate:
Maven: add a dependency to a jar by relative path

I need import a .jar file using only a buildpath in a java maven project without creating a dependency. Can this be done?

Community
  • 1
  • 1
DavidH
  • 13
  • 4

1 Answers1

2

You mean that your jar is used only to compile but is not a transitive dependency?

<dependency>
  <groupId>foo</groupId>
  <artifactId>bar</artifactId>
  <version>1.0</version>
  <scope>provided</scope>
</dependency>

provided: This scope is only available on the compilation and test classpath, and is not transitive.

See more on dependency scopes

Luigi R. Viggiano
  • 8,103
  • 6
  • 46
  • 60