You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier Lamy <ol...@accor.com> on 2006/03/16 09:54:51 UTC

RE : using classes from another web project

Hi,
Do you have set the dependency in project B to project A (type war).
I think but not really sure ( ;-) ) this will be included in the next
war plugin version [1] (try the snapshot).
But for the version 2.0-beta-2, it doesn't work [2].
But for the moment if it's a share component just add a new module (type
jar) with dependency to this in project A and B ?

- Olivier

[1]
http://svn.apache.org/viewcvs.cgi/maven/plugins/trunk/maven-war-plugin/s
rc/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java?rev=385799
&view=markup method buildWebapp()

[2]
http://svn.apache.org/viewcvs.cgi/maven/components/tags/maven-war-plugin
-2.0-beta-2/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.ja
va?rev=321457&view=markup method buildWebapp()

-----Message d'origine-----
De : Christian Mouttet [mailto:christian.mouttet@it2media.de] 
Envoyé : jeudi 16 mars 2006 09:44
À : Maven Users List
Objet : Re: using classes from another web project


any ideas?

Am Mittwoch, 15. März 2006 16:23 schrieb Christian Mouttet:
> Hi all,
>
> I have two web applications that share code. An implementation of 
> javax.servlet.Filter in Project A should be used by Project B.
>
> With Maven-1 I built a project-a-x.y.jar and defined a dependency to 
> it. The generated project-a.war could be deployed on the application 
> server.
>
> In the pom.xml (Maven-2) I have configured <packaging>war</packaging> 
> and only the .war file is generated (installed or deployed to central 
> repository).
>
> How is it possible to build .jar AND .war files of this type of 
> projects?
>
>
> Regards,
>
> -chris


**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft. mailsweeper@it2media.de
**********************************************************************

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



This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------


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


Re: using classes from another web project

Posted by Christian Mouttet <ch...@it2media.de>.
merci!

Am Donnerstag, 16. März 2006 11:04 schrieb Olivier Lamy:
> New module is great because it will be published as an artifact.
> Then you can share this with other applications.
>
> But I'm not sure of this but I think a war is added to the classpath.
> Just try ;-)
>
> - Olivier


**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft.
mailsweeper@it2media.de
**********************************************************************

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


RE : using classes from another web project

Posted by Olivier Lamy <ol...@accor.com>.
New module is great because it will be published as an artifact.
Then you can share this with other applications.

But I'm not sure of this but I think a war is added to the classpath.
Just try ;-)

- Olivier

-----Message d'origine-----
De : Christian Mouttet [mailto:christian.mouttet@it2media.de] 
Envoyé : jeudi 16 mars 2006 10:38
À : Maven Users List
Objet : Re: using classes from another web project


Olivier,

thanks for your response. It seems to me that the new-module alternative
is 
the only solution. I imagine that dependencies to type-war projects
can't  
correctly be loaded by the classloader.

Just want to be sure that there isn't an official resolution for such
kind of 
project dependencies. That's a pity since I have to refactor all my
maven-1 
web projects. :-(


-chris

Am Donnerstag, 16. März 2006 09:54 schrieb Olivier Lamy:
> Hi,
> Do you have set the dependency in project B to project A (type war). I

> think but not really sure ( ;-) ) this will be included in the next 
> war plugin version [1] (try the snapshot). But for the version 
> 2.0-beta-2, it doesn't work [2]. But for the moment if it's a share 
> component just add a new module (type
> jar) with dependency to this in project A and B ?
>
> - Olivier
>
> [1] 
> http://svn.apache.org/viewcvs.cgi/maven/plugins/trunk/maven-war-plugin
> /s
>
rc/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java?rev=385799
> &view=markup method buildWebapp()
>
> [2] 
> http://svn.apache.org/viewcvs.cgi/maven/components/tags/maven-war-plug
> in
>
-2.0-beta-2/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.ja
> va?rev=321457&view=markup method buildWebapp()
>
> -----Message d'origine-----
> De : Christian Mouttet [mailto:christian.mouttet@it2media.de]
> Envoyé : jeudi 16 mars 2006 09:44
> À : Maven Users List
> Objet : Re: using classes from another web project
>
>
> any ideas?
>
> Am Mittwoch, 15. März 2006 16:23 schrieb Christian Mouttet:
> > Hi all,
> >
> > I have two web applications that share code. An implementation of 
> > javax.servlet.Filter in Project A should be used by Project B.
> >
> > With Maven-1 I built a project-a-x.y.jar and defined a dependency to

> > it. The generated project-a.war could be deployed on the application

