{"action":"created","issue":{"url":"https://api.github.com/repos/SonarQubeCommunity/sonar-findbugs/issues/51","repository_url":"https://api.github.com/repos/SonarQubeCommunity/sonar-findbugs","labels_url":"https://api.github.com/repos/SonarQubeCommunity/sonar-findbugs/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/SonarQubeCommunity/sonar-findbugs/issues/51/comments","events_url":"https://api.github.com/repos/SonarQubeCommunity/sonar-findbugs/issues/51/events","html_url":"https://github.com/SonarQubeCommunity/sonar-findbugs/issues/51","id":174363202,"number":51,"title":"Cannot match classes to source files when not using default project layout","user":{"login":"CoreyTeffetalor","id":1151378,"avatar_url":"https://avatars.githubusercontent.com/u/1151378?v=3","gravatar_id":"","url":"https://api.github.com/users/CoreyTeffetalor","html_url":"https://github.com/CoreyTeffetalor","followers_url":"https://api.github.com/users/CoreyTeffetalor/followers","following_url":"https://api.github.com/users/CoreyTeffetalor/following{/other_user}","gists_url":"https://api.github.com/users/CoreyTeffetalor/gists{/gist_id}","starred_url":"https://api.github.com/users/CoreyTeffetalor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoreyTeffetalor/subscriptions","organizations_url":"https://api.github.com/users/CoreyTeffetalor/orgs","repos_url":"https://api.github.com/users/CoreyTeffetalor/repos","events_url":"https://api.github.com/users/CoreyTeffetalor/events{/privacy}","received_events_url":"https://api.github.com/users/CoreyTeffetalor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SonarQubeCommunity/sonar-findbugs/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-31T19:54:17Z","updated_at":"2016-09-21T23:57:41Z","closed_at":null,"body":"Setting up the FindBugs plugin with a gradle-based SonarQube runner I got many of these messages and FindBugs issues were not reported on the server:\r\n\r\n```\r\nThe class '...' could not be match to its original source file. It might be a dynamically generated class.\r\n```\r\n\r\nThis appears to be because ByteCodeResourceLocator.java hard codes the project layout to only search `\"src/main/java\",\"src/main/webapp\",\"src/main/resources\",\"src\"`\r\n\r\nMy project, before I temporarily reconfigured it used `src/java`, changing the layout to `src/main/java` resolved the issue.\r\n\r\nIt seems like the `sonar.sources` property could possibly be used (or added) to this list instead of hard coding the paths?\r\n\r\nAlso, a minor typo \"match\" -> \"matched\" in the error message."},"comment":{"url":"https://api.github.com/repos/SonarQubeCommunity/sonar-findbugs/issues/comments/248777149","html_url":"https://github.com/SonarQubeCommunity/sonar-findbugs/issues/51#issuecomment-248777149","issue_url":"https://api.github.com/repos/SonarQubeCommunity/sonar-findbugs/issues/51","id":248777149,"user":{"login":"user82461","id":16387913,"avatar_url":"https://avatars.githubusercontent.com/u/16387913?v=3","gravatar_id":"","url":"https://api.github.com/users/user82461","html_url":"https://github.com/user82461","followers_url":"https://api.github.com/users/user82461/followers","following_url":"https://api.github.com/users/user82461/following{/other_user}","gists_url":"https://api.github.com/users/user82461/gists{/gist_id}","starred_url":"https://api.github.com/users/user82461/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/user82461/subscriptions","organizations_url":"https://api.github.com/users/user82461/orgs","repos_url":"https://api.github.com/users/user82461/repos","events_url":"https://api.github.com/users/user82461/events{/privacy}","received_events_url":"https://api.github.com/users/user82461/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T23:57:41Z","updated_at":"2016-09-21T23:57:41Z","body":"I posted at the end of https://github.com/SonarQubeCommunity/sonar-findbugs/issues/47 with my issue, but it more closely matches @CoreyTeffetalor so i'll repost here:\r\n\r\n> I ran into the same issue. Our project is not multi-module but sources are in \"/src/java\", not \"/src/main/java\". It works if we make a symlink for that path, but that breaks the SCM functionality since the paths no longer match.\r\n> Could you add \"/src/java\" to the array or use the sonar.sources value from the properties file?\r\n\r\nNot sure what all of the possibilities of configuration are, so @CoreyTeffetalor's suggestion of adding the sonar.sources config property sounds the best. My setup is using plain old sonar-runner so my properties file is 'sonar-project.properties' located at the root of the project being analyzed."}}
{"actor":{"display_login":"user82461"}}