{"action":"created","issue":{"url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/13","repository_url":"https://api.github.com/repos/mojohaus/license-maven-plugin","labels_url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/13/comments","events_url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/13/events","html_url":"https://github.com/mojohaus/license-maven-plugin/issues/13","id":107778358,"number":13,"title":"ID mismatch when using SNAPSHOT versions","user":{"login":"philandrews-ixxus","id":13121937,"avatar_url":"https://avatars.githubusercontent.com/u/13121937?v=3","gravatar_id":"","url":"https://api.github.com/users/philandrews-ixxus","html_url":"https://github.com/philandrews-ixxus","followers_url":"https://api.github.com/users/philandrews-ixxus/followers","following_url":"https://api.github.com/users/philandrews-ixxus/following{/other_user}","gists_url":"https://api.github.com/users/philandrews-ixxus/gists{/gist_id}","starred_url":"https://api.github.com/users/philandrews-ixxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philandrews-ixxus/subscriptions","organizations_url":"https://api.github.com/users/philandrews-ixxus/orgs","repos_url":"https://api.github.com/users/philandrews-ixxus/repos","events_url":"https://api.github.com/users/philandrews-ixxus/events{/privacy}","received_events_url":"https://api.github.com/users/philandrews-ixxus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-22T18:54:58Z","updated_at":"2016-02-04T18:39:02Z","closed_at":null,"body":"There is a problem when using SNAPSHOT dependencies which resolve to specific artifacts using maven-metadata.xml:\r\n```xml\r\n<snapshotVersion>\r\n<extension>jar</extension>\r\n<value>3.0.2-20150918.080710-5</value>\r\n<updated>20150918080710</updated>\r\n</snapshotVersion>\r\n```\r\n which results in the dependency not being recognized when present in the missing file and removed, but then since no license is present in the POM the same dependency is added back to the missing file using the original ID which doesn't work.\r\n\r\nThe problem seems to be tied to an ID mismatch between the artifactCache map and the unsafeMappings map in loadUnsafeMapping in DefaultThirdPartyTool.\r\n\r\nIt looks like the resolved version comes in during loadProjectDependencies, but when the MavenProject is built by buildFromRepository, that object is created with the SNAPSHOT version but added to the cache with the resolved version.  So when it tries to map between the MavenProject in the unsafeDependencies set and the artifactCache, the lookup fails and the mapping is removed.  But then since the dependency remains in the unsafeDependencies set the mapping gets recreated using the ID that will never map."},"comment":{"url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/comments/179992035","html_url":"https://github.com/mojohaus/license-maven-plugin/issues/13#issuecomment-179992035","issue_url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/13","id":179992035,"user":{"login":"kluckow","id":10063698,"avatar_url":"https://avatars.githubusercontent.com/u/10063698?v=3","gravatar_id":"","url":"https://api.github.com/users/kluckow","html_url":"https://github.com/kluckow","followers_url":"https://api.github.com/users/kluckow/followers","following_url":"https://api.github.com/users/kluckow/following{/other_user}","gists_url":"https://api.github.com/users/kluckow/gists{/gist_id}","starred_url":"https://api.github.com/users/kluckow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kluckow/subscriptions","organizations_url":"https://api.github.com/users/kluckow/orgs","repos_url":"https://api.github.com/users/kluckow/repos","events_url":"https://api.github.com/users/kluckow/events{/privacy}","received_events_url":"https://api.github.com/users/kluckow/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T18:39:02Z","updated_at":"2016-02-04T18:39:02Z","body":"Pull request sent..."}}