cancel
Showing results for 
Search instead for 
Did you mean: 

Dependencies, repos and packages in pom file

Dependencies, repos and packages in pom file

Chandrasekaran_
Extreme Employee
My understanding is that in the pom.xml file, I can specify

1) the necessary packages my bundle refers to in
2) the repo to download the JARs under repository> and
3) the dependencies within

While I know the packages needed for my bundle, my build fails due to issues with downloading from remote repos (I use the ODL release repo in https://wiki.opendaylight.org/view/Infrastructure:Nexus) most of the time.

My questions are:

1. What remote repository is it advisable to use? Or is it needed at all as I find the JARs I need in the plugin directory of opendaylight in our kit?

2. How could I find out what version of sal to use when specifying the dependency in



org.opendaylight.controller
sal
0.7.0



3 REPLIES 3

Chandrasekaran_
Extreme Employee
Thanks Rob. Could you tell me if you use just a single pom.xml file for your entire project? I want to know where I should place the parent pom info and I have a single pom file for my entire project. Your answer suggests you have a parent pom file and some module-related pom files that refer to the parent.

I thought specifying the parent pom info within my pom file would work (see below) but it does not. Here is my pom file:


org.opendaylight.controller
commons.opendaylight
1.4.2-Helium

4.0.0
org.odl.myapp
sampleapp
0.1


....build config info goes here......




I get an error with this file that says "...1.4.2-Helium in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 2, column 10"

Never mind! I got it working by writing up my pom file in a different way. My parent info in the file above is wrong.

Rob_Gries
New Contributor
1. Our project uses the Nexus opendaylight.release repository as well. We haven't had any issues with it yet.

2. We use a parent pom.xml that manages all dependencies in the repository because it removes the need to specify version numbers for the dependencies.

The parent can be specified as follows (version number can be replaced with other valid versions):

org.opendaylight.controller
commons.opendaylight
1.4.2-Helium


Once you have included the parent pom.xml, you can include dependencies as follows:


org.opendaylight.controller
sal


Note: you can find alternate commons.opendaylight versions in the following link

https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/controller...

Best Regards,
Rob
GTM-P2G8KFN