Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sonar - Native Plugin

 
Suhas Saheer
Greenhorn
Posts: 17
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have successfully integrate a Java Project with the Sonar Server and was able to view the dashboard.
Now I am trying to integrate C/C++ projects with Sonar.
I read from the net about "native plugin (nar plugin)" and we need to create a nar file
(hence i mentioned <packaging>nar</packaging> in my pom.xml)

But when I try to run 'mvn clean install', it shows BUILD FAILURE with the message
“ Cannot find life cycle mapping for packaging: 'nar'. “

It would be great help if somebody can throw some light into this issue.

Thanks in advance,
Suhas
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maven uses the packaging type to determine how to go about building the artifact. The error means that Maven does not know how to build a "nar" artifact.

What plugin are you using to build the "nar" artifact? Did you remember to add the <extensions> argument to that plugin?

If this doesn't help, please post the pom.xml.
 
Suhas Saheer
Greenhorn
Posts: 17
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I used freehep nar plugin and later i tried with codehaus mojo nar plugin as well.
Both couldn't build.

I did use <extension>true</extension>

Please see below the pom.xml for the freehep plugin


 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wait a minute, the pom.xml you posted has this packaging type:



Are you sure your posted the correct pom.xml? I expect that your pom.xml would have had this instead:



Also, take the plugins out of the <pluginManagement> section. I think that section is only for submodules, and your pom.xml doesn't have any submodules nor is it configured as a parent POM.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic