You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by szms <sh...@hotmail.com> on 2012/07/25 21:23:12 UTC

maven dependency and war file

Hello...

I have two projects A and B

B depends on A.

If I make any changes on project A and run mvn install on project B, the
changes from project A does not get included to war file for project B.

However, if I run mvn install on project A and then run mvn install on
project B, the changes from project A gets included to war file for project
B.

Is this normal? Is there any way to get project B updated with project A
with running mvn install on project A?






--
View this message in context: http://maven.40175.n5.nabble.com/maven-dependency-and-war-file-tp5714894.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven dependency and war file

Posted by Anders Hammar <an...@hammar.net>.
> Make a parent over A and B.

I think you mean an aggregating project.

> Build from the parent.
> Set a dependency from B to A.
> Changes in A will go into B.

In this case I would stress that this is only appropriate if A and B
are related and it is appropriate to (always) build them together.

A different solution would be to use an IDE that will use workspace
resolution instead of repository resolution. It would then use the
current code base instead of what's in the repository. I know that
Eclipse with m2e supports this, but there might be others as well.
This would be my suggestion. IMHO, you don't want to have to do a
Maven build whenever you do a small code change but rather have that
happen in runtime (codetime?).

/Anders

>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven dependency and war file

Posted by Wayne Fay <wa...@gmail.com>.
> I am pretty new in Maven. Please bear with me.
>
> How would pom and assembly file would look like on parent project?

You may benefit from reading the freely available books at
http://maven.apache.org/articles.html

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven dependency and war file

Posted by szms <sh...@hotmail.com>.
I am pretty new in Maven. Please bear with me.

How would pom and assembly file would look like on parent project?

Thank you.



--
View this message in context: http://maven.40175.n5.nabble.com/maven-dependency-and-war-file-tp5714894p5714957.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven dependency and war file

Posted by Wayne Fay <wa...@gmail.com>.
> If I make any changes on project A and run mvn install on project B, the
> changes from project A does not get included to war file for project B.
>
> However, if I run mvn install on project A and then run mvn install on
> project B, the changes from project A gets included to war file for project
> B.
>
> Is this normal? Is there any way to get project B updated with project A
> with running mvn install on project A?

Make a parent over A and B.
Build from the parent.
Set a dependency from B to A.
Changes in A will go into B.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org