> > server.
> >
> > In the pom.xml (Maven-2) I have configured 
> > <packaging>war</packaging> and only the .war file is generated 
> > (installed or deployed to central repository).
> >
> > How is it possible to build .jar AND .war files of this type of 
> > projects?
> >
> >
> > Regards,
> >
> > -chris
>
> **********************************************************************
> Diese E-Mail wurde auf Viren ueberprueft. mailsweeper@it2media.de
> **********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> This e-mail, any attachments and the information contained therein 
>("this
> message") are confidential and intended solely for the use of the
> addressee(s). If you have received this message in error please send
it
> back to the sender and delete it. Unauthorized publication, use,
> dissemination or disclosure of this message, either in whole or in
part is
> strictly prohibited.
>
------------------------------------------------------------------------
---
>----------------------------------- Ce message électronique et tous les
> fichiers joints ainsi que  les informations contenues dans ce message
( ci
> après "le message" ), sont confidentiels et destinés exclusivement à
> l'usage de la  personne à laquelle ils sont adressés. Si vous avez
reçu ce
> message par erreur, merci  de le renvoyer à son émetteur et de le
détruire.
> Toutes diffusion, publication, totale ou partielle ou divulgation sous
> quelque forme que se soit non expressément autorisées de ce message,
sont
> interdites.
>
------------------------------------------------------------------------
---
>----------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 

IT2media
GmbH & Co. KG
Geschäftsstelle München


Kontakt:
Fürstenrieder Straße 265, 81377 München
Postfach 70 08 40, 81308 München
Telefon:        +49/(0)89/74126-399
Telefax:        +49/(0)89/74126-201

mailto:christian.mouttet@it2media.de


---------------------------------------------------------------------
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: using classes from another web project

Posted by Christian Mouttet <ch...@it2media.de>.
Olivier,

thanks for your response. It seems to me that the new-module alternative is 
the only solution. I imagine that dependencies to type-war projects can't  
correctly be loaded by the classloader.

Just want to be sure that there isn't an official resolution for such kind of 
project dependencies. That's a pity since I have to refactor all my maven-1 
web projects. :-(


-chris

Am Donnerstag, 16. März 2006 09:54 schrieb Olivier Lamy:
> Hi,
> Do you have set the dependency in project B to project A (type war).
> I think but not really sure ( ;-) ) this will be included in the next
> war plugin version [1] (try the snapshot).
> But for the version 2.0-beta-2, it doesn't work [2].
> But for the moment if it's a share component just add a new module (type
> jar) with dependency to this in project A and B ?
>
> - Olivier
>
> [1]
> http://svn.apache.org/viewcvs.cgi/maven/plugins/trunk/maven-war-plugin/s
> rc/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java?rev=385799
> &view=markup method buildWebapp()
>
> [2]
> http://svn.apache.org/viewcvs.cgi/maven/components/tags/maven-war-plugin
> -2.0-beta-2/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.ja
> va?rev=321457&view=markup method buildWebapp()
>
> -----Message d'origine-----
> De : Christian Mouttet [mailto:christian.mouttet@it2media.de]
> Envoyé : jeudi 16 mars 2006 09:44
> À : Maven Users List
> Objet : Re: using classes from another web project
>
>
> any ideas?
>
> Am Mittwoch, 15. März 2006 16:23 schrieb Christian Mouttet:
> > Hi all,
> >
> > I have two web applications that share code. An implementation of
> > javax.servlet.Filter in Project A should be used by Project B.
> >
> > With Maven-1 I built a project-a-x.y.jar and defined a dependency to
> > it. The generated project-a.war could be deployed on the application
> > server.
> >
> > In the pom.xml (Maven-2) I have configured <packaging>war</packaging>
> > and only the .war file is generated (installed or deployed to central
> > repository).
> >
> > How is it possible to build .jar AND .war files of this type of
> > projects?
> >
> >
> > Regards,
> >
> > -chris
>
> **********************************************************************
> Diese E-Mail wurde auf Viren ueberprueft. mailsweeper@it2media.de
> **********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> This e-mail, any attachments and the information contained therein ("this
> message") are confidential and intended solely for the use of the
> addressee(s). If you have received this message in error please send it
> back to the sender and delete it. Unauthorized publication, use,
> dissemination or disclosure of this message, either in whole or in part is
> strictly prohibited.
> ---------------------------------------------------------------------------
>----------------------------------- Ce message électronique et tous les
> fichiers joints ainsi que  les informations contenues dans ce message ( ci
> après "le message" ), sont confidentiels et destinés exclusivement à
> l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce
> message par erreur, merci  de le renvoyer à son émetteur et de le détruire.
> Toutes diffusion, publication, totale ou partielle ou divulgation sous
> quelque forme que se soit non expressément autorisées de ce message, sont
> interdites.
> ---------------------------------------------------------------------------
>----------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 

IT2media
GmbH & Co. KG
Geschäftsstelle München


Kontakt:
Fürstenrieder Straße 265, 81377 München
Postfach 70 08 40, 81308 München
Telefon:        +49/(0)89/74126-399
Telefax:        +49/(0)89/74126-201

mailto:christian.mouttet@it2media.de


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