hibernate-spatial 4.3 not found in Maven - java

I want to add hibernate-spatial and postgis to my Maven project.
This is my pom.xml:
<properties>
<hibernate.version>4.3.6.Final</hibernate.version>
<hibernate.spatial.version>4.3</hibernate.spatial.version>
<hibernate.core.version>4.3.6.Final</hibernate.core.version>
<postgis-jdbc.version>2.2.0</postgis-jdbc.version>
</properties>
...
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.core.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate-entitymanager.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-spatial</artifactId>
<version>${hibernate.spatial.version}</version>
</dependency>
<dependency>
<groupId>org.postgis</groupId>
<artifactId>postgis-jdbc</artifactId>
<version>${postgis-jdbc.version}</version>
</dependency>
The references to entity-manager and hibernate-core work. But hibernate-spatial and postgis-jdbc are not found:
org.hibernate:hibernate-spatial:4.3 not found Inspect a Maven model
for resolution problems.
(same error for postgis-jdbc)
How can I include these libraries in my project?

The library hibernate-spatial is not available in the public maven repository until 5.0. You can always check what is available by browsing http://mvnrepository.com/ (in this case http://mvnrepository.com/artifact/org.hibernate/hibernate-spatial).
But you can add the hibernate spatial repository to your POM, which contains earlier releases of hibernate-spatial:
<project ...>
...
<repositories>
<repository>
<id>Hibernate Spatial repo</id>
<url>http://www.hibernatespatial.org/repository</url>
</repository>
</repositories>
</project>
This contains the matching postgis-jdbc library in version 1.5.2 as well.

Related

spring boot 2.6.8 and elasticsearch 7.17.2 compatibility

I want to customize springboot 2.6.8 elasticsearch dependency to elasticsearch 7.17.2, is this ok?
Based on springboot dependency versions, 2.6.8 is mapped to elasticsearch version 7.15.2.
But I want to changed it since elasticsearch version 7.15.2 has some deprecated functions.
How to do it?
the pom.xml I am using does not have spring-boot-starter-data-elasticsearch
and if I use it Maven cannot find it in:
<repositories>
<repository>
<id>shibboleth_repository</id>
<name>Shibboleth Maven Repository</name>
<url>https://build.shibboleth.net/nexus/content/repositories/releases/</url>
</repository>
</repositories>
<properties>
<java.version>17</java.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.8</version>
</parent>
<dependencies>
:
:
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
</dependency>
:
</dependencies>
I want to customize springboot 2.6.8 elasticsearch dependency to elasticsearch 7.17.2, is this ok?
One never knows until they try. The ElasticSearch version 7.17.2 contains backward-compatible changes 7.15.2, hence it should be ok.
How to do it?
Check the dependency trees:
spring-boot-starter-parent:2.6.8
spring-boot-starter-data-elasticsearch:2.6.8
spring-data-elasticsearch:4.3.4
org.elasticsearch.client:...:7.15.2
... and ...
spring-boot-starter-parent:2.7.0
spring-boot-starter-data-elasticsearch:2.7.7
spring-data-elasticsearch:4.4.0
org.elasticsearch.client:...:7.17.3
You might want either to update Spring Boot to 2.7.0 for full compatibility that imports transitive dependencies of ElasticSearch version 7.17.3 or override the versions: Exclude all the org.elasticsearch.client dependencies and import them as separate dependencies.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
<exclusions>
<!-- repeat for all ElasticSearch dependencies -->
<exclusion>
<groupId>org.elasticsearch.client</groupId>
<artifactId>...</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- repeat for all ElasticSearch dependencies -->
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>...</artifactId>
<version>7.17.2</version>
</dependency>

Can't find kafka library in confluent repository

I am using confluent and according to the official document, I only have to configure below in pom.xml like this:
<repositories>
<repository>
<id>confluent</id>
<url>http://packages.confluent.io/maven/</url>
</repository>
<!-- further repository entries here -->
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.11</artifactId>
<!-- For CP 3.1.0 -->
<version>0.10.1.0-cp1</version>
</dependency>
</dependencies>
But seems kafka_2.11 with version 0.10.1.0-cp1 does not exits.
The website http://packages.confluent.io/maven/ cannot be reached too.
How can I get it?
I am using below maven dependancy its working fine for me :
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<version>0.10.2.0-cp1</version>
</dependency>
<repository>
<id>confluent</id>
<name>Confluent</name>
<url>http://packages.confluent.io/maven/</url>
</repository>
Hopefully this will help

Getting "new" dependency from org.eclipse.xtext.common.types

I'm looking for a confirmation that version 2.9.1 of org.eclipse.xtext.common.types always had the following org.eclipse.core.runtime dependency tree:
Since ~2 weeks, our build are getting an additional JAR (org.eclipse.core.runtime, version 3.14.0). So far we can't explain why ... and are looking if ever possible that anything on Xtext version 2.9.1 recently changes? We doubt, but who knows?
The dependency has been set as Maven dependency:
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.common.types</artifactId>
<version>2.9.1</version>
</dependency>
==============================================
Additional information based on my findings ... This is the pom.xml of org.eclipse.xtext.common.types Artifact (version 2.9.1):
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.tycho.parent</artifactId>
<version>2.9.1</version>
<relativePath>../../maven/org.eclipse.xtext.tycho.parent</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<name>Common Types Runtime Library</name>
<artifactId>org.eclipse.xtext.common.types</artifactId>
<dependencies>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.util</artifactId>
<version>[${project.version}]</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext</artifactId>
<version>[${project.version}]</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.codegen</artifactId>
<version>${emf.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>${google-inject.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.ecore</artifactId>
<version>${emf.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.common</artifactId>
<version>${emf.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.mwe2.lib</artifactId>
<version>${mwe2-version}</version>
</dependency>
</dependencies>
${emf.version} is a range from (2.8:3.0) ... Looking at following: http://mvnrepository.com/artifact/org.eclipse.emf/org.eclipse.emf.codegen
... Version 2.14 is actually very recent (Sept. 2018).
Xtext guys, do you confirm that before version 2.14, no dependency to eclipse core runtime version 3.14.0 was set?
EMF 2.15 and thus
org.eclipse.emf:org.eclipse.emf.codegen:2.14.0 where published on September 14th. the newer emf version has these new dependencies. All Xtext versions < 2.15 automatically pull the new emf version. if you want to avoid that you can switch back to emf 2.12 / codegen 2.11 should solve that issues (https://github.com/eclipse/xtext-core/blob/v2.15.0/gradle/versions.gradle)

What is a maven repository url for jung2 (java graph framework)?

I am looking for a maven repository that distributes jung2 packages. Unfortunetely I can not find any information on its location.
Update:
I have included the cental repository repo1.
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
But I still get an error: 10/4/10 1:31:57 PM CEST: Missing artifact net.sf.jung:jung2:jar:2.0.1:compile. I use Maven 3.0-SNAPSHOT on Mac osX.
Update2: Declaration of Jung2 dependency:
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung2</artifactId>
<version>2.0.1</version>
<type>pom</type>
</dependency>
After adding pom, there is no error message. Unfortunetely maven does not retrieve jars of jung2 modules.
[Solved] I have added also a dependency to jung-graph-impl and I can now use jung2 in my project:
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung-graph-impl</artifactId>
<version>2.0.1</version>
</dependency>
On repo1 :
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung2</artifactId>
<version>2.0.1</version>
</dependency>
Resources :
mvnrepository.com - Jung 2
You need to add this to the pom.xml. This work with maven central. No need to specify repository. But you can still use <url>http://maven.apache.org</url> directly in your pom.xml.
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung2</artifactId>
<version>2.0.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung-graph-impl</artifactId>
<version>2.0.1</version>
</dependency>
What is a maven repository url for jung2 (java graph framework)?
Answer: The Central Repository and its mirrors
But generally, you experiencied issue with dependencies.
To make your project buildable with Jung2 library, add specific modules (not jung2) to your pom.xml.
Example:
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung-graph-impl</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung-algorithms</artifactId>
<version>2.0.1</version>
</dependency>
See the list of the modules http://mvnrepository.com/artifact/net.sf.jung
Adding the following:
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung2</artifactId>
<version>2.0.1</version>
<type>pom</type>
</dependency>
will not work in the way one could expect.
The reason is declaration of modules inside of profiles in pom.xml for jung2 artifact:
<profiles>
<profile>
<id>all</id>
<activation>
<property>
<name>all</name>
</property>
</activation>
<modules>
<module>jung-api</module>
<module>jung-graph-impl</module>
<module>jung-algorithms</module>
<module>jung-io</module>
<module>jung-visualization</module>
<module>jung-samples</module>
<module>jung-jai</module>
<module>jung-jai-samples</module>
<module>jung-3d</module>
<module>jung-3d-demos</module>
.............
</profiles>
Try Maven Repository or Maven Repository Browser.

Hibernate confusion. What are the differences between ga, GA and Final Releases? Compatibility? Repository?

Can anyone please explain:
1. The difference between ga, GA and Final Hibernate releases?
2. Should I use the maven repository or the jboss nexus repository?
3. Why does the latest compatibility matrix (http://community.jboss.org/wiki/HibernateCompatibilityMatrix) not list anything higher than 3.2.6GA?
I'm using the following versions and I'm having the hardest time trying to figure out if I should upgrade:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.6.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.3.1.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<version>3.2.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.0.0.ga</version>
</dependency>
The difference between ga, GA and Final Hibernate releases?
Final is the "new" JBoss convention and replaces the old GA (for General Availability) convention.
Should I use the maven repository or the jboss nexus repository?
Ultimate versions of JBoss artifacts might not be available in the central repository. If you want to use ultimate versions (e.g. Hibernate 3.5.3-Final), use the JBoss Nexus repository.
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public</url>
</repository>
</repositories>
Why does the latest compatibility matrix not list anything higher than 3.2.6GA?
Well, for versions prior to 3.5, it does!
As of version 3.5.x versions, there is no need for the compatibility matrix anymore since Hibernate Core, Hibernate Annotations and Hibernate EntityManager are released together.
I'm using the following versions and I'm having the hardest time trying to figure out if I should upgrade:
If you want to use the ultimate JPA 1.0 version of Hibernate Entity Manager, simply declare the following:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.4.O.GA</version>
</dependency>
And you will get other artifacts transitively.

Categories