Thanks Eyal for the reply.
1. if I have to use M2 Plugin only with deploy goal then it would be mandatory for me to mention distribution management tag under my pom.xml. I am not so intended to mention distribution management tag in my pom.xml. so It means that I would have to use Artifactory Release Staging" feature (Artifactory Release Management) added by the Artifactory Plugin only.
2. I have tried using Artifactory Release Staging" feature (Artifactory Release Management) added by the Artifactory Plugin also, but it is failing with below error.
ERROR:
_[RELEASE] Release build triggered
ERROR: Failed to parse POMs
java.io.IOException: Perforce execution failed: 'non-numeric Perforce server port specifier: p4java://ssl:perforcehost:1234'
at org.jfrog.build.vcs.perforce.PerforceClient.createServer(PerforceClient.java:66)
at org.jfrog.build.vcs.perforce.PerforceClient.<init>(PerforceClient.java:39)
at org.jfrog.build.vcs.perforce.PerforceClient.<init>(PerforceClient.java:33)
at org.jfrog.build.vcs.perforce.PerforceClient$Builder.build(PerforceClient.java:216)
at org.jfrog.hudson.release.scm.perforce.PerforceManager.prepare(PerforceManager.java:58)
at org.jfrog.hudson.release.scm.perforce.PerforceCoordinator.prepare(PerforceCoordinator.java:51)
at org.jfrog.hudson.release.maven.MavenReleaseWrapper.setUp(MavenReleaseWrapper.java:137)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:653)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.net.URISyntaxException: non-numeric Perforce server port specifier: p4java://ssl:perforcehost:port
at com.perforce.p4java.server.ServerFactory.getOptionsServer(ServerFactory.java:312)
at com.perforce.p4java.server.ServerFactory.getOptionsServer(ServerFactory.java:196)
at com.perforce.p4java.server.ServerFactory.getServer(ServerFactory.java:168)
at org.jfrog.build.vcs.perforce.PerforceClient.createServer(PerforceClient.java:51)
The easiest way for creating release builds and then deploying them to Artifactory is by using the "Artifactory Release Staging" feature (Artifactory Release Management) added by the Artifactory Plugin. Using it also provides features like build-info collection and checksum deploy. You can still use M2 release feature if you'd like, but you might need to use it with the "deploy" goal to trigger the deployment. Please let us if this works for you and if you require further assistance.