• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse Project Dependencies etc

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone tell me exactly what is the purpose of "project references" in Eclipse. I'm setting up project dependencies and I'm going through what seems to me a whole ceremony. I'd really like some literature that explains what all these do. I'm seeing alot of literature that says what to do but not why it is done and what it does behind the scenes.

Project Dependencies,
Java Build Path/Projects
Java Build Path/Order and Export

Also, why in addition to these do I have to
add folders in the Server Properties and
modify the application.xml?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I feel your pain, Nadine. Let's move this over to our IDEs, Version Control, and other tools forum and see what people have to say.

Tim?
 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nadine, my main use for this is having one or two core projects. The ones that hold all my main business logic and data structures (read beans). Plus all the Hibernate related hbm files.

All my projects then include a core project. These projects then become basically just front ends and controller to implement some functionality. This allows me to:

-Easily add mature code to a new project
-Keep the core code in a CVS repository separate from the actual applications. This makes it really easy to modify core code, to work in teams and to quickly propagate these changes throught all projects.
-Keep a standard set of data structure and tools throughout my applications
-Establish a place to put commonly used code (classes used too often are moved to the core project [Eclipse refactors all references to them])

Hope that helps.
 
Nadine McKenzie
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The reason why I was asking these questions is because my problem actually goes deeper. I have (say for the sake of simplicity) 3 projects. myWeb, coreWeb and myEar. Both use struts 1.1 and this jar is in the lib of each project. When I set up project dependencies, there are no build errors, however, I am seeing a runtime error:


RpeRequestProcessor sits in myWeb and extends CoreRequestProcessor which sits in coreWeb. CoreRequestProcessor extends TilesRequestProcessor.

myWeb has Project References to coreWeb, and myEar.
myWeb's Java Build Path has coreWeb checked
myWeb's Order and Export has struts.jar and coreWeb checked (and in this order)

myEar has Project References to myWeb only.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nadine,
The classloader problem has to do with your server settings. The war project has an incorrect classloader policy associated with it.

Are you using WSAD or Eclipse? If WSAD, you can change this in the server perspective. If Eclipse, it depends on your plugin/server.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone. I am trying to do the following. Can anybody help?

The scenario that I want is:
  • Project A produces a JAR file. This can be done using Eclipse or an integrated Ant task.
  • Project B, C, and D each produce a WAR. They depend on the JAR from project A. If it does not exist, Eclipse will build project A first.



  • I know how to do it so that the actual .class files from project A will be included in B.war, C.war, and D.war, but this produces bloat that I would like to avoid.

    Any suggestions?

    Sincerely,
    Matt

    P.S. Because I am running on a new Intel MacBook Pro, I have to use the latest betas of Eclipse IDE and Web Tools Project (WTP). This is 3.2 and 1.5, respectively. Hope that's not a big problem :-)
    [ April 10, 2006: Message edited by: Matt Solnit ]
     
    Jeanne Boyarsky
    author & internet detective
    Posts: 41860
    908
    Eclipse IDE VI Editor Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Matt,
    Why not put the jar from Project A into your WEB-INF/lib directory for the other projects?
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic