• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

questions about maven2 dependency

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I am trying to build an sar project...and I have a dependency on a jar that i created...I have added it in the dependency section...but it doesnt seem to take it from there...also..to make sure I added the dependency (the jar) manually into my local repository...any suggestions?...

here is the snippet of my pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>xyz.webportal</groupId>
<artifactId>PortalSar</artifactId>
<name>WebPortal Sar</name>
<packaging>sar</packaging>
<description>WebPortal Sar</description>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>xyz.webportal</groupId>
<artifactId>PortalEJB</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>net.sf.maven-sar</groupId>
<artifactId>maven-sar-plugin</artifactId>
<version>1.0</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
</plugins>
<!-- <resources>
<resource>
<directory>src</directory>
</resource>
</resources> -->
</build>
</project>

PortalEJB-1.0-SNAPSHOT.jar is the jar file which is the dependency...should I modify my pom?

Thanks
Preetham
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What error do you get when it doesn't find the JAR?

What's the path in the repository to PortalEJB-1.0-SNAPSHOT.jar? It should be something like :

.m2/xyz/webportal/PortalEJB/1.0-SNAPSHOT/PortalEJB-1.0-SNAPSHOT-<timestamp>.jar

there should also be a POM in the same directory for PortalEJB.
 
Preetham Chandrasekhar
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nathan,

Sorry for the late reply...figured it out...I just wasnt doing it right...I was jus doing a mvn compile and not a mvn install...so yea...the files were missing in the local repository..

Thanks again

Preetham
 
reply
    Bookmark Topic Watch Topic
  • New Topic