Reputation: 1470
I've got two packages - one called jhdf and another is the src. My main is located in src. However my POM.XML keeps giving me the error after I run mvn compile
: The POM for jhdf is missing, no dependency information available
And I'm pretty sure that is the reason why I get the second error: Failed to execute goal on project test: Could not resolve dependencies for project edu.cs.test:0.3-SNAPSHOT: Could not find artifact edu.cs.jhdf:jhdf:jar:0.1-SNAPSHOT in osgeo (http://download.osgeo.org/webdav/geotools/)
Here is my POM.XML file (If you notice I do have my jhdf dependency listed):
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.cs.test</groupId>
<artifactId>test</artifactId>
<version>0.3-SNAPSHOT</version>
<repositories>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
</repositories>
<properties>
<!--added new-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<geotools.version>19-SNAPSHOT</geotools.version>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<geotools.version>17.0</geotools.version>
<hadoop.version>2.8.0</hadoop.version>
</properties>
<dependencies>
<!--added new-->
<!--<dependency>-->
<!--<groupId>it.geosolutions.imageio-ext</groupId>-->
<!--<artifactId>imageio-ext-jhdfaccess</artifactId>-->
<!--<version>1.0.8</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>io.jhdf</groupId>-->
<!--<artifactId>jhdf</artifactId>-->
<!--<version>0.3.0</version>-->
<!--</dependency>-->
<dependency>
<groupId>edu.cs.jhdf</groupId>
<artifactId>jhdf</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.geotools/gt-shapefile -->
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geotiff</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-image</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId>
<version>${geotools.version}</version>
</dependency>
<!-- The following two artifacts are added to be able to read files directly from HDFS (in the future) -->
<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-hdfs -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<version>${hadoop.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>javax.media</groupId>
<artifactId>jai_core</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
What am I doing wrong? I've tried to look at similar questions like [this] one - but no luck. Anything would help, thanks!
Upvotes: 0
Views: 632
Reputation: 8544
It looks like you've removed the dependency "io.jhdf:jhdf:0.3.0" which is available on the maven central repository at https://repo1.maven.org/maven2/io/jhdf/jhdf/0.3.0/
And replaced it with "edu.ucr.cs.jhdf:jhdf:jar:0.1-SNAPSHOT" which is not available on the osgeo repository, so the artifact which you are looking for hasn't been published there.
I also noticed that the osgeo repo doesn't have an edu/ucr path, but does have
http://download.osgeo.org/webdav/geotools/edu/ucar/
Try going back to the maven central artifact like this
<!--added new-->
<!--<dependency>-->
<!--<groupId>it.geosolutions.imageio-ext</groupId>-->
<!--<artifactId>imageio-ext-jhdfaccess</artifactId>-->
<!--<version>1.0.8</version>-->
<!--</dependency>-->
<dependency>
<groupId>io.jhdf</groupId>
<artifactId>jhdf</artifactId>
<version>0.3.0</version>
</dependency>
<!--
<dependency>
<groupId>edu.ucr.cs.jhdf</groupId>
<artifactId>jhdf</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
-->
Upvotes: 1