1

I am using Maven pax plugin to start equinox container within which my osgi bundles should be deployed.As pax runner by default starts a felix container I have explicitly given instructions to start an equinox container. This is my pax plugin configuration in POM file

<plugin>
                <groupId>org.ops4j</groupId>
                <artifactId>maven-pax-plugin</artifactId>
                <version>1.4</version>
                <configuration>
                    <runnner>1.4.0</runnner>
                    <framework>equinox</framework>
                    <provision>
                        <param>--log=debug</param> 
                            <param>--definitionURL=file:C:\Users\661447\Desktop\Prime Workspace\OSGiDmHelloWorldProvider\platform.xml</param>               

                    </provision>
                </configuration>
            </plugin>

I have explicitly given the platform definition too. This is my platform.xml file

<platform>
    <name>Equinox 3.7.0</name>
    <system>
        http://mirror.netcologne.de/eclipse/equinox/drops/R-3.7-201106131736/org.eclipse.osgi_3.7.0.v20110613.jar
    </system>
    <profile name="minimal" default="true">
        <bundle>
            <name>OSGi Services</name>
            <url>
                http://mirror.netcologne.de/eclipse/equinox/drops/R-3.7-201106131736/org.eclipse.osgi.services_3.3.0.v20110513.jar
            </url>
        </bundle>
    </profile>
</platform>

Now, when I try to install the my bundle through the command "mvn install pax:provision", I am getting the following error

 -> Preparing framework [Equinox 3.8.1]
 -> loading definition from url file:C:/Users/661447/Desktop/Prime Workspace/OSG
iDmHelloWorldProvider/platform.xml
 -> Using platform definition [org.ops4j.pax.runner.platform.internal.PlatformDe
finitionImpl@a10ea2]
 -> Using working directory [runner]
 -> Downloading bundles...
 -> Download system package
 -> Downloading [http://mirror.netcologne.de/eclipse/equinox/drops/R-3.7-2011061
31736/org.eclipse.osgi_3.7.0.v20110613.jar]
 -> Creating new file at destination: C:\Users\661447\Desktop\Prime Workspace\OS
GiDmHelloWorldProvider\runner\bundles\-31806645.jar
 -> Equinox 3.7.0 : connecting...
         ___
        /  /
       /  / Oops, there has been a problem!
      /  /
     /__/   org.ops4j.pax.runner.platform.PlatformException: [http://mirror.netc
ologne.de/eclipse/equinox/drops/R-3.7-201106131736/org.eclipse.osgi_3.7.0.v20110
613.jar] could not be downloaded
    ___
   /__/

 -> Exception caught during execution:
java.lang.RuntimeException: org.ops4j.pax.runner.platform.PlatformException: [ht
tp://mirror.netcologne.de/eclipse/equinox/drops/R-3.7-201106131736/org.eclipse.o
sgi_3.7.0.v20110613.jar] could not be downloaded

Could someone help me out.? Thanks in advance

Maheshwaran K
  • 1,982
  • 5
  • 19
  • 22

1 Answers1

3

If you use proxy you have to define proxy system properties for pax-runner: http.proxyHost and http.proxyPort. Pax-Runner uses the proxy properties to resolve/download artifacts that described with http(s) urls.

Dmytro Pishchukhin
  • 2,369
  • 1
  • 14
  • 19
  • I have given the proxy settings in my settings.xml file as follows. Proxy true http my_username my_password [myHost] 8080 Is this right? – Maheshwaran K Mar 25 '13 at 04:57
  • 2
    these settings are only for maven. You use direct http links in your platform definition. try to run "mvn -Dhttp.proxyHost=... -Dhttp.proxyPort=... pax:provision" – Dmytro Pishchukhin Mar 25 '13 at 06:28
  • Thanks a lot!!! That worked!!! Great!! But why my command prompt shows this even though it starts the equinox container "Welcome to Apache Felix Gogo" and I have the Felix command input " g! " ???? – Maheshwaran K Mar 25 '13 at 08:16
  • the latest equinox versions use felix gogo shell by default – Dmytro Pishchukhin Mar 25 '13 at 11:30
  • Thank you very much for this!! One last thing. Is there any way to deploy osgi bundles into a running equinox environment? With the help of maven – Maheshwaran K Mar 25 '13 at 11:46