0

I can not use parent project with two child projects and drawing a dependency between the two child projects ..(problem with the CVS versioning)

Can anyone help me in finding 'Is there any other solution to have dependency between two individual projects When ever i try to build the Web project It should automatically build the java project and deploy the jar inton the web app lib and then builds the WAR'

sorry if my question looks dumb ..

Praneel PIDIKITI
  • 18,677
  • 13
  • 41
  • 60

3 Answers3

1

You could put the java project in the mvn repository and use this as a dependency in your web project.

dimitrisli
  • 20,895
  • 12
  • 59
  • 63
1

I absolutely agree with dimitrisli's answer.

This and this answers might help you in adding your Java project to a remote repository.

Community
  • 1
  • 1
Simeon
  • 7,582
  • 15
  • 64
  • 101
  • 1
    It's the same guy who asked the questions to those two answers...So he should be aware of those, one can think. – user373455 Feb 11 '11 at 09:49
  • @user373455 Indeed it is. I did not notice that :) I also however fail to notice the point of your comment. If you think the answer is bad/unneeded you can simply vote it down. – Simeon Feb 11 '11 at 09:56
  • Nono, it wasn't a pointer about your answer! Just a statement :). – user373455 Feb 11 '11 at 11:09
1

You could try using the import scope.

  <dependency>
    <groupId>groupId</groupId>
    <artifactId>artifactId</artifactId>
    <version>x.xx</version>
    <type>pom</type>
    <scope>import</scope>
  </dependency>
user373455
  • 12,675
  • 4
  • 32
  • 46