eclipse-ee4j / ee4j

Eclipse EE4J Top-level Project and community related issues
http://www.eclipse.org/ee4j
Other
277 stars 44 forks source link

Add configuration for the nexus-staging-maven-plugin. #38

Closed romain-grecourt closed 6 years ago

romain-grecourt commented 6 years ago

This plugin requires to be declared with extension=true. It is relatively intrusive, thus isolating it inside the oss-release profile.

The plugin also has "rc" goals that can be used with mvn cli invokation to automate the nexus workflow. The plugin is configured in pluginManagement to enable that use-case.

Configure the maven-deploy-plugin to be skipped so that it does not interfere with the nexus-staging-maven-plugin. Also configure the nexus-staging-maven-plugin to skip its execution based on maven.deploy.skip which is a well known property.

Add comments to clarify what each profile does.

romain-grecourt commented 6 years ago

@lukasj @bshannon @arjantijms FYI

bshannon commented 6 years ago

I have the nexus-staging-maven-plugin included in the my main section, but without the extension=true, and that's enough to allow me to use it with the rc goals and without using any profile. Thus, I don't think you need the nexus-plugin profile if you just add it to instead.

romain-grecourt commented 6 years ago

Makes sense. The extension is only needed for their deploy magic, the rc-goal only require the plugin to be configured, and in this case the dependencyManagement section is enough.

lukasj commented 6 years ago

@Tomas-Kraus FYI

romain-grecourt commented 6 years ago

Any idea why the ip-validation check fails ? The last few commits are signed-off.

romain-grecourt commented 6 years ago

@Tomas-Kraus Do you know why the ip check failed ?

Tomas-Kraus commented 6 years ago

@Tomas-Kraus Do you know why the ip check failed ? I don't know. But it happened to me too in the past. Maybe some temporary failure on eclipse side.

Tomas-Kraus commented 6 years ago

@m0mus Please check this in. We can make 1.0.5 in staging to test it.

Tomas-Kraus commented 6 years ago

I put this into staging as 1.0.5 and parent pom deployment revealed one issue:

  1. maven-deploy-plugin: true - this turns off deployment by this plugin
  2. nexus-staging-maven-plugin is not configured to do anything - default maven.deploy.skip is not initialized and maven deploy argument is silently ignored.
  3. using nexus-staging:deploy works fine and it also closes staging repo.

I would set at least default value of maven.deploy.skip in this pom.

romain-grecourt commented 6 years ago

@Tomas-Kraus , the nexus-maven-plugin configures an extension and replaces the executions of the deploy plugin. You don't need to configure any execution of the plugin. (See the actual code here: https://github.com/sonatype/nexus-maven-plugins/blob/master/staging/maven-plugin/src/main/java/org/sonatype/nexus/maven/staging/deploy/DeployLifecycleParticipant.java)

I've been using this configuration for Helidon and it works. The only difference is that I'm not forcing the maven-deploy-plugin to be skipped, maybe that's the reason why you are seeing this behavior. I did add this based on what Bill had been using for javamail but I didn't think this would make the staging plugin not work. I.e skipping the deploy-plugin might actually turn off the staging-plugin too.

The right thing to do is probably to remove the hardcoded skip for the deploy plugin (or force do it only for the oss-release profile).

Also the snapshot deployments should be done by the regular deploy plugin, so skipping it with hardcoded configuration in the default profile is wrong.

Let's not release the parent pom to Maven Central until we get it right. I'll submit another PR and have you test it again ;)