Google Groups Home
Help | Sign in
Recent pages and files
Maven url handler    

Introduction


Maven URL handler implements the specs from OSGi URl Handlers Service and registers a service that handles url's as:

    mvn://repository/groupId/artifactId/version/type?instructions      


Where:

  • repository - is the repostory from where the artifact to be downloaded.If values is localrepo it  means that the value is from the local repository on the machine osgi evevironment is running;
  • groupId - is the groups id of the maven artifact
  • artifactId - is the artifact id
  • version - artifact's version
  • type - artifacts type. not mandatory. if not present defaults to jar
  • instructions - not mandatory. currently not supported

How to install it

  • download maven-embedder.osgi and unpack into ${spring-osgi-source-home}/spring-modules/spring-required-libraries
  • download spring-osgi-maven and unpack into ${spring-osgi-source-home}
  • download http://www.apache.org/dist/maven/binaries/maven-embedder-2.0.4-dep.jar into a temporary location. Open a command prompt an go folder containing the downloaded file and run the following:
    mvn install:install-file -Dfile=maven-embedder-2.0.4-dep.jar -DgroupId=org.apache.maven -DartifactId=maven-embedder -Dversion=2.0.4-dep -Dpackaging=jar
  • go to ${spring-osgi-source-home}/spring-modules/spring-required-libraries/maven-embedder.osgi and run:
    mvn clean install
  • go to ${spring-osgi-source-home}/spring-osgi-maven and run 
    mvn clean install

How to run it:

  • start your preferred osgi implementation
  • install & start maven-embedder.osgi and spring-osgi-maven
    • E.g. in Equinox:
      install file:${local-repository-path}\org\springframework\osgi\maven-embedder.osgi\2.0.4-SNAPSHOT\maven-embedder.osgi-2.0.4-SNAPSHOT.jar 
      start 1
      install file:${local-repository-path}\org\springframework\osgi\spring-osgi-maven\1.0-SNAPSHOT\spring-osgi-maven-1.0-SNAPSHOT.jar
      start 2
    • Where ${local-repository-path} is the path to your maven local repository
  • test it by loading any of the bundles that you already have in the local repository using the url above.
    • E.g. in Equinox:
      install mvn://localrepo/org.springframework.osgi/asm.osgi/2.2.2-SNAPSHOT


 

Version: 
Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google