This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Linking projects to other source code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Linking projects to other source code" Watch "Linking projects to other source code" New topic
Author

Linking projects to other source code

Jeff Storey
Ranch Hand

Joined: Apr 07, 2007
Posts: 230
Hi,

I have a couple of projects that I'm working on in Eclipse (or any IDE, so I don't want to depend on specific eclipse dependency maven capabilities). Some projects depend on other projects. Typically in Eclipse I would add the projects as references to other projects, but I'm not sure how to handle this when using Maven. In the deployment environment, there will be jars created and the maven build can pull the latest jars from the repository. Is there a way to reference another project's source code using maven while in the dev environment?

I have this scenario:
Project A depends on B

I need to make a change to B and that will require an update to A. I don't want to make the change to B and check it in without checking in A since that will break A. And I would like to manage these dependencies through Maven -- any help would be appreciated.

thanks,
Jeff
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

Install the m2eclpise plugin - then a project can easily reference anything in the Maven repository. I have a lot more hair on my head after installing this plugin...


JBoss In Action
Jeff Storey
Ranch Hand

Joined: Apr 07, 2007
Posts: 230
Thanks Peter. I had been using the plugin, but what I didn't realize is that it will try and resolve the dependency in the workspace before hitting the repository. Appreciate the help.

Jeff
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Linking projects to other source code
 
Similar Threads
Can some one please explain why do i need MAVEN here
Ant builds and dependent projects
Setting up and configuring Subversion and Bugzilla
What is the difference between including jar files in Lib folder and the Java Build Path of Eclipse
maven SCM project