- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Re: Help with maven/osgi build issue!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2014 06:27 PM
11-13-2014 06:27 PM
Help with maven/osgi build issue!
Hi everyone,
Not being too familiar with maven, and even less so with how to package stuff properly for osgi bundles i've been hitting a dead-end trying to include another third-party jar dependency in my project. I have followed the standard project template for the 2.3.5 controller and have the various maven projects setup correctly (api, app, bl, model, root, rs, ui). Now, the problem is that I have included another external dependency in my bl project. The project compiles and even builds fine. In the "app" pom.xml I have even included the third-party maven jar to be copied from my local maven repository to the bundle. However, whenever I try to deploy to the SDN Controller I receive the following error message:
"Error uploading application archive;cause: No matching artifact for ...."
I think the problem now lies in that I need to tell osgi about this jar. I know that I need to include this information somehow in the maven build plugin named 'maven-bundle-plugin' of the pom.xml in root project. Can any gurus with osgi bundling help me out? Thanks!
-David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2014 06:54 AM
11-17-2014 06:54 AM
Re: Help with maven/osgi build issue!
David,
At the moment I am researching your issue with our engineering department. Once I get an answer from our team I will contact you.
Best Regards,
Carlos
CSC CoE SDN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2014 09:05 AM
11-19-2014 09:05 AM
Re: Help with maven/osgi build issue!
David,
Have you tried building a simple skeleton app to see if it loads?
[Putting detail in here for any/all to see]
./bin/gen-sdn-app --template skeleton --directory ~/sdn-hm/ --app hm --company mango --subject DeviceHealth --app-name "Device Health Monitor" --company-name "Mango Networks" --description "Application for controlling a network of devices." --rest-path health
cd ~/sdn-hm/hm-root
mvn clean install
cd ..
load the file:
./hm-app/target/hm-1.0.0-SNAPSHOT.zip
into the controller and see if it loads/deploys.
Also: have you tried building/loading without the additional external dependency?
Just trying to isolate the problem.
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2014 10:27 AM
11-19-2014 10:27 AM
Re: Help with maven/osgi build issue!
Hi Scott,
I have no problems building my app (based on the template maven apps) without the external dependency, I can even compile everything in Eclipse without any problems and the maven build runs without errors. The problem comes when I need to include the third-party dependency and deploy to the Virgo server, then it launches the previous error. I need to figure out how to tell that maven-bundle-plugin to include the third-party dependency (which is already mavenized btw) in the osgi bundle descriptors/system. Thanks for any help!
-David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2014 10:18 AM
11-24-2014 10:18 AM
Re: Help with maven/osgi build issue!
Hi Carlos,
Any luck with this? Thanks!
-David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2014 11:58 AM
11-24-2014 11:58 AM
Re: Help with maven/osgi build issue!
David,
Scott is already working on this forum. He will address any questions you have in regards to maven/osgi.
Best Regards,
Carlos
CoE SDN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2014 06:39 PM
12-04-2014 06:39 PM
Re: Help with maven/osgi build issue!
To anybody else that was having the same issue, the solution I found is the following:
1.) Include any third-party jars as maven dependencies in each sub-project as needed (normal Maven procedure).
2.) In the pom.xml in the XXXXXX-root project, add the following line as shown below into the maven-bundle-plugin plugin section
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.6</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
----ADD THIS LINE BELOW ----
<Embed-Dependency>YOUR_MAVEN_ARTIFICAT_NAMES_SEPERATED_BY_COMMAS</Embed-Dependency>
--------------------------------
</instructions>
</configuration>
</plugin>
The third party maven dependencies will then be automatically included and you can deploy the project now. Good luck!
-David