maven compile fails because i have a non-maven jar

Posted by pstanton on Stack Overflow See other posts from Stack Overflow or by pstanton
Published on 2010-05-14T01:34:35Z Indexed on 2010/05/14 1:44 UTC
Read the original article Hit count: 309

Filed under:

i have a couple of internal libraries which i haven't/don't know how to add to my local maven repository. i've added them to the project's classpath but my maven-compile failes stating that it can't find the classes in the external jars (as expected):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project proj: Compilation failure: Compilation failure: 
dir\src\main\java\package\MyClass.java:[8,25] package blah does not exist

dir\src\main\java\package\MyClass.java:[9,25] package blah does not exist

dir\src\main\java\package\MyClass.java:[21,12] cannot find symbol
symbol  : variable Blah
location: class package.MyClass

dir\src\main\java\package\MyClass.java:[28,9] cannot find symbol
symbol  : variable Blah
location: class package.MyClass

how do i tell maven about a jar i've sneakily added to my project's classpath so it can use it to compile?

© Stack Overflow or respective owner

Related posts about maven