-
Notifications
You must be signed in to change notification settings - Fork 211
Invalid POM: Missing some attributes #19
Comments
Hi @jenzz Seems like bintray have released newer versions of the plugin and our plugin is using an old one. We'll look into this to see if there's any API change and fix it. Thanks for reporting and we'll keep you updated! |
Very odd! Cloning your project and running Out of interest are you running the |
@ouchadam Yep, that's what I'm doing. Deployment works fine, but if you check the contents of the generated
So Bintray is complaining about it when you're trying to push it through to Maven Central. I do that via their web UI. |
Are you trying to sync with Maven Central?? So this error doesn't happen at build time but once you're logged in bintray? If that's the case I'll raise it as an issue - we need to add the ability to add more fields to the generated pom such as contributors, author, url, etc. We haven't used the Maven Central synchronisation yet and that's why we haven't faced this issue |
@xrigau Fair enough. That's exactly what's happening. So looking at the plugin code, I think it's the maven publication closure that needs to be extended. |
What's the latest on this? I'm stuck in the same situation |
Internally we stopped releasing to maven central once jcenter came about so this doesn't have the highest priority. But the change seems pretty simple , would just be a case of hooking up to the existing keys from here https://github.com/bintray/gradle-bintray-plugin/blob/master/src/main/groovy/com/jfrog/bintray/gradle/BintrayExtension.groovy Missing fields like |
I see. Are you sure about that second link? Seems like everything's hooked up fine there, it's the closure that @jenzz linked that seems to need things: https://github.com/novoda/bintray-release/blob/master/core/src/main/groovy/com/novoda/gradle/release/ReleasePlugin.groovy#L24-L34 If you agree, I can take a crack at a PR. |
Been taking a look at it. I'm not sure what you mean by this line though:
What attributes/where are those set? Also, how do you test this? I took a look at the contributing info and it mentioned tests, but there are no tests in this project. |
my bad I got confused with the bintray and publication extensions, in that case it's a bit simpler. ignore my previous comment! We're delegating to this https://github.com/bintray/gradle-bintray-plugin/blob/master/src/main/groovy/com/jfrog/bintray/gradle/BintrayUploadTask.groovy#L424 Which in turn calls Unfortunately because we're a little new to the whole groovy testing it's been put on the back burner..... so don't worry too much about the tests, unless you want to show us how it's done! |
It seems like it would be too late there wouldn't it? Doing it in the maven publication seems to be the right place, but I'm not sure how to go about setting up tests for groovy. I tried configuring my own in my project as specified here, but I get the same exception as in the last comment of #24. How do you guys normally test it? |
I meant the maven publication like you said. I just posted a fix for the task name issue As for testing, I'm currently having to release the plugin locally and then use it to release another project. It's a bad flow but for now it works |
so maybe we do need #30 ? |
#30 is the same flow just the dummy project is within the codebase. anddddd whether or not it should live there is another discussion! |
I see. I'll wait until that fix is released so I can test the custom publication, otherwise I don't think I can afford the time to work on it right now because I don't have time to learn pushing it locally or how to write groovy tests :/ |
add this to your gradle build file: apply plugin: 'maven'
task createPom << {
pom {
project {
name project.POM_DESCRIPTION
packaging project.POM_PACKAGING
description project.POM_DESCRIPTION
url project.POM_URL
version project.VERSION_NAME
scm {
url project.POM_SCM_CONNECTION
connection project.POM_SCM_CONNECTION
developerConnection project.POM_SCM_CONNECTION
}
licenses {
license {
name project.POM_LICENCE_NAME
}
}
developers {
developer {
id project.POM_DEVELOPER_ID
name project.POM_DEVELOPER_NAME
email project.POM_EMAIL
}
}
}
}.writeTo("pom.xml")
}
and then go to the build selection tab and create a new task callback and name it as |
@jjhesk could you elaborate a bit on that? Where to use it, when to call the task, etc? |
Specifically, the example you just gave just creates a |
I got it working, here's my repo for example: https://github.com/hzsweers/barber/blob/master/build.gradle#L42-L83 Basically, you have to hook the task @jjhesk described into the build process, and schedule it to run sometime after the plugin generates its default POM file but before upload. I have it set up to only configure this when |
Hi guys, |
@elektrojunge pull requests welcome, I'll look out for it to review/merge 😺 |
Not sure if the Wiki would be a better place for this. Do with it whatever you want. ;) |
@jjhesk @hzsweers I did accroding to |
@yilylong @aheadlcx I just add:
and right module name in:
|
Hey all , |
continue conversation on #96 |
Hi there!
It looks like the plugin is missing to generate some attributes that are required by Bintray to sync with Maven Central:
I have provided all those information as you can see in my build.gradle.
Any ideas?
The text was updated successfully, but these errors were encountered: