Home » Newcomers » Newcomers » How to organize third-party source code?
|
Re: How to organize third-party source code? [message #549787 is a reply to message #549779] |
Tue, 27 July 2010 23:25 |
|
On 2010.07.27 16:31, Peter wrote:
> Folks,
>
> I am an Eclipse newbie.
>
> In the application I am developing, I am using source code from other
> third-party developers. Let's call the third parties ABC and XYZ.
>
> The third-party source code gets updated rarely, perhaps once in six
> months.
>
> I would appreciate your help in organizing third-party projects.
>
> Let's assume the root of my workspace is d:\Dev.
> My thought is to keep third party stuff under d:\Dev\ISV.
>
> Note that ISV is just a subdirectory. There is no corresponding project
> called "ISV." Instead, we will have two projects. Project ABC resides at
> d:\Dev\ISV\ABC. Project XYZ resides at d:\Dev\ISV\XYZ.
>
> Is this the right way? Or, would you rather have your projects at
> d:\Dev\ABC and d:\Dev\XYZ? To me, having a subdirectory called "ISV" to
> keep all third-party stuff seems to make more sense.
>
> Thank you in advance for your help.
>
> Regards,
> Peter
You can put all the third-party sources under one project if you like.
This only complicates your ant build script in that you will probably
not want to dump the entire set of .class files into one JAR, but build
a separate JAR per part (ABC.jar, XYZ.jar, etc.)
|
|
|
Re: How to organize third-party source code? [message #549792 is a reply to message #549779] |
Tue, 27 July 2010 23:26 |
|
On 2010.07.27 16:31, Peter wrote:
> Folks,
>
> I am an Eclipse newbie.
>
> In the application I am developing, I am using source code from other
> third-party developers. Let's call the third parties ABC and XYZ.
>
> The third-party source code gets updated rarely, perhaps once in six
> months.
>
> I would appreciate your help in organizing third-party projects.
>
> Let's assume the root of my workspace is d:\Dev.
> My thought is to keep third party stuff under d:\Dev\ISV.
>
> Note that ISV is just a subdirectory. There is no corresponding project
> called "ISV." Instead, we will have two projects. Project ABC resides at
> d:\Dev\ISV\ABC. Project XYZ resides at d:\Dev\ISV\XYZ.
>
> Is this the right way? Or, would you rather have your projects at
> d:\Dev\ABC and d:\Dev\XYZ? To me, having a subdirectory called "ISV" to
> keep all third-party stuff seems to make more sense.
>
> Thank you in advance for your help.
>
> Regards,
> Peter
You can put all the third-party sources under one project if you like.
This only complicates your ant build script in that you will probably
not want to dump the entire set of .class files into one JAR, but build
a separate JAR per party (ABC.jar, XYZ.jar, etc.)
|
|
|
Re: How to organize third-party source code? [message #549949 is a reply to message #549779] |
Wed, 28 July 2010 14:32 |
Eric Rizzo Messages: 3070 Registered: July 2009 |
Senior Member |
|
|
On 7/27/10 6:31 PM, Peter wrote:
> Folks,
>
> I am an Eclipse newbie.
>
> In the application I am developing, I am using source code from other
> third-party developers. Let's call the third parties ABC and XYZ.
>
> The third-party source code gets updated rarely, perhaps once in six
> months.
>
> I would appreciate your help in organizing third-party projects.
>
> Let's assume the root of my workspace is d:\Dev.
> My thought is to keep third party stuff under d:\Dev\ISV.
>
> Note that ISV is just a subdirectory. There is no corresponding project
> called "ISV." Instead, we will have two projects. Project ABC resides at
> d:\Dev\ISV\ABC. Project XYZ resides at d:\Dev\ISV\XYZ.
>
> Is this the right way? Or, would you rather have your projects at
> d:\Dev\ABC and d:\Dev\XYZ? To me, having a subdirectory called "ISV" to
> keep all third-party stuff seems to make more sense.
>
> Thank you in advance for your help.
Do you have JARs of the third-party projects? That's usually how
libraries are distributed. If so, just create a lib/ folder in your
project(s) that need ABC and/or XYZ, put the JAR(s) in there, and then
edit your project's properties (Java Build Path) to include those JARs.
At first glance, it can seem logical to keep all third-party libraries
in a single place, but unless you keep multiple versions in the JAR file
names, that gets to be problematic; what happens if two different
projects need different versions of XYZ?
I also wrote about this a couple of days ago; see the forum topic titled
"Classpath Variables - Project Variables"
Hope this helps,
Eric
|
|
|
Re: How to organize third-party source code? [message #549961 is a reply to message #549949] |
Wed, 28 July 2010 14:39 |
|
On 7/28/2010 8:32 AM, Eric Rizzo wrote:
> [snip]Thank you in advance for your help.
>
> Do you have JARs of the third-party projects? That's usually how
> libraries are distributed. If so, just create a lib/ folder in your
> project(s) that need ABC and/or XYZ, put the JAR(s) in there, and then
> edit your project's properties (Java Build Path) to include those JARs.
>
> At first glance, it can seem logical to keep all third-party libraries
> in a single place, but unless you keep multiple versions in the JAR file
> names, that gets to be problematic; what happens if two different
> projects need different versions of XYZ?
>
> I also wrote about this a couple of days ago; see the forum topic titled
> "Classpath Variables - Project Variables"
>
> Hope this helps,
> Eric
No, I think his point was that he had sources. This isn't uncommon. Last
year, I was obliged to consume (open) sources directly for an Amazon 3S
API in order to gain pre-released functionality. That wasn't the first
time I had to do something like that for still other reasons.
There's no reason to create a project just so it can be home to a JAR or
two, but I don't think that's what he's doing.
Russ
|
|
|
Goto Forum:
Current Time: Fri Apr 26 13:44:57 GMT 2024
Powered by FUDForum. Page generated in 0.07882 seconds
|