Restlet Maven Dependencies

我怕爱的太早我们不能终老 提交于 2019-12-06 18:44:10

问题


Does anyone know what the RESTLET maven dependencies are?

None of the entries on the site work. I had to end up installing jars to make it work.


回答1:


add this repo:

<repositories>
    <repository>
        <id>maven-restlet</id>
        <name>Public online Restlet repository</name>
        <url>http://maven.restlet.org</url>
    </repository>
</repositories>

Then include dependencies with your version:

<dependency>
        <groupId>org.restlet.jee</groupId>
        <artifactId>org.restlet</artifactId>
        <version>${restlet.version}</version>
</dependency>

Use:

<properties>
    <restlet.version>2.0.14</restlet.version>
</properties>

to define restlet version or just put whichever version you like. Hope it helps!




回答2:


Sometimes, the maven dependencies are not downloaded automatically. You have to force it using mvn compile.

Here is a reference to sample restful service that uses following dependencies :

http://topjavatutorial.com/frameworks/spring/spring-rest/standalone-restful-service-using-restlet-framework/

    <dependency>
        <groupId>org.restlet.jse</groupId>
        <artifactId>org.restlet</artifactId>
        <version>2.1-RC2</version>
    </dependency>
    <dependency>
        <groupId>org.restlet.jse</groupId>
        <artifactId>org.restlet.ext.simple</artifactId>
        <version>2.1-RC2</version>
    </dependency>



回答3:


Use the given mirrors in this

These mirrors are up to date so no need to worry about the versions and so on..

Edit settings.xml in maven installation location to add mirrors.

<settings>
  <mirrors>
     <mirror>
       <id>mygrid-restlet</id>
       <url>http://www.mygrid.org.uk/maven/restlet/maven.restlet.org</url>
       <mirrorOf>maven-restlet</mirrorOf>
     </mirror>
  </mirrors>
 </settings>

assuming that the POMs using the original repository uses:

<repository>
   <id>maven-restlet</id>
   <name>Public online Restlet repository</name>
   <url>http://maven.restlet.org</url>
</repository>



回答4:


<!-- https://mvnrepository.com/artifact/com.softlayer.api/softlayer-api-client -->
<dependency>
    <groupId>com.softlayer.api</groupId>
    <artifactId>softlayer-api-client</artifactId>
    <version>0.1.0</version>
</dependency>


来源:https://stackoverflow.com/questions/11173761/restlet-maven-dependencies

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!