Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Classpath jars not picked up in mavenised projects

 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am placing a jar on the classpath of my Mavenised Project, but it seems to be not picking the jar.

In case of mavenised projects, can't I place jars on classpath explicitly.

Regards,
Ashwin
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly what do you mean by "placing a jar on the classpath of my Mavenised Project"? With Maven, you don't place JARs anywhere; instead, you add dependencies within your pom.xml.
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Peter.

I work on Eclipse and I placed the jar in the build path. But I found out that I need to specify the jar as dependency in pom.xml.

But I have one question, what would be the group Id, artifact Id etc as I created this jar in my local system.

Regards,
Ashwin
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you create the JAR, that information (also known as the artifact's coordinates) is up to you. Did you create it using Maven? If so, you have already the coordinates. If you did not use Maven, it might be best if you did, then you can build the jar using "mvn install" and then reference it in your project. (If you insist on not converting it to Maven, you can still use "mvn install:install-file" to load the jar into the local repository; you would given the coordinates as part of that command)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic