I want to upload a library to jcenter, now I have upload it into "https://bintray.com", but there is no "add to jcenter" button in "Linked to" module, I have read the document and compared it with other person's, but can't found out the reason. the package link click here
Before you can include your package in JCenter, the following
requirements must be met: 1)The package must be in a Maven repository
and must contain Maven sources. 2)The path of the files (entered in the
Upload Files form of the Version page) must conform to Maven standards
(the Group ID and Artifact ID combination must be unique, etc.; for
more information about Maven standards, consult the appropriate Maven
documentation) 3)Every version within the package that includes files
must also include a valid POM file.
"Add To JCenter" is not enabled for Enterprise Trial users. You need to be OSS or Premium organization/user in order to link your packages to JCenter.
I am with JFrog, the company behind bintray and artifactory.
Please note that if you running a trial account, you won't see this option as linking your package to jcenter is permanent.
Related
I'm new to working with Java and have questions regarding the Maven Central Repository. I am much more familiar with Python and PyPI, so I will provide the equivalent in PyPI that I would like to find in Maven.
How can I find the source code for the artifacts in Maven Central? Typically, I see the JAR file and prefer not to decompile these files. Typically, PyPI packages have the source file type in the "Download files" tab.
How can I find the associated project URL to a maven artifact? In PyPI, the package page has a set of project links and generally provides a repository link (e.g., Github, Bitbucket)
How can I identify open-source projects in the Maven central repository? The license for PyPI projects is tagged directly in the meta-reference on the sidebar of a project page.
I appreciate any insight into these questions. Thanks!
When a distributor decides to provide them, you can find -sources.jar and a -javadoc.jar files in the artifacts folder. (common IDE's are aware of that&provide buttons/menus, "Maven>Download XXX";)
like e.g. here
Artifact javadoc (for the sophisticated ones, javadoc and sources refers to the (common) "classifier" of the artifact)
how (easy) to produce them
In the pom:
project.url tag provides:
The project's home page.
project.scm element provides (should provide!) "source control" related (multiple) urls (read-only, contributer, public-browsing).
besides that many other things(and sub-things) can have url in a maven project/pom (distributionManagement(i.e repository), organisation, developer,...).
project.licenses element!
You can be sure to find all of these three (- four) in all (at least latest) artifacts in maven central, due to:
Their Publishing Requirements!;
Since version 2.2.0 Tycho has introduced a new feature to allow using maven artifacts in PDE target platforms, and here's the how-to. Following its instructions I have included an artifact of Saxon-HE into my target platform. I can see the wrapped OSGi bundle of Saxon after ticking the Show Location Content option in the Target Definition Editor. Also I ran mvn clean verify command to make sure that the artifact is downloaded into my computer. However,
as I began to try to import the package into my Eclipse plugin code, I found no suggestions from this package.
When I tried to include the package as a feature in the Product Editor, I couldn't find any option.
In addition, when attempting to include it as required plugin / imported packages in the Plugin Editor, there was no option, too.
What's more, the product produced by mvn clean verify did not contain such plugin as Saxon-HE after checking my whole RCP project.
All the efforts in vain above made me wonder how I can use a maven artifact in my plugin development. I desperately need the functionalities Saxon-HE provides with to enhance my plugin. Anyone experienced sharing your expertise?
-- 2021.08.13 update --
Manually I included this plugin in the plugin list of my RCP project via source file editing. Its jar file appeared in the plugin folder of the product. But anyway I was not able to validate the availability of the library in the dependency tab of the plugin manifest editor as shown in Vogella's tutorial. Restarting the IDE did not help, either. This might mean that I have to manually code the source code without the content assistance.
my project is organized as a Gradle multi-project build with five Java modules/sub-projects. When building them, it results in five different JAR artifacts.
Four of those artifacts contain helper classes or small, isolated portions of code doing very specific things (for example efficient graph search that is optimised towards my specific use case domain). Only one project is the "main" artifiact that makes sense to use in a standalone way, but all five artifacts are required for it to run.
I would like to make this core artifact available to users, and I have been successful in uploading all five artifacts to a Bintray account. When mirroring to JCenter, I have two concerns:
Do I have to actively link all 5 projects to JCenter, or is there a way to only expose the "core" artifact to the general public?
What does the "Is Pom Project" checkbox do? As I understand it, Gradle creates POM files for every Maven publication artifact, so this box should always be checked for Maven-style builds. Is this correct?
(potential duplicate that does not contain a solution apart from "I work at Bintray and I fixed it for you in our system!": Linking Bintray Package to JCenter)
Thanks!
- Gregor
I hope I can answer all.
Do I have to actively link all 5 projects to JCenter, or is there a way to only expose the "core" artifact to the general public?
As the other answer you have attached says, it is linked on path level, this means that if you include org/worldcubeassociation/tnoodle/lib-scrambles/ as the path, then only those modules will be linked to Jcenter.
What does the "Is Pom Project" checkbox do? As I understand it, Gradle creates POM files for every Maven publication artifact, so this box should always be checked for Maven-style builds. Is this correct?
Yes, you are correct. The POM file is created and uploaded. You can see the POM file in your path.
For more information you can always check the central repositories guide.
I have a package in Bintray called "tripod" which is here:
https://bintray.com/bbende/bbende-maven/tripod
The tripod package is a Maven project with a standard multi-module setup where the root pom artifactId is tripod, with sub-modules of tripod-search-api, tripod-search-solr, and tripod-search-lucene.
In my personal Maven repo, all of these artifacts are published under the groupId com.bbende.tripod as shown here:
https://dl.bintray.com/bbende/bbende-maven/com/bbende/tripod/
When I requested to link the tripod package to JCenter using the link on the main package page for "tripod" it ended up linking only the artifact for the top-level pom as seen here:
http://jcenter.bintray.com/com/bbende/tripod/
How are you supposed to get the entire package linked to JCenter?
I believe this is the same issue here which looks like it requires manual intervention from someone at bintray/jcenter:
Bintray does not sync one of the artifacts of the package to the jcenter
A Bintray package is linked to jcenter with a specific path prefix, so that all submodules and versions under the base path will automatically be linked to jcenter without further manual intervention.
It seems like your package is linked under the base path containing only one of the submodules, therefore, the other submodules are not linked to jcenter.
In such cases, you should contact JFrog support in order to fix the inclusion path. In this case, we have already fixed it and all submodules are correctly linked to jcenter.
Best Regards,
Itamar
We're using the maven license plugin (third-party-aggregate goal) to produce a list of third party project dependencies - this is good and we've got it working. I would like to extend that to include the licenses for our resources (i.e. not just code/dependencies), but don't know where to start - could anyone provide an example of what I need to do to make this work?
An example of what we've got: In a maven modules resources folder we hold a copy of the UK Postcode dataset (as a json file) so that we can use it offline. The file is licensed under Ordnance Survey OpenData license so we've put a LICENSE.txt file in the same directory that states this.
The result I want: "Ordnance Survey OpenData license" to appear in my THIRD-PARTY.txt file.
Some questions to help answer:
Can I specify the resource licenses directly in a pom.xml so that I don't have to keep the LICENSE.txt file we've created?
Can license-maven-plugin read LICENSE.txt files like the one we're using at the moment?
If 2=yes, do I need to specify the format of the text so that license-maven-plugin picks up the license?
Do I need to add tags with the license so that license-maven-plugin picks up these licenses?
Thanks for any help.
I'm using the Maven License plugin (with the add-third-party goal) to produce the THIRD-PARTY.txt report for all my Maven modules. I'm not sure this plugin can scan the ressource licenses.
One solution should be to package your json file into a small Maven project. It will produce an artefact and will store it into your binary repository (Artifactory, Nexus, ...).
Next, add a new dependency in your Maven project and the UK Postcode dataset will appear in your THIRD-PARTY.txt report.