File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SONAR-Open Source Tool-Need Help

 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

>>Can anyone tell me how to analyze a project using sonar.

>>I read the documentation,but its not that clear.

>>I have some doubts in adding a Maven project to sonar.

>>Thanks in advance.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Siva,

What have you tried so far? Are you getting a particular error message?
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

>>i actually want to analyze a simple java project using SONAR.
>>These are the things which i ve done so far,
--Using Windows---

1.Installed the SONAR-1.9.2
2.Installed the Apache-MAVEN-2.2.0
3.Then i tried to run a simple command to check the installation.but it gave me an error

[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
eved from repository: central due to an error: Network is unreachable: connect
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exi
st or no valid version could be found

>>I thinh its because of my company's firewall. but i don't know how to get rid of this.
>>do i need to change any settings,if so where and what.
>>once am done with this , may be i can move forward to the next step.
>>Thanks in advance..
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, you need to define the proxy bypass in your settings.xml file for Maven, see here for details.
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>You mean the settings.xml file inside the folder maven-->configuration, rite?

>>ok i ll check with the settings and ll let you know.

 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martijn,

>>I gave my company's proxy which is used to access internet & my username details.

>>Am getting an authenticatiion failed error.

>>Which username,password & proxy should be given.?
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to ask your network people that.
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martijn,

<<if my company doesn't allow to download the jars,is there any option of working offline?

<<or is it must everytime when it builds, it needs internet?
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to have access to the internet yes, you can work offline but only after you've initially seeded a repository manager such as Nexus.
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martijn,
>>I really appreciate your patience...

>>My company policy will not allow me to download everytime Maven builds a project.

>> Can i do something like downloading one time,store it in my machine and use it.

>>If so then what is the next thing to be done.

>>What all should i download to my machine,from where(Site) & where to store it in my machine.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately there is very little you can do, you'll have to persuade your company to allow Maven traffic through.
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>Ok. can i manually download ?

>>If so what should i download,from which site and where should i store it in my machine.

>>If you could provide me these details ,i can then ask my network team the permission.

>>Bercause now they are saying that they can provide me access to specific site,but can not open the port.

>>So i have to clearly tel them, the site to which i need access
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

You need access to a variety of repos, but begin with:

http://repo1.maven.org/maven2/

This is all normal Http traffic over port 80 BTW so a username and password through a proxy should work (what sort of proxy server scheme are they running? NTLM?)

Cheers,
Martijn
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martijn,

>>What am i supposed to do in that site mentioned by you.
>>I could see -- Index of /maven2/ , under that there are so many files.
>>Also am not sure of the proxy server scheme,how to find it?
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As long as Maven can access that URL I mentioned it will automaticallly navigate the directory structure to download what it needs. You will need to ask your network guys what proxy scheme they work under. If it is NTLM for example then you can use Nexus as a repository manager to get past that proxy server, makes life alot easier.
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>could you send me an example proxy settings in settings .xml.
>>so that i can make sure that i tried it rite
>>I dont want the one which is given in the documentation,something else with practical values in the fields of username,host,port etc..
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the username and password should be the same as the username and password you use for your web browsing, the port number should be the std http port (80) and the proxy server is whatever IP address/DNS name of your company's proxy server. Your network guys should be able to help you fill these values out.
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martijn,

>>How to configure SONAR-Light?

>>So that i can bypass MAVEN
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure sorry, I've never used Sonar, have you tried their forum/mailing list?
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>Yes Martijn, am trying that option too..

>>I will let you know if i get a positive result.

>>Thanks for your extended support.

>>Also am planning to try this outside my company's network so that i will not be behind the firewall

>>At that time i might need your support.
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

>>I have added some custom PMD rules in sonar.
>>I made some rules as optional by setting the priority 3,4,5.
>>Am unable to include these optional rules for analyzing a project,though i select the optional rules checkbox.Only the mandatory violations are showing up.
>>How to include them.
 
siva manoharan
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martijn,

>>Sonar is up and running offline now.
>>How to perform the junit test for my code. am not using maven(i.e my project is not mavenised),since am working in sonar light mode
>>could you tell me the steps
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic