Artifact not found in JCenter after name change - bintray

I recently updated the name and artifact name of some of my packages in JCenter (example) and I updated the coordinates in Gradle accordingly. However, the new artifacts are not found no matter what I do.
I checked JCenter directly, and they appear to be there. Is there something that I need to do to get it to work again?

Please note that when you submit a JCenter inclusion request for a particular package, all the artifactIDs present under the groupID will be included in the JCenter. If you add additional artifactIDs under the already included groupID , those artifactIDs will not be mirrored in JCenter because JCenter hosts Single path for a single package.
In your case for the package "kodein-di-android-components" there are two artifactIDs under the groupID "com/eygraber"
1. kodein-android-components
2. kodein-di-android-components
Only the First artifactID "kodein-android-components" is included in JCenter,
In order to add the second artifactID "kodein-di-android-components" create a new
Bintray package for the artifactID "kodein-di-android-components" and include all the files under the path GroupID+ artifactID i.e com/eygraber/kodein-di-android-components so that the package will be hosted in JCenter under the path
https://jcenter.bintray.com/com/eygraber

Related

Must the groupId in a maven dependency match the package of the actual jar?

There's a legacy jar in our product. The package name is from a company acquired years ago. I'm setting up maven dependencies for it, and scripts to do the local-repo install after it's built, so everything is fully automated.
When it's installed in the local repo, does the groupId have to match the actual package? E.g. if the package is com.oldcompany.oldproductname, is it OK to install it into the repo with com.newcompany.newproductname?
Would that cause real technical problems down the line? Or is groupId somewhat arbitrary, and should just be what's clearest?
No, there is not technical connection between the groupId and the package name.
This is just a convention.
As J Fabian Meier said
No, It must not you can change the jar name for what ever you want but as a convention the jar should match the group name, artifact name and the version to make it easier to figure which jar to deploy and to which group/artifact the jar belongs to.

JAR file is corrupted (+missing source, javadoc) pushing maven artifact from BinTray to JCenter

I have some maven artifacts on bintray new for our current release that need adding to JCenter before they can be synced from BinTray to Maven Central. (We have other artifacts already in place)
However some of these artifacts are throwing errors when trying to add to JCenter that I don't agree with :-)
For example
JAR file is corrupted.
A binary file (jar, aar, wat, apk) should be part of the package.
Could not validate jar file.
Package should include sources as part of the package.
This particular jar looks ok for me. I download from BinTray (in case it was indeed corrupted on the upload)
* It's entirely readable - not corrupted
* It includes a regular jar, which has other jars and class files included
* It also includes a 'sources' jar and 'javadoc' jar -- which we added a few releases ago when manually syncing to maven central.
The contents of the package on bintray are:
ui-chassis-spring-1.3-javadoc.jar
ui-chassis-spring-1.3-sources.jar
ui-chassis-spring-1.3.jar
This appears to be suitable for maven central. It follows the pattern also documented at https://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-sources-javadoc.html
I did see a prior question opened where the resolution was to include sources in the main jar, but I disagree with this approach. Normally sources are download (for example by an IDE such as IntelliJ) on demand
Is there any way to get more detailed information? Is the validation on JCenter incorrect?
[ Ref: Github issue - https://github.com/odpi/egeria/issues/2499 ]

JFrog Artifactory doesn't generate dependency declaration

I created default repository for gradle and published jar into it. I don't see snippets with dependency declaration on the JAR description page.
I have only added a local repository. What am I missing?
It seems that your file is not deployed according to the Maven/Gradle layout.
You do not have a groupID (Org) in the path.
In your case the correct file path should be:
perf-local-gradle/YOUR/ORG/cucumber-performance-testing-framework/1.0/cucumber-performance-testing-framework-1.0.jar
instead of:
perf-local-gradle/cucumber-performance-testing-framework/1.0/cucumber-performance-testing-framework-1.0.jar
You can read more about repo layouts here:
https://www.jfrog.com/confluence/display/RTF/Repository+Layouts

Understanding Java Artifacts and Maven

I am trying to understand relationship between artifact, group, class definitions.
For example, I've seen the following artifact declaration:
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.0</version>
Is there a file associated with this artifact?
Is this enough information to pull down the file down when building your Maven Project?
Where is it getting the file from? Is it getting it from selenium, or does Maven house these artifacts, and it is getting from Maven?
Where exactly is it downloading the artifact from?
What's in the artifact file? Class definitions? Multiple classes can be defined in there, right?
Maven seems to be making a jar file. Is it compounding all the classes into that file?
Also, how is artifact file different from JAR file and can you make your own artifact file?
Is there a file associated with this artifact?
Yes, what you have posted is known as a coordinate. It references a jar named selenium-java that is in the group org.seleniumhq.selenium.
Groups, identified by the groupId component of the coordinate, are a way of namespacing artifacts within maven to prevent naming collisions.
This coordinate says that the project has a dependency on version 2.53.0 of a maven artifact named selenium-java in the group org.seleniumhq.selenium.
Is this enough information to pull down the file down when building your Maven Project?
Yes, the coordinate is how the artifact is located within the maven repository and is enough information to locate and download the artifact when building a maven project.
Where is it getting the file from? Is it getting it from selenium, or does Maven house these artifacts, and it is getting from Maven?
Where exactly is it downloading the artifact from?
Where the file is retrieved from is based on your maven configuration. By default maven will first check the local maven repository on your machine to see if the artifact has already been downloaded. If not, it will then check Maven Central.
You can also host your own maven repositories using tools such as Nexus or Artifactory that can mirror repositories on the internet such as Maven Central as well as store artifacts you create yourself that you do not with to share with others.
What's in the artifact file? Class definitions? Multiple classes can be defined in there, right?
An artifact can be any type of file. In the case of the selenium coordinate above the artifact is a jar file. There will also be a pom file associated with that coordinate that explains all of the dependencies of the selenium-java jar.
http://search.maven.org/#artifactdetails%7Corg.seleniumhq.selenium%7Cselenium-java%7C2.53.0%7Cjar
Maven seems to be making a jar file. Is it compounding all the classes into that file?
You can build normal jars or fat jars with maven. By default maven will build a normal jar. If you wish to package all of a jars dependencies within it (i.e. fat jar) you need to use a special maven plugin.
http://maven.apache.org/plugins/maven-shade-plugin/
Also, how is artifact file different from JAR file and can you make your own artifact file?
Artifact is a generic term used to describe anything you can store within a maven repository. Maven repositories can store many different types of files. In the case of this coordinate the artifact is a jar file.

Maven snapshot artifact publication file name

Have a problem with Maven. For some unfortunate reason I need to figure out the exact name of the snapshot artifact it uploads to Nexus.
For example, my current version is "1.0-SNAPSHOT" and when artifact is uploaded to the repo, it's name is something like "Foo-1.0-20160322.150103-15.jar", SNAPSHOT is replaced with timestamp.
If there any build property (which I couldn't find) or other nice way to extract artifact's name? For this example it should have value "Foo-1.0-20160322.150103-15.jar".
I'm using maven 3.2.5.

Resources