-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promote to master doesn't work in multi-module project where some modules are marked as not to be deployed to the repo #107
Comments
@petermcj - Ahhh, now this is making sense. You're only uploading the .ear. As a short-term workaround, I'd just suggest you stop skipping the artifact upload. As a long-term solution, we'd want / desire a test-case, then we'd have to update things to not try to resolve catalogs for skipped deployments. It sounds doable. It's just kinda wonky. |
I've ran into the exact same problem. A quick and dirty workaround: // Check to see if the project can expect any catalogs (and artifacts), or whether deployment is "skipped".
for (Plugin plugin : project.getBuildPlugins()) {
if (plugin.getKey().equals("org.apache.maven.plugins:maven-deploy-plugin") && plugin.getConfiguration() != null) {
Xpp3Dom xpp3Dom = (Xpp3Dom) plugin.getConfiguration();
Xpp3Dom skipNode = xpp3Dom.getChild("skip");
if (skipNode != null && "true".equals(skipNode.getValue())) {
getLog().info("Artifact resolution skipped due to maven-deploy-plugin skip=\"true\" config.");
return;
}
break;
}
} |
Wow. Yeah, that is pretty nasty. I cringed at the Xpp3Dom casts already used to extract plugin configuration in the extensions. I'm going to think this one through for a few more days before I take action on it. There are folks that deploy without the maven-deploy-plugin, I'd like to find some way to accommodate that case, too. |
It's definitely not going to win any beauty contests, I'll give you that ;). It was just a PoC.
Not sure how you would accommodate that. The plugin needs to know somehow which artifacts it can safely expect to be present for promotion, and which ones are erroneously missing. The plugin already makes accommodations for the
edit: disregard that, artifact promotion is done on a per-pom-basis. Perhaps a simple |
Hi, I'm currently facing the same issue, any update on this ? I would be happy to help if I can, if you can give some direction to the recommended options to fix this. |
@PayBas your last suggestion about skipping specific artifacts for promotion by pom -- that would work for your original case too, correct? This sounds more promising, and less specific - deploy plugin-dependent. |
In multi-module projects (ear with ejb/jar/war inside) we only want to upload the ear as it includes all the other modules. We use skip=true with maven-deploy-plugin in the modules that shouldn't be deployed to the repo :
Everything works fine until we finish the release branch and the master build that should promote from stage fails as it can't find the artifacts that we have marked to be skipped.
The text was updated successfully, but these errors were encountered: