tags:

views:

31

answers:

2

I was wondering if it's possible to have a java package setup using a different subversion repository than the rest. Ideally, I would probably go with a different library project, but in the case of BlackBerry, the 3rd party library linking does not work well, so I would like to just separate my UI package into a different repository than the rest so that I can control the UI better for different OS versions, but leave all the other packages the same.

Is this possible?

+1  A: 

Absolutely possible. Just add the separate package to your Java path.

adum
Thank you very much.
sethxian
A: 

Sure, it shouldn't be a problem at all.

There are a number of approaches...

  • You could sync to different secondary repositories in the same location (so only one set of UI classes with be avaliable at once). I think this would be hard to maintain.
  • you could change your classpath to point to the set of classes you want to use (all the classes would be in the same repository, you would just compile against different ones.
  • You could include all of them in your classpath and reflectively instantiate one, using interfaces (described below)

No matter how you do it, I suggest you define a set of interfaces in your main project and only refer to your objects through those interfaces--then in each of your partial projects you implement those interfaces. In this way if you change the way you link you don't have to make any code changes...

In order to get your initial instances of those objects use a factory/reflection...

Bill K
Thank you very much.
sethxian