{"action":"created","issue":{"url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin/issues/55","repository_url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin","labels_url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin/issues/55/comments","events_url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin/issues/55/events","html_url":"https://github.com/jgitver/jgitver-maven-plugin/issues/55","id":219261432,"node_id":"MDU6SXNzdWUyMTkyNjE0MzI=","number":55,"title":"Plugin is incompatible with Artifactory Jenkins Plugin","user":{"login":"gimmebytes","id":1862500,"node_id":"MDQ6VXNlcjE4NjI1MDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1862500?v=4","gravatar_id":"","url":"https://api.github.com/users/gimmebytes","html_url":"https://github.com/gimmebytes","followers_url":"https://api.github.com/users/gimmebytes/followers","following_url":"https://api.github.com/users/gimmebytes/following{/other_user}","gists_url":"https://api.github.com/users/gimmebytes/gists{/gist_id}","starred_url":"https://api.github.com/users/gimmebytes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gimmebytes/subscriptions","organizations_url":"https://api.github.com/users/gimmebytes/orgs","repos_url":"https://api.github.com/users/gimmebytes/repos","events_url":"https://api.github.com/users/gimmebytes/events{/privacy}","received_events_url":"https://api.github.com/users/gimmebytes/received_events","type":"User","site_admin":false},"labels":[{"id":400931492,"node_id":"MDU6TGFiZWw0MDA5MzE0OTI=","url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin/labels/feedback%20expected","name":"feedback expected","color":"006b75","default":false},{"id":365113837,"node_id":"MDU6TGFiZWwzNjUxMTM4Mzc=","url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true},{"id":400990026,"node_id":"MDU6TGFiZWw0MDA5OTAwMjY=","url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin/labels/not%20yet%20reproduced","name":"not yet reproduced","color":"e99695","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-04-04T14:03:30Z","updated_at":"2018-12-17T16:02:53Z","closed_at":"2017-05-22T15:47:34Z","author_association":"NONE","body":"## Issue\r\n\r\nFirst off: Nice plugin, good idea and clean approach to automatically generate version numbers based on the git history. Unfortunately it seems that the plugin is not compatible with the Artifactory Plugin of Jenkins inside our CI environment. I will describe the details below.  \r\n\r\n**version**: 0.4.0\r\n\r\n**usage context**:\r\n- [ X ] maven command line: 3.3.9 and 3.3.3\r\n- [ X ] Intellij IDEA: 2016.3\r\n- [ X ] Jenkins: 2.49\r\n- [ X ] Artifactory Plugin for Jenkins 2.10.1 https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin\r\n\r\n**Problem description**:\r\n\r\nI'm currently working on a new internally used set of libraries composed as multi module project using maven. I've added the plugin as described (.mvn/extension.xml). Locally it's working totally fine using intelliJ. But inside Jenkins the plugin breaks the Artifactory Plugin to publish the generated artifacts to a artifactory server instance.\r\n\r\nI'm using a JenkinsFile to build the artifacts - snip\r\n\r\n```\r\ncheckout(...)\r\ndef server = Artifactory.server 'maven'\r\ndef buildInfo = Artifactory.newBuildInfo()\r\nbuildInfo.env.capture = true\r\ndef rtMaven = Artifactory.newMavenBuild()\r\nrtMaven.tool = 'MavenLatest'\r\nrtMaven.deployer releaseRepo:'java-releases', snapshotRepo:'java-snapshots', server: server\r\nrtMaven.deployer.artifactDeploymentPatterns.addInclude('....)\r\nrtMaven.run pom: 'pom.xml', goals: 'clean package', buildInfo: buildInfo\r\nserver.publishBuildInfo buildInfo}\r\n```\r\n\r\nThe Artifactory Plugin is calling maven internally, which is working fine and the jgtiver plugin is also invoked with no issues:\r\n\r\n`java -classpath /opt/maven/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar -Dmaven.home=/opt/maven/apache-maven-3.3.9 -DbuildInfoConfig.propertiesFile=/tmp/buildInfo5131567399890492507.properties -Dclassworlds.conf=/tmp/classworlds9114561323625377013conf -Dmaven.multiModuleProjectDirectory=/var/lib/jenkins/path-to-project -org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml clean package`\r\n\r\nOutput (I've omitted some names for privacy reasons):\r\n\r\n`[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...\r\n[main] INFO fr.brouillard.oss.jgitver.JGitverModelProcessor - jgitver-maven-plugin is about to change project(s) version(s)\r\n[main] INFO fr.brouillard.oss.jgitver.JGitverExtension -     XXX::XXX-YYY:1.0.0-SNAPSHOT -> 1.0.0-SNAPSHOT\r\n....\r\n[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording\r\n[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------\r\n[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Reactor Build Order:\r\n[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - \r\n[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - XXX-YYY\r\n...\r\n[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -                                                                         \r\n[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------\r\n[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building XXX-YYY 1.0.0-SNAPSHOT\r\n[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ---------------------------------------------------------`\r\n\r\nBut then the Artifactory Plugin kicks in and hangs:\r\n\r\n`[main] ERROR org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener - Failed while enforcing Artifactory artifact resolver\r\norg.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException\r\n      role: org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseArtifactResolver\r\n  roleHint: \r\n\tat org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)\r\n\tat org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)\r\n\tat org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:237)\r\n\tat `\r\n\r\nI saw that your plugin is using plexus as well - Is it possible, that the plugin overrides the plexus context and therefore the Artifactory Plugin is unable to find their registered components?\r\n\r\nI would really like to use your plugin in production, but on the other hand I'm not able to dismiss artifactory as of now.\r\n\r\nIf you need further information let me know.\r\n\r\nBest regards,\r\nMarvin K.\r\nStatista\r\n\r\nPS: Sorry for the bad JenkinsFile formatting, my Markdown skills are kinda bad.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin/issues/comments/447897633","html_url":"https://github.com/jgitver/jgitver-maven-plugin/issues/55#issuecomment-447897633","issue_url":"https://api.github.com/repos/jgitver/jgitver-maven-plugin/issues/55","id":447897633,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Nzg5NzYzMw==","user":{"login":"dbcall2","id":15332465,"node_id":"MDQ6VXNlcjE1MzMyNDY1","avatar_url":"https://avatars0.githubusercontent.com/u/15332465?v=4","gravatar_id":"","url":"https://api.github.com/users/dbcall2","html_url":"https://github.com/dbcall2","followers_url":"https://api.github.com/users/dbcall2/followers","following_url":"https://api.github.com/users/dbcall2/following{/other_user}","gists_url":"https://api.github.com/users/dbcall2/gists{/gist_id}","starred_url":"https://api.github.com/users/dbcall2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbcall2/subscriptions","organizations_url":"https://api.github.com/users/dbcall2/orgs","repos_url":"https://api.github.com/users/dbcall2/repos","events_url":"https://api.github.com/users/dbcall2/events{/privacy}","received_events_url":"https://api.github.com/users/dbcall2/received_events","type":"User","site_admin":false},"created_at":"2018-12-17T16:02:53Z","updated_at":"2018-12-17T16:02:53Z","author_association":"NONE","body":"I'm having the same issue as @gimmebytes above... When the artifactory plugin fires up it is able to resolve the plugin artifacts just fine. Once jgitver is invoked the artifactory plugin can no longer find it's artifact resolver. "}}
{"actor":{"display_login":"dbcall2"}}