• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Maven build including jar files on local drive

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I'm trying to include some jar files located in my C: drive into my build.

I've declared the dependencies on the jar files like this:

...
<dependency>
<groupId>blazeadvisor65</groupId>
<artifactId>license.jar</artifactId>
<version>LATEST</version>
<scope>system</scope>
<systemPath>${blazeadvisor65.home}/lib/license.jar</systemPath>
</dependency>
...

The problem is, the project builds successfully but doesn't include the jar file into the final .ear.

Should I take a copy of the local jar files and place them in the ...\.m2\repository?.... I've had a look in there and all of the jar files in there have a ".pom" file...would I have to create one of these too?

Btw, I'm new to Maven, and to this forum, feel free to give me any other advice...especially if I've repeated this post or anything.

Thanks heaps.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

says about sysstem scope:

his scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository.



So the artifact is expected to be available at runtime.

I am not sure, if "compile"-scoped libraries can be provided via systempath, but I recommend to install the license.jar to your local maven repository or to your company repository (if available).
 
Jenny Kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah... I think I might have to do that.

Reading an article on setting up a Maven repository now http://www.theserverside.com/tt/articles/article.tss?l=SettingUpMavenRepository

Thanks for your help!
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to build a redistributable ear, I think you should look at maven assembly plugin.
 
I don't even know how to spell CIA. But this tiny ad does:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic