Comments (28)
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!
from bintray-release.
Very odd! Cloning your project and running -PdryRun=true
correctly deploys the artifact and poms to my .m2
. We just double checked the api by doing a release and that also still works.
Out of interest are you running the
./gradlew clean build bintrayUpload -PbintrayUser=BINTRAY_USERNAME -PbintrayKey=BINTRAY_KEY -PdryRun=false
command from the project root?
from bintray-release.
@ouchadam Yep, that's what I'm doing.
Deployment works fine, but if you check the contents of the generated pom.xml
, you can see that the a/m attrs are missing:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jenzz</groupId>
<artifactId>materialpreference</artifactId>
<version>1.0</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>21.0.3</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
So Bintray is complaining about it when you're trying to push it through to Maven Central. I do that via their web UI.
The issue seems to be that the package doesn't comply with the Maven Central requirements which according to that link require the presence of name, description and url. And potentially license & dev infos...
from bintray-release.
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
from bintray-release.
@xrigau Fair enough. That's exactly what's happening.
Those fields seem to be optional for Bintray, but mandatory for Maven Central.
So looking at the plugin code, I think it's the maven publication closure that needs to be extended.
I might send a PR for this, if I don't get tied up..
from bintray-release.
pr welcome!
from bintray-release.
What's the latest on this? I'm stuck in the same situation
from bintray-release.
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
to here https://github.com/novoda/bintray-release/blob/master/core/src/main/groovy/com/novoda/gradle/release/BintrayConfiguration.groovy
Missing fields like Developers
would fall under attributes
from bintray-release.
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.
from bintray-release.
Been taking a look at it. I'm not sure what you mean by this line though:
Missing fields like Developers would fall under attributes
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.
from bintray-release.
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 publication.asNormalisedPublication().pomFile
, Publication comes from the maven-publish
plugin if you wanted to manually test in a sandboxed project.
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!
from bintray-release.
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?
from bintray-release.
I meant the maven publication like you said. I just posted a fix for the task name issue
#42
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
from bintray-release.
so maybe we do need #30 ?
from bintray-release.
#30 is the same flow just the dummy project is within the codebase. anddddd whether or not it should live there is another discussion!
from bintray-release.
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 :/
from bintray-release.
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 createPom
from bintray-release.
@jjhesk could you elaborate a bit on that? Where to use it, when to call the task, etc?
from bintray-release.
Specifically, the example you just gave just creates a pom.xml
file in the top level of the project or wherever your build.gradle file is. How would you integrate that easily with this plugin?
from bintray-release.
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 bintrayUpload
was one of the gradle tasks passed, and reuse the same configuration for both subprojects by using some logic to determine what values to put (packaging, name, etc)
from bintray-release.
Hi guys,
I just stumbled over this and thanks to @hzsweers solution I got it working in no time.
Why don't you guys add it to your readme.md? I'll happily submit a PR that contains this.
Cheers!
from bintray-release.
@elektrojunge pull requests welcome, I'll look out for it to review/merge 😺
from bintray-release.
Not sure if the Wiki would be a better place for this. Do with it whatever you want. ;)
from bintray-release.
@jjhesk @hzsweers I did accroding to
https://github.com/novoda/bintray-release/wiki/Add-support-for-syncing-to-maven-central
but i got an error like below when build :
“Cannot invoke method doLast() on null object”
from bintray-release.
@hzsweers @jjhesk @yilylong I get the same result as @yilylong .
Anyone could help.
thanks in advance
from bintray-release.
@yilylong @aheadlcx I just add:
gradle.taskGraph.whenReady { taskGraph ->
def pomTask = taskGraph.getAllTasks().find {
it.path == ":$project.name:generatePomFileForMavenPublication"
}
if (pomTask == null) return;
pomTask.doLast {...
and right module name in:
if (IS_UPLOADING && project.name in['compiler','api']) {...
from bintray-release.
Hey all ,
I am stuck in the same issue like "Missing Some Attributes".
give me some solution to what i can do for that. I have not idea how to solve that issue.
Thanks in advance.
from bintray-release.
continue conversation on #96
from bintray-release.
Related Issues (20)
- Do you consider adding like 'archivesPath ' feature,to add progurad jar HOT 1
- I push my kotlin module to bintray and find it is empty when I test it. HOT 3
- Android databinding support..?
- The attempt to release the Android library ends up being successful even if bintray user/key are wrong HOT 2
- Do you consider adding like 'archivesPath ' feature,to add progurad jar/aar
- error for: 'com.android.tools.build:gradle:4.0.0' HOT 2
- Cause: org/gradle/api/internal/java/usagecontext/LazyConfigurationUsageContext HOT 11
- Q: how can i configure to enable only particular publications to maven local? HOT 6
- POM project file is not valid HOT 3
- Execution failed for task ':Csj:mockableAndroidJar'. > java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.utils.FileCache$FileCreatorException: java.lang.IllegalArgumentException
- publishReleasePublicationToMavenLocal ---- Failed HOT 1
- When to support gradle6.1.1 HOT 1
- Is this library abandoned? HOT 1
- When an Android Module is published, it references exceptions
- The new plugin bintray-publish supports Gradle 6.0+ and Android Gradle Plugin 4.0+ HOT 3
- When targetSdkVersion>=29 under app, click the selected photos and the application crashes with the error message as follows:
- When can update gradle support 6.0+ HOT 9
- unable to upload due to 401 unauthorized error HOT 1
- Task 'releaseAndroidJavadocs' not found in root project HOT 1
- Can it support to config and publish to GitHub packages? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bintray-release.