Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Set up a local directory as a repository
Set up a local directory as a repository [message #715542] Sun, 14 August 2011 12:54 Go to next message
paulvitic  is currently offline paulvitic Friend
Messages: 4
Registered: August 2011
Junior Member
My application bundles require import a set of bundles. This is a set of bundles that my applications use commonly and the versions rarely change. Therefore rather than installing these I would like to keep them in a directory (a local directory currently and later I would probably set up a remote directory).

I also do not want to modify the repositories of Virgo default installation.

Therefore I tried to set up a separate repository for this set of bundle applications.

I edited the virgo/config/org.eclipse.virgo.repository.properties file as follows:


ext.type=external
ext.searchPattern=repository/ext/{artifact}

usr.type=watched
usr.watchDirectory=repository/usr

osgi-samples.type=watched
osgi-samples.watchDirectory=repository/osgi-samples

chain=ext,usr,osgi-samples

And put the relevant bundles in the "virgo/repository/osgi-samples" directory.

I restarted the server but my application bundles could not resolve the packages in the bundles in "virgo/repository/osgi-samples" directory.

What am I doing wrong.

Thanks,
Paul
Re: Set up a local directory as a repository [message #715607 is a reply to message #715542] Sun, 14 August 2011 19:58 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

I guess you specified the clean flag?

startup -clean
Re: Set up a local directory as a repository [message #715675 is a reply to message #715607] Mon, 15 August 2011 07:02 Go to previous messageGo to next message
paulvitic  is currently offline paulvitic Friend
Messages: 4
Registered: August 2011
Junior Member
I tried

startup -clean

but my application bundles still can not resolve the bundles I place in "repository/osgi-samples" directory. Anyway in the startup log I dont see these bundles being loaded either. I tried to change the org.eclipse.virgo.repository.properties file slightly:


ext.type=external
ext.searchPattern=repository/ext/{artifact}

usr.type=watched
usr.watchDirectory=repository/usr

osgi-samples.type=external
osgi-samples.searchPattern=repository/ext/osgi-samples/**/*.jar

chain=ext,usr,osgi-samples


still the same result...
Re: Set up a local directory as a repository [message #715711 is a reply to message #715675] Mon, 15 August 2011 09:24 Go to previous messageGo to next message
Chris Frost is currently offline Chris FrostFriend
Messages: 230
Registered: January 2010
Location: Southampton, England
Senior Member

Hi,

I just did this on 3.0.0.M06 and it worked for me. I moved the bundles for the admin console to a new 'repository/osgi-samples' directory and changed my config file to the following.

ext.type=external
ext.searchPattern=repository/ext/{artifact}

usr.type=watched
usr.watchDirectory=repository/usr

osgi-samples.type=watched
osgi-samples.watchDirectory=repository/osgi-samples

chain=ext,usr,osgi-samples


It worked fine, found the files in the new repo and started them up. What version of Virgo are you using and how are you deploying the bundles that use the packages in the new repo folder?

Chris.


------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
Re: Set up a local directory as a repository [message #715864 is a reply to message #715711] Mon, 15 August 2011 19:53 Go to previous messageGo to next message
paulvitic  is currently offline paulvitic Friend
Messages: 4
Registered: August 2011
Junior Member
I am using 2.1.1.RELEASE. I am deploying the application bundles via the admin console.

What do you mean when you say "I moved the bundles for the admin console"?

Here is my scenario exactly:
Lets say I have a bundle named demo.jar. This bundle is dependent on core.jar. When I install these two jars via the admin console everything works fine.

Than I try the repo configuration above and I put core.jar under repository/osgi-samples directory.

I clean start Virgo and install only demo.jar via admin console. Bundle demo.jar can not resolve the packages in core.jar...
Re: Set up a local directory as a repository [message #716072 is a reply to message #715864] Tue, 16 August 2011 12:03 Go to previous message
Chris Frost is currently offline Chris FrostFriend
Messages: 230
Registered: January 2010
Location: Southampton, England
Senior Member

I used the admin console to test it out. I moved the bundles it depends on to the new repository folder then deployed the app from pickup to see if they got pulled in. I just tried it on 2.1.1 and it is working fine for me.

To cover all the obvious stuff. Can you try this on a clean unzip of 2.1.1, if you haven't already. Double check the manifests in the built jar files that demo.jar really does import form core.jar.

If we still haven't got a solution could you raise a Bugzilla and attache the jar files. I'm going to need to look at this closer to figure out what is going wrong. If it makes you feel better, you are doing everything right from what I can see and this should be working.

Chris.



------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
Previous Topic:Is there a basic web application example out there?
Next Topic:Virgo + EclipseLink JPA + Weaving + Spring
Goto Forum:
  


Current Time: Tue Dec 23 04:25:08 GMT 2014

Powered by FUDForum. Page generated in 0.01676 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software