Re: including restlet in a maven project
Great, this worked for me... got 2.0-m6, although I had to use the instructions to manually download it into my local repository. Thanks. Marc On Tue, Jan 19, 2010 at 1:31 PM, Ben R Vesco bve...@gmail.com wrote: Also that referenced page might not reflect the new structure. You won't find anything newer than M5 in the old groupId of org.restlet. Instead, use the group id for the edition you are using such as org.restlet.jse or org.restlet.j2e and so on. Then you can get the M6 and newer releases. On Tue, Jan 19, 2010 at 1:15 PM, Rhett Sutphin rh...@detailedbalance.net wrote: Hi Marc, On Jan 19, 2010, at 3:13 PM, Marc Limotte wrote: I need to use restlet in a project which is managed by Maven2. I'm not too familiar with Maven, but I think I need a POM file for restlet, and I don't see one in the maven central repository. Is there a repo available with restlet (2.0-r6) in it? Alternatively, I thought I could add it to my local repo. I found this script (below) in the restlet mailing list archives, but it's quite old and seems to depend on POM files coming with the restlet distribution (under lib/poms), and there is no such directory in the dist that I downloaded. What's the easiest way to do this? http://www.restlet.org/downloads/maven Rhett Marc -Message d'origine- De : news [EMAIL PROTECTED] De la part de Vincent Envoyé : jeudi 18 janvier 2007 20:36 À : discuss@restlet.tigris.org Objet : Script to install a Restlet distribution into a maven2 repository Hi all, I use this bash script to upgrade my local maven2 repository each time a new version of Restlet comes up. Some of you might find it useful. -Vincent. #!/bin/bash # # This script installs a Restlet disrtribution into a local (filesystem) # maven2 repository. # # Usage: restlet2mvn.bsh path to Restlet distribution path to local maven repository # if [ $# -le 1 ]; then echo Usage: restlet2mvn.bsh path to Restlet distribution path to local maven repository exit 1; fi RESTLET_DIST=$1 MAVEN_REPOSITORY=$2 MVN=mvn if [ ! -e $RESTLET_DIST ] then echo Restlet distribution not found: $RESTLET_DIST exit 1; fi if [ ! -e $MVN_REPO ] then echo Maven repository not found: $MVN_REPO exit 1; fi LIB_DIR=$RESTLET_DIST/lib POMS_DIR=$RESTLET_DIST/lib/poms poms=`ls $POMS_DIR/*.pom` for pom in $poms do # restlet/lib/poms/foo.pom - restlet/lib/foo.jar jar=`echo $pom | sed s/.pom$/.jar/g | sed s/poms\\\///g` if [ -e $jar ] then # Extract the group, artifact id, and version number from the POM: # We assume that the first groupId, artifactId, version tags found in the pom # contain the module's group id, artifact id, and version #. # This will break if the pom contains commented out tags: # groupIdfoo.groupId # !-- artifactIdbar/artifactId -- # artifactIdbar/artifactId # versio1.0/version group=` grep --regexp 'groupId.*/groupId' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` artifact=` grep --regexp 'artifactId.*/artifactId' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` version=` grep --regexp 'version.*/version' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` # Now deploy the module $MVN deploy:deploy-file -DgroupId=$group \ -DgeneratePom=false \ -DpomFile=$pom \ -DartifactId=$artifact \ -Dversion=$version \ -Dpackaging=jar \ -Dfile=$jar \ -DrepositoryId=local-repository \ -Durl=file://$MAVEN_REPOSITORY fi done exit -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2440449 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2440453 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2440648
Re: including restlet in a maven project
Hello, Marc Limotte wrote: Great, this worked for me... got 2.0-m6, although I had to use the instructions to manually download it into my local repository. You can also add the repository to your POM: repositories repository idrestlet/id namePublic online Restlet repository/name urlhttp://maven.restlet.org/url /repository /repositories Best wishes, Bruno. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2440682
including restlet in a maven project
I need to use restlet in a project which is managed by Maven2. I'm not too familiar with Maven, but I think I need a POM file for restlet, and I don't see one in the maven central repository. Is there a repo available with restlet (2.0-r6) in it? Alternatively, I thought I could add it to my local repo. I found this script (below) in the restlet mailing list archives, but it's quite old and seems to depend on POM files coming with the restlet distribution (under lib/poms), and there is no such directory in the dist that I downloaded. What's the easiest way to do this? Marc -Message d'origine- De : news [EMAIL PROTECTED] De la part de Vincent Envoyé : jeudi 18 janvier 2007 20:36 À : discuss@restlet.tigris.org Objet : Script to install a Restlet distribution into a maven2 repository Hi all, I use this bash script to upgrade my local maven2 repository each time a new version of Restlet comes up. Some of you might find it useful. -Vincent. #!/bin/bash # # This script installs a Restlet disrtribution into a local (filesystem) # maven2 repository. # # Usage: restlet2mvn.bsh path to Restlet distribution path to local maven repository # if [ $# -le 1 ]; then echo Usage: restlet2mvn.bsh path to Restlet distribution path to local maven repository exit 1; fi RESTLET_DIST=$1 MAVEN_REPOSITORY=$2 MVN=mvn if [ ! -e $RESTLET_DIST ] then echo Restlet distribution not found: $RESTLET_DIST exit 1; fi if [ ! -e $MVN_REPO ] then echo Maven repository not found: $MVN_REPO exit 1; fi LIB_DIR=$RESTLET_DIST/lib POMS_DIR=$RESTLET_DIST/lib/poms poms=`ls $POMS_DIR/*.pom` for pom in $poms do # restlet/lib/poms/foo.pom - restlet/lib/foo.jar jar=`echo $pom | sed s/.pom$/.jar/g | sed s/poms\\\///g` if [ -e $jar ] then # Extract the group, artifact id, and version number from the POM: # We assume that the first groupId, artifactId, version tags found in the pom # contain the module's group id, artifact id, and version #. # This will break if the pom contains commented out tags: # groupIdfoo.groupId # !-- artifactIdbar/artifactId -- # artifactIdbar/artifactId # versio1.0/version group=` grep --regexp 'groupId.*/groupId' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` artifact=` grep --regexp 'artifactId.*/artifactId' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` version=` grep --regexp 'version.*/version' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` # Now deploy the module $MVN deploy:deploy-file -DgroupId=$group \ -DgeneratePom=false \ -DpomFile=$pom \ -DartifactId=$artifact \ -Dversion=$version \ -Dpackaging=jar \ -Dfile=$jar \ -DrepositoryId=local-repository \ -Durl=file://$MAVEN_REPOSITORY fi done exit -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2440448
Re: including restlet in a maven project
Hi Marc, On Jan 19, 2010, at 3:13 PM, Marc Limotte wrote: I need to use restlet in a project which is managed by Maven2. I'm not too familiar with Maven, but I think I need a POM file for restlet, and I don't see one in the maven central repository. Is there a repo available with restlet (2.0-r6) in it? Alternatively, I thought I could add it to my local repo. I found this script (below) in the restlet mailing list archives, but it's quite old and seems to depend on POM files coming with the restlet distribution (under lib/poms), and there is no such directory in the dist that I downloaded. What's the easiest way to do this? http://www.restlet.org/downloads/maven Rhett Marc -Message d'origine- De : news [EMAIL PROTECTED] De la part de Vincent Envoyé : jeudi 18 janvier 2007 20:36 À : discuss@restlet.tigris.org Objet : Script to install a Restlet distribution into a maven2 repository Hi all, I use this bash script to upgrade my local maven2 repository each time a new version of Restlet comes up. Some of you might find it useful. -Vincent. #!/bin/bash # # This script installs a Restlet disrtribution into a local (filesystem) # maven2 repository. # # Usage: restlet2mvn.bsh path to Restlet distribution path to local maven repository # if [ $# -le 1 ]; then echo Usage: restlet2mvn.bsh path to Restlet distribution path to local maven repository exit 1; fi RESTLET_DIST=$1 MAVEN_REPOSITORY=$2 MVN=mvn if [ ! -e $RESTLET_DIST ] then echo Restlet distribution not found: $RESTLET_DIST exit 1; fi if [ ! -e $MVN_REPO ] then echo Maven repository not found: $MVN_REPO exit 1; fi LIB_DIR=$RESTLET_DIST/lib POMS_DIR=$RESTLET_DIST/lib/poms poms=`ls $POMS_DIR/*.pom` for pom in $poms do # restlet/lib/poms/foo.pom - restlet/lib/foo.jar jar=`echo $pom | sed s/.pom$/.jar/g | sed s/poms\\\///g` if [ -e $jar ] then # Extract the group, artifact id, and version number from the POM: # We assume that the first groupId, artifactId, version tags found in the pom # contain the module's group id, artifact id, and version #. # This will break if the pom contains commented out tags: # groupIdfoo.groupId # !-- artifactIdbar/artifactId -- # artifactIdbar/artifactId # versio1.0/version group=` grep --regexp 'groupId.*/groupId' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` artifact=` grep --regexp 'artifactId.*/artifactId' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` version=` grep --regexp 'version.*/version' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` # Now deploy the module $MVN deploy:deploy-file -DgroupId=$group \ -DgeneratePom=false \ -DpomFile=$pom \ -DartifactId=$artifact \ -Dversion=$version \ -Dpackaging=jar \ -Dfile=$jar \ -DrepositoryId=local-repository \ -Durl=file://$MAVEN_REPOSITORY fi done exit -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2440449
Re: including restlet in a maven project
Also that referenced page might not reflect the new structure. You won't find anything newer than M5 in the old groupId of org.restlet. Instead, use the group id for the edition you are using such as org.restlet.jse or org.restlet.j2e and so on. Then you can get the M6 and newer releases. On Tue, Jan 19, 2010 at 1:15 PM, Rhett Sutphin rh...@detailedbalance.net wrote: Hi Marc, On Jan 19, 2010, at 3:13 PM, Marc Limotte wrote: I need to use restlet in a project which is managed by Maven2. I'm not too familiar with Maven, but I think I need a POM file for restlet, and I don't see one in the maven central repository. Is there a repo available with restlet (2.0-r6) in it? Alternatively, I thought I could add it to my local repo. I found this script (below) in the restlet mailing list archives, but it's quite old and seems to depend on POM files coming with the restlet distribution (under lib/poms), and there is no such directory in the dist that I downloaded. What's the easiest way to do this? http://www.restlet.org/downloads/maven Rhett Marc -Message d'origine- De : news [EMAIL PROTECTED] De la part de Vincent Envoyé : jeudi 18 janvier 2007 20:36 À : discuss@restlet.tigris.org Objet : Script to install a Restlet distribution into a maven2 repository Hi all, I use this bash script to upgrade my local maven2 repository each time a new version of Restlet comes up. Some of you might find it useful. -Vincent. #!/bin/bash # # This script installs a Restlet disrtribution into a local (filesystem) # maven2 repository. # # Usage: restlet2mvn.bsh path to Restlet distribution path to local maven repository # if [ $# -le 1 ]; then echo Usage: restlet2mvn.bsh path to Restlet distribution path to local maven repository exit 1; fi RESTLET_DIST=$1 MAVEN_REPOSITORY=$2 MVN=mvn if [ ! -e $RESTLET_DIST ] then echo Restlet distribution not found: $RESTLET_DIST exit 1; fi if [ ! -e $MVN_REPO ] then echo Maven repository not found: $MVN_REPO exit 1; fi LIB_DIR=$RESTLET_DIST/lib POMS_DIR=$RESTLET_DIST/lib/poms poms=`ls $POMS_DIR/*.pom` for pom in $poms do # restlet/lib/poms/foo.pom - restlet/lib/foo.jar jar=`echo $pom | sed s/.pom$/.jar/g | sed s/poms\\\///g` if [ -e $jar ] then # Extract the group, artifact id, and version number from the POM: # We assume that the first groupId, artifactId, version tags found in the pom # contain the module's group id, artifact id, and version #. # This will break if the pom contains commented out tags: # groupIdfoo.groupId # !-- artifactIdbar/artifactId -- # artifactIdbar/artifactId # versio1.0/version group=` grep --regexp 'groupId.*/groupId' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` artifact=` grep --regexp 'artifactId.*/artifactId' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` version=` grep --regexp 'version.*/version' --max-count=1 $pom | sed 's/[[:space:]]*[^]*[[:space:]]*//g' ` # Now deploy the module $MVN deploy:deploy-file -DgroupId=$group \ -DgeneratePom=false \ -DpomFile=$pom \ -DartifactId=$artifact \ -Dversion=$version \ -Dpackaging=jar \ -Dfile=$jar \ -DrepositoryId=local-repository \ -Durl=file://$MAVEN_REPOSITORY fi done exit -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2440449 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2440453