Is there a bintray java API? - bintray

I was wondering if there was a Java wrapper for the bintray REST api. I could just use some java REST consuming services, but if it already exists it would be much easier, I don't need to reinvent the wheel.

There is a Bintray client Java module.
You can import it to your Java project as it is available on Jcenter.
Update:
In order to install dependencies from JCenter, you need to add JCenter to your repository resolver. You need to add this to your POM.xml:
<repositories>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
</repository>
<repositories>
Note: you can have more than one repository under the <repositories> label

Related

Import component from add-on directory

I am using Vaadin version 21.0.7 with Spring Boot and i want to import Paginator add-on.
I have added addon's groupId in applicaton.properties as follows: vaadin.whitelisted-packages=com.test.demo,com.vaadin.componentfactory.
The problem is that i get the following error: Paginator cannot be resolved to a type.
Some questions you may want to update your question with answers to:
Are you using Maven? Gradle? Something else?
JDK version?
Is the error a compile-time one? If so, you should add the full output to your question.
Now, for a potential solution:
Assuming you are using Maven...
(1) Make sure that Maven resolved the dependency.
Your IDE should tell you if not, or you can check your local .m2 directory. On Windows, it is located at ${user.home}. On macOS and most Unix/Linux distributions, it is located at ~. Check .m2/repositories/com/vaadin/componentfactory/paginator/<version>/ and ensure that the JARs were downloaded.
If they were not, make sure you
(a) defined the Vaadin Addons repository in your POM, e.g.,
<repositories>
<repository>
<id>vaadin-addons</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
(b) and defined the dependency, e.g.,
<dependencies>
<dependency>
<groupId>com.vaadin.componentfactory</groupId>
<artifactId>paginator</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
(2) Are you using Jigsaw (Java 9+ modules)?
If you are, make sure you specified the dependency:
module myModule {
requires paginator;
}

Maven:Including jars from remote repository

I wish to include jars present under \10.171.98.23 system [ex:\10.171.98.23\workspace\Project\lib] in my pom.xml by making use of remote repository concept.
How it could be achieved in Maven?Any suggestions would be more useful to proceed
The simplest example would be:
<repositories>
<repository>
<id>my-internal-site</id>
<url>http://myserver/repo</url>
</repository>
</repositories>
Check the documentation for more détails. You could also have a look at Maven the reference guide.

Maven repository for camunda 1.4.0-SNAPSHOT

I'm following some instructions here on how to get started with a Spring Boot Camunda start up application.
https://camunda.github.io/camunda-bpm-spring-boot-starter/docs/current/index.html
According to this link I should be able to find 2.0.0-SNAPSHOT on Maven central but I cannot.
https://github.com/camunda/camunda-bpm-spring-boot-starter
Maven central only has version 1.3.0.
https://mvnrepository.com/artifact/org.camunda.bpm.extension/camunda-bpm-spring-boot-starter
Can someone help me with this. At the moment the only way I can get things working is by building the whole camunda-bpm-spring-boot project that I downloaded from GitHub.
To use Camunda SpringBoot 2.0.0-SNAPSHOT, you have to add the maven central snapshot repository to your project like so
<repository>
<id>maven-central-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
See here for the artifacts of 2.0.0-SNAPSHOT. You don't find them under the old location because the groupId and artifactIds changed a bit. Also there is no actual 2.0.0 release yet.

getting maven to use repository for one library only

i have a repository setup like this
<repository>
<id>jboss</id>
<name>JBoss Repository for Maven</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>itextpdf.com</id>
<name>Maven Repository for iText</name>
<url>http://maven.itextpdf.com/</url>
</repository>
how do i set up the dependency to use the itext repository only for itext and jboss for everything else. for some reason the dependencies are being downloaded by both and one of them that is in the itext repository is different than the jboss and is crashing my system.
You shouldn't need to do this if the artifact only exists in one of the repositories (maven will try each repository in order and will stop once it finds it). The itext repo doesn't have any of the jboss jars so listing it first should result in it being checked first (and when it fails to resolve the jboss jars, it'll try the jboss repo).
Alternatively, if you have your own Maven repository server (Nexus, for instance), acting as a proxy for the public maven repositories, you can set up a "Repository Routing" in which you tell it which repositories to search for specific artifacts (based on group ID).

Qi4j maven configuration

I'm currently trying to figure out how Qi4j works. So i decided to start with a simple example. I tried to use the Qi4j lib in my pom.xml and am now facing the problem, that the artifact can't be found. I'm using NetBeans 7.0.1 and my pom.xml parts are shown below:
<repository>
<id>qi4j-official</id>
<url>http://repository.ops4j.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<dependency>
<groupId>org</groupId>
<artifactId>org.qi4j</artifactId>
<version>1.4</version>
</dependency>
I'm i doing something wrong? Thanks a lot.
Qi4j consists of many many artifacts, to keep the total footprint down as most applications won't use all bits and pieces.
<groupId>org.qi4j.core</groupId>
contains the artifacts (as of 1.3)
<artifactId>org.qi4j.core.api</artifactId>
<artifactId>org.qi4j.core.spi</artifactId>
<artifactId>org.qi4j.core.runtime</artifactId>
<artifactId>org.qi4j.core.bootstrap</artifactId>
<artifactId>org.qi4j.core.testsupport</artifactId>
For "compile" scope api and bootstrap should be enough. testsupport is obviously "test" scope and runtime should not be used by your code and only be a "runtime" dependency.
<groupId>org.qi4j.library</groupId>
The Libraries varies greatly in completeness and quality. Extensions can depend on libraries but not the other way around.
<groupId>org.qi4j.extension</groupId>
Extensions implements the slowly growing SPI pluggable functionalities; entity stores, indexing/query and caching. Next release (2.0) will have more extensions for value serialization and others.
Hope that helps, or meet the Qi4j community at the qi4j-dev Google Group for additional support.
Based what i can see in the given repository the groupId and artifactId are completely different...
http://repository.ops4j.org/maven2/org/qi4j/core/org.qi4j.core.spi/1.4/org.qi4j.core.spi-1.4.pom
To learn how to depend on Qi4j in your build see the dedicated how-to that's now present on the Qi4j website: http://qi4j.org/latest/howto-depend-on-qi4j.html
Here are the release and snapshot repositories :
https://repository-qi4j.forge.cloudbees.com/release/
https://repository-qi4j.forge.cloudbees.com/snapshot/
Weekly SNAPSHOTs are uploaded the snapshot repository so you need to add this url as a maven repository :
<repositories>
[...]
<repository>
<id>qi4j-snapshots</id>
<url>https://repository-qi4j.forge.cloudbees.com/snapshot/</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
[...]
</repositories>
And then you can add dependencies to Qi4j:
<dependencies>
[...]
<dependency>
<groupId>org.qi4j.core</groupId>
<artifactId>org.qi4j.core.bootstrap</artifactId>
<version>QI4J_VERSION</version>
</dependency>
<dependency>
<groupId>org.qi4j.core</groupId>
<artifactId>org.qi4j.core.runtime</artifactId>
<version>QI4J_VERSION</version>
</dependency>
[...]
</dependencies>
Where QI4J_VERSION is the version you want to use.

Resources