|
This post was updated on .
Hello all,
Probably this is an absolute simple question to answer, for me it is still a challenge how to do things; Recently I encountered a problem with the stylecop runner functionality using Stylecop4.7, having to do with dll naming etc. (see also: http://jira.codehaus.org/browse/SONARPLUGINS-1405) I decided to change to code a bit so that when I assign StyleCop 4.7 it will work (or at least writes the right dll name using the MSBuildFileGenerator on runtime) What I did: - Installed Eclipse - Installed Maven 2.21 - Installed SVN plugins for Eclipse Checked out project: http://svn.codehaus.org/sonar-plugins/trunk/dotnet/tools/stylecop-runner and also: http://svn.codehaus.org/sonar-plugins/trunk/dotnet/tools/dotnet-tools-commons I have changed the code in the aforementioned MSBuildFileGenerator and now I want to compile. (and distribute the new jar for testing on my Sonar instance) How do I do this? mvn doesn't want to work when I select the stylecop-runner pom and exits with a [Could not find artifact org.codehaus.sonar-plugins.dotnet.tools:parent:pom:1.4-SNAPSHOT] stacktrace. My knowledge about (plugin) development and or maven is not to big as you can see and Google didn't give me the answers I was looking for. Perhaps someone can help me in the right direction? What are the steps I have to take? Thanks in advance for any answer. Best regards, Ed |
|
Hi Ed, to solve your problem, you have to checkout the full source code of the C# ecosystem (http://svn.codehaus.org/sonar-plugins/trunk/dotnet/) and run "mvn install" from the root folder. This will work.
Best regards,
On Tue, Jun 19, 2012 at 10:45 AM, 00se <[hidden email]> wrote: Hello all, |
|
Hi Fabrice,
Thanks! That worked (partially) The last step fails and in this case it doesn't matter, since I just needed one .class file generated to overwrite in the lib/stylecop-runner.jar This goes wroing to be complete: Failed to execute goal on project sonar-csharp-rules-plugin: Could not resolve dependencies for project org.codehaus.sonar-plugins.dotnet.csharp:sonar-csharp-rules-plugin:sonar-plugin:1.4-SNAPSHOT: Failure to find com.sonarsource.csharp:sonar-csharp-squid-plugin:jar:1.1.1 in http://repo1.maven.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 -> [Help 1] .. probably easy to solve and not now.. The output I get now when running analysis using Stylecop v4.7: 13:01:13.578 DEBUG MsBuildFileGenerator - version found: v4.7 13:01:13.578 DEBUG MsBuildFileGenerator - Using StyleCop.dll for analysis. I just made a really simple parser which looks for a 'v' and from that point on adds the remaning numbers and '.' to a StringBuilder. Next a really simple (ugly) match occurs if it matches v4.7|4.6 or v4.6.. It's not the most elegant solution and yet for me it works; at least the generated stylecop-msbuild.xml gets propagated with 'StyleCop.dll' when it matches the found version. And then the analysis still fails.. So I think best thing is to wait untill v4.7 gets embedded. BR Ed |
| Powered by Nabble | Edit this page |
