Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sharing External Jar files between projects

 
Mainak Goswami
Ranch Hand
Posts: 52
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to explore options to reduce my disk space during development and reuse the referencing of the external jar files from a common location.
I am using Eclipse and Weblogic application server and trying to deploy a small dynamic web application. I have created a 3rdParty project folder with a lib folder which will contain all the necessary jar files.
Question: Is there a possibility to refer my Web Application jar files to the 3rd Party project folder during development and deployment?
Applications Used:
Eclipse
Weblogic 11g running on Windows


Structure:
Project1:
3rdParty
|- lib
|- Struts-Core2.jar
|- xwork-core.jar etc....

Project2:
MyWebApp
|-src
|- Webcontent
|- jsp
|- WEB-INF
|- lib ( No Jars included)

In eclipse I have tried to reference the project1 jar files to Project2 WEB-INF/lib files by using Deployment Assembly -> Project1(Source) ->WEB-INF/lib(Deploy Path in project2). However I am not sure if this is the correct way of doing. I am still getting some errors in my jsp file as it is unable to find struts-core2.jar which is present in the Project1 folder.
Can you please help?
Thanks in advance.
 
Paul Clapham
Sheriff
Pie
Posts: 20771
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mainak Goswami wrote:I am trying to explore options to reduce my disk space during development.


Why? That seems like it's going to waste a lot of your time (you already presented the evidence that it's doing that) for no reason. Surely you aren't about to run out of disk space on your development machine?
 
Mainak Goswami
Ranch Hand
Posts: 52
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know it is not common practice to use a different lib reference other than WEB-INF\lib. But I guess definitely there is an option. I am doing it because if I use multiple projects then I can use the 3rdPartJar Projects lib folder for all future projects. In that way I can reuse the stuffs rather than using disk space unnecessarily.
Any help would be appreciated for this option.
Thanks,
Mainak
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic