Re: How to include WAR dependency in project

2012-05-01 Thread Ron Wheeler

What are you trying to do?
It is unusual for a WAR to be a dependency.
 Even more unusual for a WebService to be a dependency.

What are you testing?

Ron

On 01/05/2012 2:44 PM, Daivish Shah wrote:

Hi,

I have following dependency declared in my UNIT Testing module project.

dependency
 groupIdsample-project-ws/groupId
 artifactIdsample-project-ws/artifactId

  version${project.version}/version

 typewar/type
 scopetest/scope
/dependency


And i also have following entry in my unit testing module project
which is different then my web service project.

plugins
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 configuration
 overlays
 overlay/
 overlay
 groupIdsample-project-ws/groupId
 artifactIdyour-project-artifactId/artifactId
 /overlay
 /overlays
 /configuration
 /plugin

And i am using Webservice depedency classes, in my JUNIT module which
is build under that WAR project.

But i am not able to add it, Please help me out on this.


Thanks.




--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Re: How to include WAR dependency in project

2012-05-01 Thread Daivish Shah
I have some integration UNIT test cases.

Which require me to include those JAVA files in my integration unit test
module, And this module is designed to include all UNIT test case for that
parent project.

I hope you got it. But do you have any solution of my question ?



On Tue, May 1, 2012 at 11:59 AM, Ron Wheeler rwhee...@artifact-software.com
 wrote:

 What are you trying to do?
 It is unusual for a WAR to be a dependency.
  Even more unusual for a WebService to be a dependency.

 What are you testing?

 Ron


 On 01/05/2012 2:44 PM, Daivish Shah wrote:

 Hi,

 I have following dependency declared in my UNIT Testing module project.

 dependency
 groupIdsample-project-ws/**groupId
 artifactIdsample-project-ws**/artifactId

  version${project.version}/**version

 typewar/type
 scopetest/scope
 /dependency


 And i also have following entry in my unit testing module project
 which is different then my web service project.

 plugins
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-war-plugin/**artifactId
 configuration
 overlays
 overlay/
 overlay
 groupIdsample-project-ws/**groupId
 artifactIdyour-project-**artifactId/artifactId
 /overlay
 /overlays
 /configuration
 /plugin

 And i am using Webservice depedency classes, in my JUNIT module which
 is build under that WAR project.

 But i am not able to add it, Please help me out on this.


 Thanks.



 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@maven.**apache.orgusers-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: How to include WAR dependency in project

2012-05-01 Thread Ron Wheeler

Break the WAR project into 2 projects.
One with code that makes a JAR and one without code to make a WAR.

You could put your unit tests in the jar project which is what most 
people do or make a third project that has some test routines that test 
your code.


Ron

On 01/05/2012 3:12 PM, Daivish Shah wrote:

I have some integration UNIT test cases.

Which require me to include those JAVA files in my integration unit test
module, And this module is designed to include all UNIT test case for that
parent project.

I hope you got it. But do you have any solution of my question ?



On Tue, May 1, 2012 at 11:59 AM, Ron Wheelerrwhee...@artifact-software.com

wrote:
What are you trying to do?
It is unusual for a WAR to be a dependency.
  Even more unusual for a WebService to be a dependency.

What are you testing?

Ron


On 01/05/2012 2:44 PM, Daivish Shah wrote:


Hi,

I have following dependency declared in my UNIT Testing module project.

dependency
 groupIdsample-project-ws/**groupId
 artifactIdsample-project-ws**/artifactId

  version${project.version}/**version

 typewar/type
 scopetest/scope
/dependency


And i also have following entry in my unit testing module project
which is different then my web service project.

plugins
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-war-plugin/**artifactId
 configuration
 overlays
 overlay/
 overlay
 groupIdsample-project-ws/**groupId
 artifactIdyour-project-**artifactId/artifactId
 /overlay
 /overlays
 /configuration
 /plugin

And i am using Webservice depedency classes, in my JUNIT module which
is build under that WAR project.

But i am not able to add it, Please help me out on this.


Thanks.



--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@maven.**apache.orgusers-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org





--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Re: How to include WAR dependency in project

2012-05-01 Thread Stanimir Stamenkov

Tue, 1 May 2012 11:44:27 -0700, /Daivish Shah/:


I have following dependency declared in my UNIT Testing module project.

dependency
groupIdsample-project-ws/groupId
artifactIdsample-project-ws/artifactId
version${project.version}/version
typewar/type
scopetest/scope
/dependency
[...]


If you control the POM of sample-project-ws you could produce 
additional 'classes' jar artifact:


http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#attachClasses

which you could then refer to as dependency from other modules:

dependency
groupIdsample-project-ws/groupId
artifactIdsample-project-ws/artifactId
version${project.version}/version
classifierclasses/classifier
scopetest/scope
/dependency

--
Stanimir

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



Re: How to include WAR dependency in project

2012-05-01 Thread Daivish Shah
Thanks Stanimir,


I modified my code like this.

JUNIT Module POM.XML

dependency
groupIdsample-project-ws/groupId
artifactIdsample-project-ws/artifactId

 version${project.version}/version
 classifierclasses/classes
scopetest/scope
/dependency


My sample-project-ws POM.XML

plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration
   attachClassestrue/attachClasses
/configuration
/plugin


Thanks a lot for your help.




On Tue, May 1, 2012 at 1:08 PM, Stanimir Stamenkov s7a...@netscape.netwrote:

 Tue, 1 May 2012 11:44:27 -0700, /Daivish Shah/:

  I have following dependency declared in my UNIT Testing module project.

 dependency
groupIdsample-project-ws/**groupId
artifactIdsample-project-ws**/artifactId
version${project.version}/**version
typewar/type
scopetest/scope
 /dependency
 [...]


 If you control the POM of sample-project-ws you could produce additional
 'classes' jar artifact:

 http://maven.apache.org/**plugins/maven-war-plugin/war-**
 mojo.html#attachClasseshttp://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#attachClasses

 which you could then refer to as dependency from other modules:


 dependency
groupIdsample-project-ws/**groupId
artifactIdsample-project-ws**/artifactId
version${project.version}/**version
classifierclasses/**classifier
scopetest/scope
 /dependency

 --
 Stanimir


 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@maven.**apache.orgusers-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Unrepeatable (sort of) dependency issues with a war dependency

2011-12-06 Thread Benson Margulies
Using maven 3.0.3 (as well as 2.2.1).

a
 --
 | |
 b   c

Pom for a lists b and c as modules.

b is packaging=war.
c is packaging=jar.

c's dependencies include:

  dependency
   artifactIdb/artifactId
   version${project.version}/version
   typewar/type
  /dependency

C has an invocation of assembly:single.

The descriptor includes:

dependencySet
  
outputFileNameMapping${artifact.artifactId}.${artifact.extension}/outputFileNameMapping
  includes
include*:*:war:*/include
  /includes
  outputDirectorywars/outputDirectory
  unpackfalse/unpack
/dependencySet

On two machines, the build fails to resolve the war from the reactor,
and then fails to find it on Nexus (a good thing, too). On all the
other machines, all is swell.

message : Failed to execute goal on project jug-manage: Could not
resolve dependencies for project
com.basistech.jug:jug-manage:jar:0.9.100-SNAPSHOT: Could not find
artifact com.basistech.jug:management-war:war:0.9.100-SNAPSHOT in
Nexus (http://maven.basistech.net/nexus/content/groups/public)
cause : Could not resolve dependencies for project
com.basistech.jug:jug-manage:jar:0.9.100-SNAPSHOT: Could not find
artifact com.basistech.jug:management-war:war:0.9.100-SNAPSHOT in
Nexus (http://maven.basistech.net/nexus/content/groups/public)

Anybody got an idea?

On most of the dev machines here, this all works fine.

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



Re: Unrepeatable (sort of) dependency issues with a war dependency

2011-12-06 Thread Benson Margulies
This turned out to be a stupid error in the parent of a, which I had
fixed once and somehow got reverted. Sorry about the noise.

On Tue, Dec 6, 2011 at 9:13 AM, Benson Margulies bimargul...@gmail.com wrote:
 Using maven 3.0.3 (as well as 2.2.1).

    a
  --
  |     |
  b   c

 Pom for a lists b and c as modules.

 b is packaging=war.
 c is packaging=jar.

 c's dependencies include:

  dependency
   artifactIdb/artifactId
   version${project.version}/version
   typewar/type
  /dependency

 C has an invocation of assembly:single.

 The descriptor includes:

    dependencySet
      
 outputFileNameMapping${artifact.artifactId}.${artifact.extension}/outputFileNameMapping
      includes
        include*:*:war:*/include
      /includes
      outputDirectorywars/outputDirectory
      unpackfalse/unpack
    /dependencySet

 On two machines, the build fails to resolve the war from the reactor,
 and then fails to find it on Nexus (a good thing, too). On all the
 other machines, all is swell.

 message : Failed to execute goal on project jug-manage: Could not
 resolve dependencies for project
 com.basistech.jug:jug-manage:jar:0.9.100-SNAPSHOT: Could not find
 artifact com.basistech.jug:management-war:war:0.9.100-SNAPSHOT in
 Nexus (http://maven.basistech.net/nexus/content/groups/public)
 cause : Could not resolve dependencies for project
 com.basistech.jug:jug-manage:jar:0.9.100-SNAPSHOT: Could not find
 artifact com.basistech.jug:management-war:war:0.9.100-SNAPSHOT in
 Nexus (http://maven.basistech.net/nexus/content/groups/public)

 Anybody got an idea?

 On most of the dev machines here, this all works fine.

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



EAR as WAR dependency?

2011-10-18 Thread Manos Batsis


Hello,

I've got an EAR application for which I'm building a specific extension 
as an additional WAR. My question is, what is the best way to do this 
without the original EAR's POM knowing anything about the extra WAR? Any 
examples would be appreciated.



Many thanks,

Manos



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



Re: EAR as WAR dependency?

2011-10-18 Thread Brian Topping
How would you solve this problem without Maven?  What kind of EAR could load a 
WAR it doesn't know about? 

I don't doubt that this is possible with some magic, but that magic is separate 
from Maven.  

Once you have the magic well-defined, Maven can help you build it and package 
it.  

Brian

On Oct 18, 2011, at 11:50 AM, Manos Batsis wrote:

 
 Hello,
 
 I've got an EAR application for which I'm building a specific extension as an 
 additional WAR. My question is, what is the best way to do this without the 
 original EAR's POM knowing anything about the extra WAR? Any examples would 
 be appreciated.
 
 
 Many thanks,
 
 Manos
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 


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



Re: EAR as WAR dependency?

2011-10-18 Thread Stephen Connolly
Sounds like you want to unpack the EAR, add the WAR and repack it again...

that would be a 2nd EAR module that depends on the first EAR and the
WAR... might need some massaging, or perhaps a
m-d-p:unpack-dependencies

On 18 October 2011 16:59, Brian Topping topp...@codehaus.org wrote:
 How would you solve this problem without Maven?  What kind of EAR could load 
 a WAR it doesn't know about?

 I don't doubt that this is possible with some magic, but that magic is 
 separate from Maven.

 Once you have the magic well-defined, Maven can help you build it and package 
 it.

 Brian

 On Oct 18, 2011, at 11:50 AM, Manos Batsis wrote:


 Hello,

 I've got an EAR application for which I'm building a specific extension as 
 an additional WAR. My question is, what is the best way to do this without 
 the original EAR's POM knowing anything about the extra WAR? Any examples 
 would be appreciated.


 Many thanks,

 Manos



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




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



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



Re: EAR as WAR dependency?

2011-10-18 Thread Manos Batsis


Hello Brian,

Thanks for the reply. I was thinking about using the unpack goal of 
maven-dependency-plugin, then change the target dir for the WAR to place 
it in there along with some enhanced EAR descriptors. Just looking for 
better ideas and/or examples to save time.


Manos


On 10/18/2011 06:59 PM, Brian Topping wrote:

How would you solve this problem without Maven?  What kind of EAR could load a 
WAR it doesn't know about?

I don't doubt that this is possible with some magic, but that magic is separate 
from Maven.

Once you have the magic well-defined, Maven can help you build it and package 
it.

Brian

On Oct 18, 2011, at 11:50 AM, Manos Batsis wrote:



Hello,

I've got an EAR application for which I'm building a specific extension as an 
additional WAR. My question is, what is the best way to do this without the 
original EAR's POM knowing anything about the extra WAR? Any examples would be 
appreciated.


Many thanks,

Manos



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





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





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



Re: How access classes from war dependency?

2011-05-05 Thread sipungora

Anders Hammar wrote:
 
 No, you create a third project which is a standard jar Maven project.
 There
 you but those Java classes. This will produce a jar artifact, which you
 declare a dependency to from both war projects.
 

I've done this, as you've explained me here. But I have one problem yet. If
I save data in jar object from 1-st war for the 2-nd war, the 2-nd war
cannot acces they. My object is the singleton.

1   protected static Controller controller; 
2   
3   public static Controller getInstance() {
4   if(controller == null) {
5   controller = new Controller();
6   }
7   return controller;
8   }

If I debug 1-st war and then 2-nd one, I see that 2-nd war also goes into
row 5. So both wars works with different objects.
Can you explain me how can I solve this?

Thank you in advance.
Best Regards,
-sipungora


--
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-access-classes-from-war-dependency-tp4362127p4373647.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: How access classes from war dependency?

2011-05-05 Thread Rick Genter

On May 5, 2011, at 2:44 PM, sipungora wrote:

 I've done this, as you've explained me here. But I have one problem yet. If
 I save data in jar object from 1-st war for the 2-nd war, the 2-nd war
 cannot acces they. My object is the singleton.
 
 1 protected static Controller controller; 
 2 
 3 public static Controller getInstance() {
 4 if(controller == null) {
 5 controller = new Controller();
 6 }
 7 return controller;
 8 }
 
 If I debug 1-st war and then 2-nd one, I see that 2-nd war also goes into
 row 5. So both wars works with different objects.
 Can you explain me how can I solve this?


I don't think you can do this. I think each war is in its own class loader; 
effectively each web application is in its own space. There may be ways to 
configure your app server to share information between wars, but frankly the 
whole concept smells of bad design.
--
Rick Genter
rgen...@interactions.net



***
This e-mail and any of its attachments may contain Interactions Corporation
proprietary information, which is privileged, confidential, or subject to
copyright belonging to the Interactions Corporation. This e-mail is intended
solely for the use of the individual or entity to which it is addressed. If you
are not the intended recipient of this e-mail, you are hereby notified that any
dissemination, distribution, copying, or action taken in relation to the
contents of and attachments to this e-mail is strictly prohibited and may be
unlawful. If you have received this e-mail in error, please notify the sender
immediately and permanently delete the original and any copy of this e-mail and
any printout. Thank You. 
***


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



Re: How access classes from war dependency?

2011-05-05 Thread Wayne Fay
 If I debug 1-st war and then 2-nd one, I see that 2-nd war also goes into
 row 5. So both wars works with different objects.
 Can you explain me how can I solve this?

This is not the right place to ask such questions -- we are Maven
experts, not j2ee war classloader experts. You probably need to use
some tooling like Terracotta to achieve a server-wide (or even
cluster-wide?) singleton.

Wayne

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



Re: How access classes from war dependency?

2011-05-05 Thread sipungora

Rick Genter wrote:
 
 I don't think you can do this. I think each war is in its own class
 loader; effectively each web application is in its own space. There may be
 ways to configure your app server to share information between wars, but
 frankly the whole concept smells of bad design.
 --
 Rick Genter
 

Thank you for explanation Rick, but what would be in this case a good
design?

Thank you in advance,
Best Regards,
-sipungora

--
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-access-classes-from-war-dependency-tp4362127p4373726.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: How access classes from war dependency?

2011-05-05 Thread sipungora

Wayne Fay wrote:
 
 If I debug 1-st war and then 2-nd one, I see that 2-nd war also goes into
 row 5. So both wars works with different objects.
 Can you explain me how can I solve this?
 
 This is not the right place to ask such questions -- we are Maven
 experts, not j2ee war classloader experts. You probably need to use
 some tooling like Terracotta to achieve a server-wide (or even
 cluster-wide?) singleton.
 
 Wayne
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 

Thank you Wayne.

I don't simple known where I should ask this. Besides Anders has proposed me
this idea. I've thought that he can help me further.

--
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-access-classes-from-war-dependency-tp4362127p4373752.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: How access classes from war dependency?

2011-05-05 Thread Wayne Fay
 I don't simple known where I should ask this. Besides Anders has proposed me
 this idea. I've thought that he can help me further.

stackoverflow.com
javaranch.com
forums.oracle.com
forums.terracotta.org
or try the User Forum for whatever j2ee container you are using
(glassfish, weblogic, jboss, etc)

Wayne

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



Re: How access classes from war dependency?

2011-05-01 Thread Anders Hammar
No, you create a third project which is a standard jar Maven project. There
you but those Java classes. This will produce a jar artifact, which you
declare a dependency to from both war projects.

/Anders

On Sun, May 1, 2011 at 03:48, sipungora kostya...@yahoo.de wrote:

 Hi,

 I have a war-dependency. Its classes are arranged in war/WEB-INF/classes/.
 How should I configure my pom, that I can access they?

 I assume, they should be copied from war/WEB-INF/classes/ into
 mywar/WEB-INF/classes/,  but I don't know, how my pom should correct be
 configured.

 this is a config of maven-war-plugin


plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration

  warSourceDirectorywar/warSourceDirectory

  webXmlsrc/main/webapp/WEB-INF/web.xml/webXml

  dependentWarExcludesWEB-INF/lib/*/dependentWarExcludes
archive


  manifestFilewar/META-INF/MANIFEST.MF
/manifestFile
/archive
/configuration
/plugin

 and this is the war-dependency:


dependency
groupId${groupId}/groupId
artifactIdtest/artifactId
version${version}/version
typewar/type
/dependency

 Thanks in advance.
 Best Regards.
 -sipungora.
 --
 View this message in context:
 http://maven.40175.n5.nabble.com/How-access-classes-from-war-dependency-tp4362127p4362127.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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




Re: How access classes from war dependency?

2011-05-01 Thread Dennis Lundberg
On 2011-05-01 03:48, sipungora wrote:
 Hi,
 
 I have a war-dependency. Its classes are arranged in war/WEB-INF/classes/.
 How should I configure my pom, that I can access they?
 
 I assume, they should be copied from war/WEB-INF/classes/ into
 mywar/WEB-INF/classes/,  but I don't know, how my pom should correct be
 configured.

For that to work you need to use a feature in Maven WAR Plugin that is
called overlays. That will overlay the dependant WAR on top of your
current project's WAR.

See
http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html

 
 this is a config of maven-war-plugin
 
 
   plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-war-plugin/artifactId
   configuration
   
 warSourceDirectorywar/warSourceDirectory
   
 webXmlsrc/main/webapp/WEB-INF/web.xml/webXml
   
 dependentWarExcludesWEB-INF/lib/*/dependentWarExcludes
   archive
   
   
 manifestFilewar/META-INF/MANIFEST.MF
   /manifestFile
   /archive
   /configuration
   /plugin
 
 and this is the war-dependency:
 
 
   dependency
   groupId${groupId}/groupId
   artifactIdtest/artifactId
   version${version}/version
   typewar/type
   /dependency
 
 Thanks in advance.
 Best Regards.
 -sipungora.
 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/How-access-classes-from-war-dependency-tp4362127p4362127.html
 Sent from the Maven - Users mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 


-- 
Dennis Lundberg

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



Re: How access classes from war dependency?

2011-05-01 Thread sipungora
Thank you, Anders.

I'll try this to do. --
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-access-classes-from-war-dependency-tp4362127p4362573.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: How access classes from war dependency?

2011-05-01 Thread sipungora
Thank you Dennis.

I will later write, if it works. --
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-access-classes-from-war-dependency-tp4362127p4362575.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: How access classes from war dependency?

2011-05-01 Thread sipungora
Hi Anders,

 you create a third project which is a standard jar Maven project.

I've done it. But how can I configure my pom, that this jar will after
building be in WEB-INF/lib of my war? Currently I do it manually.

Thank you in advance.
Best Regards,
-sipungora--
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-access-classes-from-war-dependency-tp4362127p4363706.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: How access classes from war dependency?

2011-05-01 Thread Anders Hammar
Should happen automagically if you declare a dependency to it in your war
project. Use the standard compile scope for the dependency.

/Anders

On Mon, May 2, 2011 at 01:33, sipungora kostya...@yahoo.de wrote:

 Hi Anders,

  you create a third project which is a standard jar Maven project.

 I've done it. But how can I configure my pom, that this jar will after
 building be in WEB-INF/lib of my war? Currently I do it manually.

 Thank you in advance.
 Best Regards,
 -sipungora--
 View this message in context:
 http://maven.40175.n5.nabble.com/How-to-access-classes-from-war-dependency-tp4362127p4363706.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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




How access classes from war dependency?

2011-04-30 Thread sipungora
Hi,

I have a war-dependency. Its classes are arranged in war/WEB-INF/classes/.
How should I configure my pom, that I can access they?

I assume, they should be copied from war/WEB-INF/classes/ into
mywar/WEB-INF/classes/,  but I don't know, how my pom should correct be
configured.

this is a config of maven-war-plugin


plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration

warSourceDirectorywar/warSourceDirectory

webXmlsrc/main/webapp/WEB-INF/web.xml/webXml

dependentWarExcludesWEB-INF/lib/*/dependentWarExcludes
archive


manifestFilewar/META-INF/MANIFEST.MF
/manifestFile
/archive
/configuration
/plugin

and this is the war-dependency:


dependency
groupId${groupId}/groupId
artifactIdtest/artifactId
version${version}/version
typewar/type
/dependency

Thanks in advance.
Best Regards.
-sipungora.
--
View this message in context: 
http://maven.40175.n5.nabble.com/How-access-classes-from-war-dependency-tp4362127p4362127.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Dependency Tree question for ears with war dependency

2011-04-11 Thread Eric Miles
I'm having difficulty understanding why performing a dependency:tree on an ear, 
will give me transitive dependencies for a dependent artifact with packaging 
type jar, but not of type war.  Here is the sample output from a project 
(strictly for demo purposes):

emiles-macbook:myapp emiles$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO]
[INFO] My Application
[INFO] mywebapp
[INFO] myapplib
[INFO] myear
[INFO]
[INFO] 
[INFO] Building My Application 0.0.1-SNAPSHOT
[INFO] 
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ myapp ---
[INFO] com.captechventures.sandbox:myapp:pom:0.0.1-SNAPSHOT
[INFO]
[INFO] 
[INFO] Building mywebapp 0.0.1-SNAPSHOT
[INFO] 
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ mywebapp ---
[INFO] com.captechventures.sandbox:mywebapp:war:0.0.1-SNAPSHOT
[INFO] \- com.captechventures.sandbox:mysharedlib:jar:wlssl:1.0.0:compile
[INFO]
[INFO] 
[INFO] Building myapplib 0.0.1-SNAPSHOT
[INFO] 
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ myapplib ---
[INFO] com.captechventures.sandbox:myapplib:jar:0.0.1-SNAPSHOT
[INFO] \- commons-lang:commons-lang:jar:2.1:compile
[INFO]
[INFO] 
[INFO] Building myear 0.0.1-SNAPSHOT
[INFO] 
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ myear ---
[INFO] com.captechventures.sandbox:myear:ear:0.0.1-SNAPSHOT
[INFO] +- com.captechventures.sandbox:mywebapp:war:0.0.1-SNAPSHOT:compile
[INFO] \- com.captechventures.sandbox:myapplib:jar:0.0.1-SNAPSHOT:compile
[INFO]\- commons-lang:commons-lang:jar:2.1:compile
[INFO] 
[INFO] Reactor Summary:
[INFO]
[INFO] My Application  SUCCESS [1.445s]
[INFO] mywebapp .. SUCCESS [0.138s]
[INFO] myapplib .. SUCCESS [0.028s]
[INFO] myear . SUCCESS [0.103s]
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 2.421s
[INFO] Finished at: Mon Apr 11 10:27:27 EDT 2011
[INFO] Final Memory: 5M/81M
[INFO] 



You'll notice during the ear build, the transitive dependencies for the jar 
file are shown (and can be navigated programmatically), however the war's 
dependencies are not included at the ear level.  This is problematic as I am 
writing a plugin that will navigate the entire dependency tree for the ear 
(should include transitive dependencies as well) and perform a business 
function.  This is not working as expected as we get no dependencies of the war 
in the DependencyTreeBuilder.

Thoughts?  Hints?  Suggestions?

Thanks in advance.
Eric Miles
Manager / Architect  | CapTech
emi...@captechconsulting.comemi...@captechventures.com








Re: Dependency Tree question for ears with war dependency

2011-04-11 Thread Jörg Schaible
Hi Eric,

Eric Miles wrote:

 I'm having difficulty understanding why performing a dependency:tree on an
 ear, will give me transitive dependencies for a dependent artifact with
 packaging type jar, but not of type war.

Because a war does not require transitive dependencies, it has them normally 
embedded in WEB-INF/lib.

- Jörg


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



Re: tomcat-m-p war dependency

2011-01-14 Thread Ryan Connolly
So it would appear that project war dependencies DO get deployed using
addContextWarDependencies property.  However, the war dependency must have
scopetomcat/scope declared.  Not only was I unable to find any
documentation on this feature but as you can guess, m3 issues a clear
warning about the use of this unofficial scope.  I've created a JIRA for
this warning as I am guessing m3.1 will disallow this.  This will meet our
needs for the time being so I thought I would post this in case others
desire the same functionality but did not know to use tomcat scope.

http://jira.codehaus.org/browse/MTOMCAT-75
On Jan 13, 2011 3:04 PM, Ryan Connolly ryn...@gmail.com wrote:
 Olivier,
 Not sure if you are being alerted of comments on the JIRA or not but in
 case you are not I've commented in more detail there. Thanks for taking a
 look!
 -Ryan
 On Jan 13, 2011 3:33 AM, Olivier Lamy ol...@apache.org wrote:
 Hello,
 I have added a comment in the jira issue.
 It sounds more reasonnable to have a new mojo for this with a more
 simple syntax which could executed from the cli.

 Feel free to add an other comment.


 Thanks,
 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

 2011/1/13 Ryan Connolly ryn...@gmail.com:
 Ok, my patch has been submitted:
 http://jira.codehaus.org/browse/MTOMCAT-74

 Please do take a peek at it. It would be great to see this in 1.2 if at
 all
 possible!

 -Ryan


 On Tue, Jan 11, 2011 at 5:27 PM, Olivier Lamy ol...@apache.org wrote:

 Patchs are always welcome :-)

 2011/1/11 Ryan Connolly ryn...@gmail.com:
  Thanks for the reply, Olivier. I'll give your suggestion a try.
 Would
 it
  be worth my time trying to create a patch for this feature or would
 rather
  just a feature request in JIRA?
 
  Thanks again.
  -Ryan
  On Jan 11, 2011 5:09 PM, Olivier Lamy ol...@apache.org wrote:
  Hello,
  It's not supported currently (btw it's a good idea).
  You can use copy goal [1] from dependency plugin to get your
artifact
  and use deploy-only mojo from t-m-p
 
 
  [1]
 


http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html
 
  2011/1/11 Ryan Connolly ryn...@gmail.com:
  Hi:
  Does anyone happen to know whether it is possible to configure
  tomcat:run to deploy a defined war dependency as well as run the
 current
  project as a dynamic web app in the embedded container? I've tried
  setting
  the addContextWarDependenciestrue/addContextWarDependencies
  configuration option and have declared a war dependency in the
 tomcat-m-p
  but the dependency does not appear to deploy to the embedded
 container.
  Has
  anyone else tried a similar configuration? Any advice would be
  appreciated.
  An example of what I thought might work follows:
 
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdtomcat-maven-plugin/artifactId
  version1.1/version
  configuration
  addContextWarDependenciestrue/addContextWarDependencies
  /configuration
  dependencies
  dependency
  groupIdcom.mycompany/groupId
  artifactIdwar-artifactid/artifactId
  version1.0/version
  typewar/type
  /dependency
  /dependencies
  /plugin
 
 
  Thanks,
  -Ryan
 
 
 
 
  --
  Olivier Lamy
  http://twitter.com/olamy
  http://www.linkedin.com/in/olamy
 
 
-
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 



 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

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






 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

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



Re: tomcat-m-p war dependency

2011-01-13 Thread Olivier Lamy
Hello,
I have added a comment in the jira issue.
It sounds more reasonnable to have a new mojo for this with a more
simple syntax which could executed from the cli.

Feel free to add an other comment.


Thanks,
-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

2011/1/13 Ryan Connolly ryn...@gmail.com:
 Ok, my patch has been submitted:  http://jira.codehaus.org/browse/MTOMCAT-74

 Please do take a peek at it.  It would be great to see this in 1.2 if at all
 possible!

 -Ryan


 On Tue, Jan 11, 2011 at 5:27 PM, Olivier Lamy ol...@apache.org wrote:

 Patchs are always welcome :-)

 2011/1/11 Ryan Connolly ryn...@gmail.com:
  Thanks for the reply, Olivier.  I'll give your suggestion a try.  Would
 it
  be worth my time trying to create a patch for this feature or would
 rather
  just a feature request in JIRA?
 
  Thanks again.
  -Ryan
  On Jan 11, 2011 5:09 PM, Olivier Lamy ol...@apache.org wrote:
  Hello,
  It's not supported currently (btw it's a good idea).
  You can use copy goal [1] from dependency plugin to get your artifact
  and use deploy-only mojo from t-m-p
 
 
  [1]
 
 http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html
 
  2011/1/11 Ryan Connolly ryn...@gmail.com:
  Hi:
       Does anyone happen to know whether it is possible to configure
  tomcat:run to deploy a defined war dependency as well as run the
 current
  project as a dynamic web app in the embedded container?  I've tried
  setting
  the addContextWarDependenciestrue/addContextWarDependencies
  configuration option and have declared a war dependency in the
 tomcat-m-p
  but the dependency does not appear to deploy to the embedded container.
   Has
  anyone else tried a similar configuration?  Any advice would be
  appreciated.
   An example of what I thought might work follows:
 
       plugin
         groupIdorg.codehaus.mojo/groupId
         artifactIdtomcat-maven-plugin/artifactId
         version1.1/version
         configuration
           addContextWarDependenciestrue/addContextWarDependencies
         /configuration
         dependencies
           dependency
             groupIdcom.mycompany/groupId
             artifactIdwar-artifactid/artifactId
             version1.0/version
             typewar/type
           /dependency
         /dependencies
       /plugin
 
 
  Thanks,
  -Ryan
 
 
 
 
  --
  Olivier Lamy
  http://twitter.com/olamy
  http://www.linkedin.com/in/olamy
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 



 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

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






-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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



Re: tomcat-m-p war dependency

2011-01-13 Thread Ryan Connolly
Olivier,
  Not sure if you are being alerted of comments on the JIRA or not but in
case you are not I've commented in more detail there.  Thanks for taking a
look!
-Ryan
On Jan 13, 2011 3:33 AM, Olivier Lamy ol...@apache.org wrote:
 Hello,
 I have added a comment in the jira issue.
 It sounds more reasonnable to have a new mojo for this with a more
 simple syntax which could executed from the cli.

 Feel free to add an other comment.


 Thanks,
 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

 2011/1/13 Ryan Connolly ryn...@gmail.com:
 Ok, my patch has been submitted:
http://jira.codehaus.org/browse/MTOMCAT-74

 Please do take a peek at it.  It would be great to see this in 1.2 if at
all
 possible!

 -Ryan


 On Tue, Jan 11, 2011 at 5:27 PM, Olivier Lamy ol...@apache.org wrote:

 Patchs are always welcome :-)

 2011/1/11 Ryan Connolly ryn...@gmail.com:
  Thanks for the reply, Olivier.  I'll give your suggestion a try.
 Would
 it
  be worth my time trying to create a patch for this feature or would
 rather
  just a feature request in JIRA?
 
  Thanks again.
  -Ryan
  On Jan 11, 2011 5:09 PM, Olivier Lamy ol...@apache.org wrote:
  Hello,
  It's not supported currently (btw it's a good idea).
  You can use copy goal [1] from dependency plugin to get your artifact
  and use deploy-only mojo from t-m-p
 
 
  [1]
 

http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html
 
  2011/1/11 Ryan Connolly ryn...@gmail.com:
  Hi:
   Does anyone happen to know whether it is possible to configure
  tomcat:run to deploy a defined war dependency as well as run the
 current
  project as a dynamic web app in the embedded container?  I've tried
  setting
  the addContextWarDependenciestrue/addContextWarDependencies
  configuration option and have declared a war dependency in the
 tomcat-m-p
  but the dependency does not appear to deploy to the embedded
container.
   Has
  anyone else tried a similar configuration?  Any advice would be
  appreciated.
   An example of what I thought might work follows:
 
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdtomcat-maven-plugin/artifactId
 version1.1/version
 configuration
   addContextWarDependenciestrue/addContextWarDependencies
 /configuration
 dependencies
   dependency
 groupIdcom.mycompany/groupId
 artifactIdwar-artifactid/artifactId
 version1.0/version
 typewar/type
   /dependency
 /dependencies
   /plugin
 
 
  Thanks,
  -Ryan
 
 
 
 
  --
  Olivier Lamy
  http://twitter.com/olamy
  http://www.linkedin.com/in/olamy
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 



 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

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






 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

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



Re: tomcat-m-p war dependency

2011-01-12 Thread Ryan Connolly
Anders:  Being a contributor this had already occurred to me but I was
hoping for an embedded Tomcat 6 (which doesn't appear to be supported
currently) that would run a war dependency alongside the current war project
for rapid development.  I may come back to Cargo for this yet but I thought
I would try tomcat-m-p first.

Thanks for the suggestion.

-Ryan



On Wed, Jan 12, 2011 at 1:48 AM, Anders Hammar and...@hammar.net wrote:

 Try Codehaus Cargo, it should support your use case. If you need help, ask
 on the cargo user list.

 /Anders

 On Tue, Jan 11, 2011 at 21:56, Ryan Connolly ryn...@gmail.com wrote:

  Hi:
   Does anyone happen to know whether it is possible to configure
  tomcat:run to deploy a defined war dependency as well as run the current
  project as a dynamic web app in the embedded container?  I've tried
 setting
  the addContextWarDependenciestrue/addContextWarDependencies
  configuration option and have declared a war dependency in the tomcat-m-p
  but the dependency does not appear to deploy to the embedded container.
   Has
  anyone else tried a similar configuration?  Any advice would be
  appreciated.
   An example of what I thought might work follows:
 
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdtomcat-maven-plugin/artifactId
 version1.1/version
 configuration
   addContextWarDependenciestrue/addContextWarDependencies
 /configuration
 dependencies
   dependency
 groupIdcom.mycompany/groupId
 artifactIdwar-artifactid/artifactId
 version1.0/version
 typewar/type
   /dependency
 /dependencies
   /plugin
 
 
  Thanks,
  -Ryan
 



Re: tomcat-m-p war dependency

2011-01-12 Thread Ryan Connolly
Olivier,
 I just took a quick look at the current 1.2-SNAPSHOT and it would
appear that most of the work for this indeed has already been done.
 Referring to AbstractRunMojo#createDependencyContexts it seems that there
are a couple of things preventing the configuration I sent in my first post
from actually deploying the war dependency.

   - SetArtifact artifacts = project.getArtifacts();
  - The war must be declared as a dependency in the project's
  dependencies element and does not account for plugin dependencies.

  - if ( war.equals( artifact.getType() )  !artifact.isOptional() 
   filter.include( artifact ) )
  - The ScopeArtifactFilter#include call in this line always returns
  false so no artifact will ever be deployed.

I guess what I'd like to know is, would it be OK to change this to also look
at the plugin dependencies and to fix the ScopeArtifactFilter or would you
prefer I create a brand new method for pluginDependencies that does
essentially the same thing as the createDependencyContexts method that looks
only at project dependencies?

Thanks in advance for your advice.
-Ryan



On Tue, Jan 11, 2011 at 5:27 PM, Olivier Lamy ol...@apache.org wrote:

 Patchs are always welcome :-)

 2011/1/11 Ryan Connolly ryn...@gmail.com:
  Thanks for the reply, Olivier.  I'll give your suggestion a try.  Would
 it
  be worth my time trying to create a patch for this feature or would
 rather
  just a feature request in JIRA?
 
  Thanks again.
  -Ryan
  On Jan 11, 2011 5:09 PM, Olivier Lamy ol...@apache.org wrote:
  Hello,
  It's not supported currently (btw it's a good idea).
  You can use copy goal [1] from dependency plugin to get your artifact
  and use deploy-only mojo from t-m-p
 
 
  [1]
 
 http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html
 
  2011/1/11 Ryan Connolly ryn...@gmail.com:
  Hi:
   Does anyone happen to know whether it is possible to configure
  tomcat:run to deploy a defined war dependency as well as run the
 current
  project as a dynamic web app in the embedded container?  I've tried
  setting
  the addContextWarDependenciestrue/addContextWarDependencies
  configuration option and have declared a war dependency in the
 tomcat-m-p
  but the dependency does not appear to deploy to the embedded container.
   Has
  anyone else tried a similar configuration?  Any advice would be
  appreciated.
   An example of what I thought might work follows:
 
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdtomcat-maven-plugin/artifactId
 version1.1/version
 configuration
   addContextWarDependenciestrue/addContextWarDependencies
 /configuration
 dependencies
   dependency
 groupIdcom.mycompany/groupId
 artifactIdwar-artifactid/artifactId
 version1.0/version
 typewar/type
   /dependency
 /dependencies
   /plugin
 
 
  Thanks,
  -Ryan
 
 
 
 
  --
  Olivier Lamy
  http://twitter.com/olamy
  http://www.linkedin.com/in/olamy
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 



 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

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




Re: tomcat-m-p war dependency

2011-01-12 Thread Ryan Connolly
Ok, my patch has been submitted:  http://jira.codehaus.org/browse/MTOMCAT-74

Please do take a peek at it.  It would be great to see this in 1.2 if at all
possible!

-Ryan


On Tue, Jan 11, 2011 at 5:27 PM, Olivier Lamy ol...@apache.org wrote:

 Patchs are always welcome :-)

 2011/1/11 Ryan Connolly ryn...@gmail.com:
  Thanks for the reply, Olivier.  I'll give your suggestion a try.  Would
 it
  be worth my time trying to create a patch for this feature or would
 rather
  just a feature request in JIRA?
 
  Thanks again.
  -Ryan
  On Jan 11, 2011 5:09 PM, Olivier Lamy ol...@apache.org wrote:
  Hello,
  It's not supported currently (btw it's a good idea).
  You can use copy goal [1] from dependency plugin to get your artifact
  and use deploy-only mojo from t-m-p
 
 
  [1]
 
 http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html
 
  2011/1/11 Ryan Connolly ryn...@gmail.com:
  Hi:
   Does anyone happen to know whether it is possible to configure
  tomcat:run to deploy a defined war dependency as well as run the
 current
  project as a dynamic web app in the embedded container?  I've tried
  setting
  the addContextWarDependenciestrue/addContextWarDependencies
  configuration option and have declared a war dependency in the
 tomcat-m-p
  but the dependency does not appear to deploy to the embedded container.
   Has
  anyone else tried a similar configuration?  Any advice would be
  appreciated.
   An example of what I thought might work follows:
 
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdtomcat-maven-plugin/artifactId
 version1.1/version
 configuration
   addContextWarDependenciestrue/addContextWarDependencies
 /configuration
 dependencies
   dependency
 groupIdcom.mycompany/groupId
 artifactIdwar-artifactid/artifactId
 version1.0/version
 typewar/type
   /dependency
 /dependencies
   /plugin
 
 
  Thanks,
  -Ryan
 
 
 
 
  --
  Olivier Lamy
  http://twitter.com/olamy
  http://www.linkedin.com/in/olamy
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 



 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

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




tomcat-m-p war dependency

2011-01-11 Thread Ryan Connolly
Hi:
  Does anyone happen to know whether it is possible to configure
tomcat:run to deploy a defined war dependency as well as run the current
project as a dynamic web app in the embedded container?  I've tried setting
the addContextWarDependenciestrue/addContextWarDependencies
configuration option and have declared a war dependency in the tomcat-m-p
but the dependency does not appear to deploy to the embedded container.  Has
anyone else tried a similar configuration?  Any advice would be appreciated.
 An example of what I thought might work follows:

  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdtomcat-maven-plugin/artifactId
version1.1/version
configuration
  addContextWarDependenciestrue/addContextWarDependencies
/configuration
dependencies
  dependency
groupIdcom.mycompany/groupId
artifactIdwar-artifactid/artifactId
version1.0/version
typewar/type
  /dependency
/dependencies
  /plugin


Thanks,
-Ryan


Re: tomcat-m-p war dependency

2011-01-11 Thread Olivier Lamy
Hello,
It's not supported currently (btw it's a good idea).
You can use copy goal [1] from dependency plugin to get your artifact
and use deploy-only mojo from t-m-p


[1] 
http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html

2011/1/11 Ryan Connolly ryn...@gmail.com:
 Hi:
      Does anyone happen to know whether it is possible to configure
 tomcat:run to deploy a defined war dependency as well as run the current
 project as a dynamic web app in the embedded container?  I've tried setting
 the addContextWarDependenciestrue/addContextWarDependencies
 configuration option and have declared a war dependency in the tomcat-m-p
 but the dependency does not appear to deploy to the embedded container.  Has
 anyone else tried a similar configuration?  Any advice would be appreciated.
  An example of what I thought might work follows:

      plugin
        groupIdorg.codehaus.mojo/groupId
        artifactIdtomcat-maven-plugin/artifactId
        version1.1/version
        configuration
          addContextWarDependenciestrue/addContextWarDependencies
        /configuration
        dependencies
          dependency
            groupIdcom.mycompany/groupId
            artifactIdwar-artifactid/artifactId
            version1.0/version
            typewar/type
          /dependency
        /dependencies
      /plugin


 Thanks,
 -Ryan




-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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



Re: tomcat-m-p war dependency

2011-01-11 Thread Ryan Connolly
Thanks for the reply, Olivier.  I'll give your suggestion a try.  Would it
be worth my time trying to create a patch for this feature or would rather
just a feature request in JIRA?

Thanks again.
-Ryan
On Jan 11, 2011 5:09 PM, Olivier Lamy ol...@apache.org wrote:
 Hello,
 It's not supported currently (btw it's a good idea).
 You can use copy goal [1] from dependency plugin to get your artifact
 and use deploy-only mojo from t-m-p


 [1]
http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html

 2011/1/11 Ryan Connolly ryn...@gmail.com:
 Hi:
  Does anyone happen to know whether it is possible to configure
 tomcat:run to deploy a defined war dependency as well as run the current
 project as a dynamic web app in the embedded container?  I've tried
setting
 the addContextWarDependenciestrue/addContextWarDependencies
 configuration option and have declared a war dependency in the tomcat-m-p
 but the dependency does not appear to deploy to the embedded container.
 Has
 anyone else tried a similar configuration?  Any advice would be
appreciated.
  An example of what I thought might work follows:

  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdtomcat-maven-plugin/artifactId
version1.1/version
configuration
  addContextWarDependenciestrue/addContextWarDependencies
/configuration
dependencies
  dependency
groupIdcom.mycompany/groupId
artifactIdwar-artifactid/artifactId
version1.0/version
typewar/type
  /dependency
/dependencies
  /plugin


 Thanks,
 -Ryan




 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

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



Re: tomcat-m-p war dependency

2011-01-11 Thread Olivier Lamy
Patchs are always welcome :-)

2011/1/11 Ryan Connolly ryn...@gmail.com:
 Thanks for the reply, Olivier.  I'll give your suggestion a try.  Would it
 be worth my time trying to create a patch for this feature or would rather
 just a feature request in JIRA?

 Thanks again.
 -Ryan
 On Jan 11, 2011 5:09 PM, Olivier Lamy ol...@apache.org wrote:
 Hello,
 It's not supported currently (btw it's a good idea).
 You can use copy goal [1] from dependency plugin to get your artifact
 and use deploy-only mojo from t-m-p


 [1]
 http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html

 2011/1/11 Ryan Connolly ryn...@gmail.com:
 Hi:
      Does anyone happen to know whether it is possible to configure
 tomcat:run to deploy a defined war dependency as well as run the current
 project as a dynamic web app in the embedded container?  I've tried
 setting
 the addContextWarDependenciestrue/addContextWarDependencies
 configuration option and have declared a war dependency in the tomcat-m-p
 but the dependency does not appear to deploy to the embedded container.
  Has
 anyone else tried a similar configuration?  Any advice would be
 appreciated.
  An example of what I thought might work follows:

      plugin
        groupIdorg.codehaus.mojo/groupId
        artifactIdtomcat-maven-plugin/artifactId
        version1.1/version
        configuration
          addContextWarDependenciestrue/addContextWarDependencies
        /configuration
        dependencies
          dependency
            groupIdcom.mycompany/groupId
            artifactIdwar-artifactid/artifactId
            version1.0/version
            typewar/type
          /dependency
        /dependencies
      /plugin


 Thanks,
 -Ryan




 --
 Olivier Lamy
 http://twitter.com/olamy
 http://www.linkedin.com/in/olamy

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





-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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



Re: tomcat-m-p war dependency

2011-01-11 Thread Anders Hammar
Try Codehaus Cargo, it should support your use case. If you need help, ask
on the cargo user list.

/Anders

On Tue, Jan 11, 2011 at 21:56, Ryan Connolly ryn...@gmail.com wrote:

 Hi:
  Does anyone happen to know whether it is possible to configure
 tomcat:run to deploy a defined war dependency as well as run the current
 project as a dynamic web app in the embedded container?  I've tried setting
 the addContextWarDependenciestrue/addContextWarDependencies
 configuration option and have declared a war dependency in the tomcat-m-p
 but the dependency does not appear to deploy to the embedded container.
  Has
 anyone else tried a similar configuration?  Any advice would be
 appreciated.
  An example of what I thought might work follows:

  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdtomcat-maven-plugin/artifactId
version1.1/version
configuration
  addContextWarDependenciestrue/addContextWarDependencies
/configuration
dependencies
  dependency
groupIdcom.mycompany/groupId
artifactIdwar-artifactid/artifactId
version1.0/version
typewar/type
  /dependency
/dependencies
  /plugin


 Thanks,
 -Ryan



WAR Dependency Mediation Problem

2009-04-20 Thread Wolff, Dave
Hello,

 I have a war project for some web services that is having
dependency issues.  I am getting multiple versions of my XML apis and
XML parsers in the resulting war which results in my having to manually
remove the older versions to avoid server-side SAAJ exceptions when
attempting to access the SOAP envelope.

 

For example, the lib folder of the war includes:

xml-apis-1.0.b2.jar

xml-apis-1.3.02.jar

xercesImpl-2.6.2.jar

xercesImpl-2.9.1.jar

jdom-1.0.jar

jdom-1.1.jar

 

I would love to be able to get the duplicates removed so I can avoid
this manual step in my deployment.  I am using the default dependency
plugin options (no configuration changes).   Any help would be
appreciated.

 

Many thanks!

Dave

 

 



RE: WAR Dependency Mediation Problem

2009-04-20 Thread Wolff, Dave
Hello again,
I've been doing more digging and below is a copy of the mvn
dependency:tree output.  With the exception of the jdom 1.0 and 1.1
(1.1 has been moved to a new groupId) there don't appear to be any of
the duplicate dependencies that are being added into my WAR.  

So the question is:  How are these duplicates ending up in my WAR file
if they aren't showing up in the dependency tree?  I'm lost...

Thanks in advance for any help!
Dave


[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'dependency'.
[INFO]

[INFO] Building curriculum-service-ws Maven Webapp
[INFO]task-segment: [dependency:tree]
[INFO]

[INFO] [dependency:tree]
[INFO] edu.letu.curriculum:curriculum-service-ws:war:1.0-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:test (scope not updated to compile)
[INFO] +-
edu.letu.curriculum:curriculum-service:jar:1.0-SNAPSHOT:compile
[INFO] |  \- edu.letu.curriculum:curriculum-dao:jar:1.0-SNAPSHOT:compile
[INFO] | \- joda-time:joda-time-hibernate:jar:1.1:compile
[INFO] |+- commons-logging:commons-logging-api:jar:1.0.4:compile
[INFO] |+- hsqldb:hsqldb:jar:1.7.3.3:compile
[INFO] |+- ehcache:ehcache:jar:1.1:compile
[INFO] |+- cglib:cglib-full:jar:2.0.2:compile
[INFO] |\- antlr:antlr:jar:2.7.2:compile
[INFO] +- edu.letu.curriculum:curriculum-api:jar:1.0-SNAPSHOT:compile
[INFO] |  +-
edu.letu.curriculum:curriculum-domain:jar:1.0-SNAPSHOT:compile
[INFO] |  \- edu.letu.common:lucommon-api:jar:1.9-SNAPSHOT:compile
[INFO] +- org.springframework:spring:jar:2.5.6:compile
[INFO] |  \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- org.springframework:spring-mock:jar:2.0.8:test
[INFO] +- org.springframework:spring-webmvc:jar:2.5.6:compile
[INFO] |  +- org.springframework:spring-beans:jar:2.5.6:compile
[INFO] |  +- org.springframework:spring-context:jar:2.5.6:compile
[INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  +-
org.springframework:spring-context-support:jar:2.5.6:compile
[INFO] |  +- org.springframework:spring-core:jar:2.5.6:compile
[INFO] |  \- org.springframework:spring-web:jar:2.5.6:compile
[INFO] +- org.springframework.ws:spring-ws-core:jar:1.5.6:compile
[INFO] |  +- org.springframework.ws:spring-xml:jar:1.5.6:compile
[INFO] |  +- org.springframework:spring-aop:jar:2.5.6:compile
[INFO] |  +- wsdl4j:wsdl4j:jar:1.6.1:compile
[INFO] |  \- stax:stax-api:jar:1.0.1:compile
[INFO] +- org.springframework.ws:spring-oxm:jar:1.5.6:compile
[INFO] +- javax.servlet:servlet-api:jar:2.4:provided
[INFO] +- commons-dbcp:commons-dbcp:jar:1.2.2:compile
[INFO] |  \- commons-pool:commons-pool:jar:1.3:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.6:runtime
[INFO] +- org.jdom:jdom:jar:1.1:compile
[INFO] +- jaxen:jaxen:jar:1.1:compile
[INFO] |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  +- jdom:jdom:jar:1.0:compile
[INFO] |  +- xml-apis:xml-apis:jar:1.3.02:compile
[INFO] |  \- xom:xom:jar:1.0:compile
[INFO] | +- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO] | \- com.ibm.icu:icu4j:jar:2.6.1:compile
[INFO] +- javax.xml.soap:saaj-api:jar:1.3:runtime
[INFO] |  \- javax.activation:activation:jar:1.1:runtime
[INFO] +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.3:runtime
[INFO] +- xalan:xalan:jar:2.7.1:runtime (scope not updated to compile)
[INFO] |  \- xalan:serializer:jar:2.7.1:runtime
[INFO] +- xerces:xercesImpl:jar:2.9.1:compile
[INFO] \- edu.letu.common:lucommon-domain:jar:1.9-SNAPSHOT:compile
[INFO]+- edu.letu.common:lucommon-util:jar:1.9-SNAPSHOT:compile
[INFO]+- edu.letu.common:lucommon-hibernate:jar:1.9-SNAPSHOT:compile
[INFO]|  \- org.hibernate:hibernate:jar:3.2.4.sp1:compile
[INFO]| +- net.sf.ehcache:ehcache:jar:1.2.3:compile
[INFO]| +- javax.transaction:jta:jar:1.0.1B:compile
[INFO]| +- asm:asm-attrs:jar:1.5.3:compile
[INFO]| +- cglib:cglib:jar:2.1_3:compile
[INFO]| \- asm:asm:jar:1.5.3:compile
[INFO]+- org.jibx:jibx-run:jar:1.2.1:compile
[INFO]|  \- org.codehaus.woodstox:wstx-asl:jar:3.2.1:compile
[INFO]+- org.jibx:jibx-extras:jar:1.2.1:compile
[INFO]+- joda-time:joda-time:jar:1.6:compile
[INFO]\- commons-collections:commons-collections:jar:3.2:compile
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 4 seconds
[INFO] Finished at: Mon Apr 20 12:14:22 CDT 2009
[INFO] Final Memory: 14M/254M
[INFO]




-Original Message-
From: Wolff, Dave [mailto:davidwo...@letu.edu] 
Sent: Monday, April 20, 2009 11:39 AM
To: users@maven.apache.org
Subject: WAR Dependency Mediation Problem

Hello,

 I have a war project for some web services that is having

Re: WAR Dependency Mediation Problem

2009-04-20 Thread Wayne Fay
 So the question is:  How are these duplicates ending up in my WAR file
 if they aren't showing up in the dependency tree?  I'm lost...

Try again with mvn clean package. It is possibly/likely that the
extra jars are from earlier builds and /target has not been cleaned
up.

Wayne

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



RE: WAR Dependency Mediation Problem

2009-04-20 Thread Wolff, Dave
You're a life saver...that solved the issues.

Thanks!
Dave

-Original Message-
From: Wayne Fay [mailto:wayne...@gmail.com] 
Sent: Monday, April 20, 2009 12:28 PM
To: Maven Users List
Subject: Re: WAR Dependency Mediation Problem

 So the question is:  How are these duplicates ending up in my WAR file
 if they aren't showing up in the dependency tree?  I'm lost...

Try again with mvn clean package. It is possibly/likely that the
extra jars are from earlier builds and /target has not been cleaned
up.

Wayne

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



-- 
BEGIN-ANTISPAM-VOTING-LINKS
--

Teach CanIt if this mail (ID 31760286) is spam:
Spam:http://antispam.letu.edu/canit/b.php?i=31760286m=6910a3624efbc=s
Not spam:http://antispam.letu.edu/canit/b.php?i=31760286m=6910a3624efbc=n
Forget vote: http://antispam.letu.edu/canit/b.php?i=31760286m=6910a3624efbc=f
--
END-ANTISPAM-VOTING-LINKS



war dependency not being picked up?

2009-01-12 Thread Ben Avery

hi all,

I've searched, but can't see a suitable answer. apols if I've missed one.

I have a project which has two modules which compile with war packaging, and
I need to perform integration testing using both these wars. the project
contains a web service and WS client on both sides, I need to functionally
test this, deploying the wars using the Cargo plugin.

so I have created a functional-testing module, which contains the tests, but
the tests have dependencies on classes in the other modules. I have listed
the modules as dependencies of the funtional test pom, but the compile phase
fails, as it can't see these classes. if I rig the build to compile the
modules as jars instead, the compilation succeeds (but obviously the tests
can't run, as I need wars to be deployed).

I've checked that the first module is compiling to a war, with the right
names and version numbers, etc, and that the classes needed are contained in
WEB-INF/classes.

I've seen the maven-dependency-plugin mentioned as a solution to this, not
how to do this. what goal would do what I need?

Would it be better to leave the test classes in the modules that compile to
wars, exclude them from that module's surfire configuration, and have the
functional test module contain no code itself, but just call these test
classes? and would this work, or would they also not be able to see the test
classes?

any help would be much appreciated.



snippet of the start of one of the modules which compiles to a war:

project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;
modelVersion4.0.0/modelVersion
groupIdorg.blah.blah/groupId
artifactIdblahWar/artifactId
version1.0.1-Continuous/version
packagingwar/packaging



and the functional test pom:

modelVersion4.0.0/modelVersion
artifactIdfunctional-tests/artifactId
packagingpom/packaging
namefunctional tests/name
...
dependencies
...
dependency
groupIdorg.blah.blah/groupId
artifactIdblahWar/artifactId
version1.0.1-Continuous/version
typewar/type
/dependency
/dependencies
-- 
View this message in context: 
http://www.nabble.com/war-dependency-not-being-picked-up--tp21414576p21414576.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: war dependency not being picked up?

2009-01-12 Thread Wendy Smoak
On Mon, Jan 12, 2009 at 6:37 AM, Ben Avery b...@youthnet.org wrote:


 so I have created a functional-testing module, which contains the tests, but
 the tests have dependencies on classes in the other modules. I have listed
 the [war] modules as dependencies of the funtional test pom, but the compile 
 phase
 fails, as it can't see these classes. if I rig the build to compile the
 modules as jars instead, the compilation succeeds (but obviously the tests
 can't run, as I need wars to be deployed).

This is expected.  Java has no concept of a war file on the classpath.
 (It expects the directory structure to start at the root of the file,
it doesn't know to look down under WEB-INF/classes.)

A couple of options
 - move the classes out to a separate module and build a jar from
that, which would then be a normal dependency for both the war and
the tests, or
 - configure the war plugin to 'attach' the classes as a jar artifact
in addition to the war, so you can depend on the jar from other
projects.

-- 
Wendy

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



Re: war dependency not being picked up?

2009-01-12 Thread Ben Avery

thank you Wendy, that's wonderful :)


for anyone else wanting to do this, here's what I did:

I went for the second option. details on both are on the maven-war-plugin's
FAQ. it's the second part here:
http://maven.apache.org/plugins/maven-war-plugin/faq.html#attached

this only works in the development version of the war plugin (until 2.1 is
released), so add the following to your pluginRepositories tag:

   pluginRepository
idsnapshots/id
urlhttp://people.apache.org/repo/m2-snapshot-repository//url
   /pluginRepository

then you can use version 2.1-beta-1-SNAPSHOT of the war plugin.

now when you run the maven build, you get a jar and a war installed to your
repository. but as the jar file has -classes appended to the filename, you
need to tell maven this by adding:

classifierclasses/classifier

to the dependency tag you need.


thanks again

B



Wendy Smoak-3 wrote:
 
 On Mon, Jan 12, 2009 at 6:37 AM, Ben Avery b...@youthnet.org wrote:
 
 
 so I have created a functional-testing module, which contains the tests,
 but
 the tests have dependencies on classes in the other modules. I have
 listed
 the [war] modules as dependencies of the funtional test pom, but the
 compile phase
 fails, as it can't see these classes. if I rig the build to compile the
 modules as jars instead, the compilation succeeds (but obviously the
 tests
 can't run, as I need wars to be deployed).
 
 This is expected.  Java has no concept of a war file on the classpath.
  (It expects the directory structure to start at the root of the file,
 it doesn't know to look down under WEB-INF/classes.)
 
 A couple of options
  - move the classes out to a separate module and build a jar from
 that, which would then be a normal dependency for both the war and
 the tests, or
  - configure the war plugin to 'attach' the classes as a jar artifact
 in addition to the war, so you can depend on the jar from other
 projects.
 
 -- 
 Wendy
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/war-dependency-not-being-picked-up--tp21414576p21419364.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: War dependency

2008-05-21 Thread ffbeltran

I have a similar scenario, with two webapps. I config the war plugin in
customer war:

plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-war-plugin/artifactId
  configuration
dependentWarExcludesWEB-INF/web.xml, index.jsp/dependentWarExcludes
!-- I want this two files of my customer war --
  /configuration
/plugin

I hope this help you. 

On the other hand, when i have a war dependency, the classes in this war are
not avaible for the project with the dependency. How can i import a war
dependency with this classes?

Sorry for my english.




zalym wrote:
 
 I have a base war, which has the UI layer, and custom wars per customer
 for content and other branding stuff.  I use the maven-war-plugin, for
 packaging the two wars into one, by adding the base war as a dependency to
 the customer war.
 
 The base war has a profile based resource filtering mechanism.  My issue
 is that when I overlay the wars with the customer war, the values have
 already been filtered, and hence no change is affected.  
 
 How do I filter the base war resources while packaging the customer war?
 
 Any help is appreciated.
 
 Regards,
 Saleem
 

-- 
View this message in context: 
http://www.nabble.com/War-dependency-tp10378044p17364168.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem compiling project with WAR dependency

2007-09-26 Thread cdesaint

Hi All,

I've got a couple of projects, 1 is a WAR project, another is a JAR project
which needs to depend on the java classes in the WAR.  Normally, you
wouldn't do this, but in this case, the JAR project is for unit tests and
wants to be able to instantiate the Actions in the WAR project.

In order to get the WAR project to install both a WAR and JAR artifact to
the repository, I've added this plugin to the WAR project:

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
configuration
  classifierfor-unit-tests/classifier
/configuration
executions
  execution
goals
  goaljar/goal
/goals
  /execution
/executions
  /plugin

Then, in order to depend on that code, I have the following dependency in
the Unit Test project:

dependency
  groupId${project.groupId}/groupId
  artifactIdtheArtifact/artifactId
  version${project.version}/version
  classifierfor-unit-tests/classifier
  typejar/type
  scopecompile/scope
/dependency

If I go ahead and compile/install this from this project, it works fine. 
However, if I invoke the compilation at a higher level - for instance if I
go to the root project that is the parent of both of these, and run 'mvn
clean install', the compile step fails because the WAR's target/classes
directory is not on the classpath.  I have no idea why this is the case.  

I've tried to tweak the compiler to include it manually like so:

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
  source1.5/source
  target1.5/target
  verbosetrue/verbose
  compilerArguments
classpathwar_project/target/classes/classpath
  /compilerArguments
/configuration
  /plugin

but then it blows away the rest of the compile classpath.  And I haven't
found a way to manually append to the existing classpath.

Can anyone help me out?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Problem-compiling-project-with-WAR-dependency-tf4524072s177.html#a12907017
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem compiling project with WAR dependency

2007-09-26 Thread Insitu
cdesaint [EMAIL PROTECTED] writes:

 Hi All,

 I've got a couple of projects, 1 is a WAR project, another is a JAR project
 which needs to depend on the java classes in the WAR.  Normally, you
 wouldn't do this, but in this case, the JAR project is for unit tests and
 wants to be able to instantiate the Actions in the WAR project.


Couldn't you just split your war ? If you need to have a separate
artifact for unit testing, then go ahead, the code is telling you it
wants to be split. Modules are cheap in maven.

HTH
-- 
OQube  software engineering \ génie logiciel 
Arnaud Bailly, Dr.
\web http://www.oqube.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem compiling project with WAR dependency

2007-09-26 Thread cdesaint

Yes, that is definitely an option that I may need to pursue.  It's
unfortunate, though, since the way I have it set up *should* work.  This
just seems like a bug in the dependency plugin which it depends on source
modules as opposed to the artifacts built in the repos...


Arnaud Bailly wrote:
 
 cdesaint [EMAIL PROTECTED] writes:
 
 Hi All,

 I've got a couple of projects, 1 is a WAR project, another is a JAR
 project
 which needs to depend on the java classes in the WAR.  Normally, you
 wouldn't do this, but in this case, the JAR project is for unit tests and
 wants to be able to instantiate the Actions in the WAR project.

 
 Couldn't you just split your war ? If you need to have a separate
 artifact for unit testing, then go ahead, the code is telling you it
 wants to be split. Modules are cheap in maven.
 
 HTH
 -- 
 OQube  software engineering \ génie logiciel 
 Arnaud Bailly, Dr.
 \web http://www.oqube.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-compiling-project-with-WAR-dependency-tf4524072s177.html#a12909417
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



War dependency

2007-05-08 Thread zalym

I have a base war, which has the UI layer, and custom wars per customer for
content and other branding stuff.  I use the maven-war-plugin, for packaging
the two wars into one, by adding the base war as a dependency to the
customer war.

The base war has a profile based resource filtering mechanism.  My issue is
that when I overlay the wars with the customer war, the values have already
been filtered, and hence no change is affected.  

How do I filter the base war resources while packaging the customer war?

Any help is appreciated.

Regards,
Saleem
-- 
View this message in context: 
http://www.nabble.com/War-dependency-tf3710334s177.html#a10378044
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WAR dependency in a WAR project (M2) does not compile

2006-07-31 Thread Martin Goldhahn
Hi!
I have a pom that contains a dependency of type war (lets call it
dep:dep:war). The dep:dep:war contains classes that I need for
compilation in my project. When I run the goal compile the dep:dep:war
is downloaded but not included in the compiler plugin's classpath. Am I
missing something here?

Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: WAR dependency in a WAR project (M2) does not compile

2006-07-31 Thread Mike Perham
No, JARs are the standard way to share code.  You can't share code in a
WAR or EAR.  Move the common code into a JAR module.

-Original Message-
From: Martin Goldhahn [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 31, 2006 10:43 AM
To: users@maven.apache.org
Subject: WAR dependency in a WAR project (M2) does not compile

Hi!
I have a pom that contains a dependency of type war (lets call it
dep:dep:war). The dep:dep:war contains classes that I need for
compilation in my project. When I run the goal compile the dep:dep:war
is downloaded but not included in the compiler plugin's classpath. Am I
missing something here?

Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WAR dependency in a WAR project (M2) does not compile

2006-07-31 Thread Wayne Fay

I believe the WAR plugin allows you to overlay one War over another. I
have seen this discussed on this list recently but don't know any
details myself, so you'll need to search the list at Nabble for
overlay to find more info.

Wayne

On 7/31/06, Mike Perham [EMAIL PROTECTED] wrote:

No, JARs are the standard way to share code.  You can't share code in a
WAR or EAR.  Move the common code into a JAR module.

-Original Message-
From: Martin Goldhahn [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 10:43 AM
To: users@maven.apache.org
Subject: WAR dependency in a WAR project (M2) does not compile

Hi!
I have a pom that contains a dependency of type war (lets call it
dep:dep:war). The dep:dep:war contains classes that I need for
compilation in my project. When I run the goal compile the dep:dep:war
is downloaded but not included in the compiler plugin's classpath. Am I
missing something here?

Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WAR dependency

2006-02-26 Thread Akbarr

I'm trying to use war files as web components, reusing not only Java code but 
also static web files. So, I'd need that a war project can have a dependency on 
another war project:

project
  modelVersion4.0.0/modelVersion
  groupIdcom.digibis/groupId
  artifactIdwebmaven_custom/artifactId
  packagingwar/packaging
  (...)
  dependencies
dependency
  groupIdcom.digibis/groupId
  artifactIdwebmaven/artifactId
  typewar/type
  version1.0-SNAPSHOT/version
/dependency
  /dependencies
/project


I know it's not actually possible with Maven2, because dependencies of type 
war are not recognized.

By the way, I suppose I can develop a plugin able to do that, but I'd like to 
know how could I put my war dependency as a parameter to the plugin, so that I 
can work with it.

Thanks in advance,

Andrés



RE: WAR dependency

2006-02-26 Thread Brian E. Fox
Take a look at the dependency-maven-plugin at http://mojo.codehaus.org. I wrote 
it initially for this use case. 

-Original Message-
From: Akbarr [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 26, 2006 5:14 AM
To: Maven Users List
Subject: WAR dependency


I'm trying to use war files as web components, reusing not only Java code but 
also static web files. So, I'd need that a war project can have a dependency on 
another war project:

project
  modelVersion4.0.0/modelVersion
  groupIdcom.digibis/groupId
  artifactIdwebmaven_custom/artifactId
  packagingwar/packaging
  (...)
  dependencies
dependency
  groupIdcom.digibis/groupId
  artifactIdwebmaven/artifactId
  typewar/type
  version1.0-SNAPSHOT/version
/dependency
  /dependencies
/project


I know it's not actually possible with Maven2, because dependencies of type 
war are not recognized.

By the way, I suppose I can develop a plugin able to do that, but I'd like to 
know how could I put my war dependency as a parameter to the plugin, so that I 
can work with it.

Thanks in advance,

Andrés



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where do I find a war dependency

2005-11-25 Thread Dietrich Schulten
Hi,

we want to write httpunit tests for a deployed war file.

How should we proceed? Obviously we cannot put the tests into the project that 
creates the war artifact since we cannot test without the war file, and with 
failing tests the war cannot be created.

We came up with the idea to create a new test project foo-deployment-test that 
has a dependency pointing to the war artifactId. This should make sure  that

mvn install

in the top level succeeds. First the war should be installed, then the 
deployment test should try to deploy it and run tests against it.

Our deployment tests use cargo to deploy to a tomcat. Cargo needs a file 
location for the war.

Where should we look for the war? Is there a place where war dependencies end 
up?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



A war dependency

2004-11-04 Thread MIDON ALEXIS
 
 
Hi,
 
I would like to create a war dependency in my project.xml.
 
This war is created by the war plugin and installed in the following repo
directory : my_war/wars/my_war-2.0.war
 
Unfortunately the dependency mechanism looks for a jar not a war and the
type tag is useless.
 
Meanwhile I altered the war plugin properties so the war is installed in
my_war/jars/my_war-2.0.war and wrote the following dependency to get it :
 
dependency
idmy_war/id
version2.0/version
jarmy_war-2.0.war/jar
/dependency  
 
This solution does not satisfy me at all.
 
Could you give the proper solution if exists?
 
Thx in advance for answers
 
Alexis


Réf. : A war dependency

2004-11-04 Thread Nicolas . CHALUMEAU
Use the type element :
dependency
idmy_war/id
version2.0/version
typewar/type
/dependency

Nicolas,





MIDON ALEXIS [EMAIL PROTECTED]
04/11/2004 11:57
Veuillez répondre à Maven Users List

 
Pour :  Maven Users List [EMAIL PROTECTED]
cc : 
Objet : A war dependency


 
 
Hi,
 
I would like to create a war dependency in my project.xml.
 
This war is created by the war plugin and installed in the following repo
directory : my_war/wars/my_war-2.0.war
 
Unfortunately the dependency mechanism looks for a jar not a war and the
type tag is useless.
 
Meanwhile I altered the war plugin properties so the war is installed in
my_war/jars/my_war-2.0.war and wrote the following dependency to get it 
:
 
dependency
idmy_war/id
version2.0/version
jarmy_war-2.0.war/jar
/dependency 
 
This solution does not satisfy me at all.
 
Could you give the proper solution if exists?
 
Thx in advance for answers
 
Alexis




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: A war dependency

2004-11-04 Thread James . Shute
I think 

dependency
idmy_war/id
version2.0/version
typewar/type
/dependency

is what you're after

James

-Original Message-
From: MIDON ALEXIS [mailto:[EMAIL PROTECTED] 
Sent: 04 November 2004 10:57
To: Maven Users List
Subject: A war dependency


 
 
Hi,
 
I would like to create a war dependency in my project.xml.
 
This war is created by the war plugin and installed in the following repo
directory : my_war/wars/my_war-2.0.war
 
Unfortunately the dependency mechanism looks for a jar not a war and the
type tag is useless.
 
Meanwhile I altered the war plugin properties so the war is installed in
my_war/jars/my_war-2.0.war and wrote the following dependency to get it :
 
dependency
idmy_war/id
version2.0/version
jarmy_war-2.0.war/jar
/dependency  
 
This solution does not satisfy me at all.
 
Could you give the proper solution if exists?
 
Thx in advance for answers
 
Alexis



For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: A war dependency

2004-11-04 Thread Maczka Michal


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 04, 2004 12:01 PM
 To: [EMAIL PROTECTED]
 Subject: RE: A war dependency
 
 
 I think 
 
 dependency
 idmy_war/id
 version2.0/version
 typewar/type
 /dependency
 
 is what you're after
 

Note that id tag is also depreacted!
groupId, artifactId pair of tags should be used instead.

Michal

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]