user1709680
user1709680

Reputation: 13

Download jar from maven repository without using Maven

I am looking for a library that can help me with K-means Vector Quantization. I found a website that offered hope.

http://www.lab4inf.fh-muenster.de/lab4inf/Lab4Drools/dependencies.html

The Lab4Math-1.0.5.jar has the required KmeansQuantization class.

But as see you from the first link, there is no direct download link for the "Lab4Math-1.0.5.jar". Instead a maven repository is specified. http://www.lab4inf.fh-muenster.de/lab4inf/maven-repository

Since iam a mobile app developer, i dont use Maven. I am looking for a way to download the jar in any other way. Please help.

Upvotes: 0

Views: 411

Answers (2)

lboullo0
lboullo0

Reputation: 772

I was able to download the mentioned jar using the following pom.xml

    <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>com.demo</groupId>
  <artifactId>demo</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>tf</name>
  <description>Testing Lab4Math</description>

  <repositories>
    <repository>
      <id>Lab4Inf</id>
      <url>http://www.lab4inf.fh-muenster.de/lab4inf/maven-repository</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
        <groupId>de.lab4inf</groupId>
        <artifactId>Lab4Math</artifactId>
        <version>2.0.5-SNAPSHOT</version>
    </dependency> 

  </dependencies>

</project>

Note that the only important difference with the accepted answer is the version of the library. (2.0.5-SNAPSHOT instead of 1.0.5)

Upvotes: 0

Mark O&#39;Connor
Mark O&#39;Connor

Reputation: 78021

Looks like there is a problem with the repository:

[ERROR] Failed to execute goal on project demo: Could not resolve dependencies for project com.demo:demo:jar:1.0-SNAPSHOT: 
Failed to collect dependencies for [de.lab4inf:Lab4Math:jar:1.0.5 (compile)]: 
Failed to read artifact descriptor for de.lab4inf:Lab4Math:jar:1.0.5: 
Could not transfer artifact de.lab4inf:Lab4Math:pom:1.0.5 from/to 
Lab4Inf (http://www.lab4inf.fh-muenster.de/lab4inf/maven-repository): 
Access denied to: http://www.lab4inf.fh-muenster.de/lab4inf/maven-repository/de/lab4inf/Lab4Math/1.0.5/Lab4Math-1.0.5.pom , 
ReasonPhrase:Forbidden. -> [Help 1]

Tried to retrieve the module metadata file and got a HTTP 403 error....

I was trying to follow the instructions for integrating Math4Lab and discovered it's out of date. Maven 3 forces the specification of a dependency version number and there is a little note at the bottom:

... This way you will have always the newest versions, if snapshots are enabled. At present no final Lab4Math version is available.

My conclusion is that this software is abandonware...

Example

<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.demo</groupId>
   <artifactId>demo</artifactId>
   <version>1.0-SNAPSHOT</version>
   <dependencies>
      <dependency>
         <groupId>de.lab4inf</groupId>
         <artifactId>Lab4Math</artifactId>
         <version>1.0.5</version>
      </dependency>
   </dependencies>
   <repositories>
      <repository>
         <id>Lab4Inf</id>
         <url>http://www.lab4inf.fh-muenster.de/lab4inf/maven-repository</url>
      </repository>
   </repositories>
</project>

Upvotes: 1

Related Questions