How to create two projects, one of them is using the other ?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to create two projects, one of them is using the other ?

mlotfi
Hi,

I want to create a project ServerA that need to use a jar project called shareJar , how to create a such construction using maven :

------ServerA
|           ^
|           |
-----shareJar

Thanks, your help is appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: How to create two projects, one of them is using the other ?

AlonsoIR
I think you need this:

http://www.sonatype.com/books/mvnex-book/reference/multimodule.html



Alonso Isidoro Roman.

Mis citas preferidas (de hoy) :
"Si depurar es el proceso de quitar los errores de software, entonces
programar debe ser el proceso de introducirlos..."
 -  Edsger Dijkstra

My favorite quotes (today):
"If debugging is the process of removing software bugs, then programming
must be the process of putting ..."
  - Edsger Dijkstra

"If you pay peanuts you get monkeys"



2013/4/9 mlotfi <[hidden email]>

> Hi,
>
> I want to create a project ServerA that need to use a jar project called
> shareJar , how to create a such construction using maven :
>
> ------ServerA
> |           ^
> |           |
> -----shareJar
>
> Thanks, your help is appreciated.
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/How-to-create-two-projects-one-of-them-is-using-the-other-tp5753312.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to create two projects, one of them is using the other ?

mlotfi
Thank you very match, this was helpful .
Reply | Threaded
Open this post in threaded view
|

Re: How to create two projects, one of them is using the other ?

mlotfi
In reply to this post by AlonsoIR
Thank you again.
from the link you gave me in your response, it will be a multi-module project :

parentProject
pom.xml
|
|---webProject
      pom.xml
|
|---jarProject
      pom.xml

if we want to use this structure for Continuous Integration using Jenkins and maven, how will be the setup ? do we have to give Jenkins only the pom.xml of the parentProject ?

thanks, your help is appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: How to create two projects, one of them is using the other ?

Anders Hammar
Yes.

/Anders (mobile)
Den 10 apr 2013 14:57 skrev "mlotfi" <[hidden email]>:

> Thank you again.
> from the link you gave me in your response, it will be a multi-module
> project :
>
> parentProject
> pom.xml
> |
> |---webProject
>       pom.xml
> |
> |---jarProject
>       pom.xml
>
> if we want to use this structure for Continuous Integration using Jenkins
> and maven, how will be the setup ? do we have to give Jenkins only the
> pom.xml of the parentProject ?
>
> thanks, your help is appreciated.
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/How-to-create-two-projects-one-of-them-is-using-the-other-tp5753312p5753428.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to create two projects, one of them is using the other ?

AlonsoIR
sorry, i use nexus as maven repo. I dont know nothing about jenkins, *but
this link<https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Maven+Repository+Server>
maybe
help.*

Alonso Isidoro Roman.

Mis citas preferidas (de hoy) :
"Si depurar es el proceso de quitar los errores de software, entonces
programar debe ser el proceso de introducirlos..."
 -  Edsger Dijkstra

My favorite quotes (today):
"If debugging is the process of removing software bugs, then programming
must be the process of putting ..."
  - Edsger Dijkstra

"If you pay peanuts you get monkeys"



2013/4/10 Anders Hammar <[hidden email]>

> Yes.
>
> /Anders (mobile)
> Den 10 apr 2013 14:57 skrev "mlotfi" <[hidden email]>:
>
> > Thank you again.
> > from the link you gave me in your response, it will be a multi-module
> > project :
> >
> > parentProject
> > pom.xml
> > |
> > |---webProject
> >       pom.xml
> > |
> > |---jarProject
> >       pom.xml
> >
> > if we want to use this structure for Continuous Integration using Jenkins
> > and maven, how will be the setup ? do we have to give Jenkins only the
> > pom.xml of the parentProject ?
> >
> > thanks, your help is appreciated.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://maven.40175.n5.nabble.com/How-to-create-two-projects-one-of-them-is-using-the-other-tp5753312p5753428.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: How to create two projects, one of them is using the other ?

mlotfi
I am little bit confused here, does maven have more than one repository ?
Reply | Threaded
Open this post in threaded view
|

Re: How to create two projects, one of them is using the other ?

Adrien Rivard
In reply to this post by mlotfi
On Wed, Apr 10, 2013 at 2:57 PM, mlotfi <[hidden email]> wrote:

> Thank you again.
> from the link you gave me in your response, it will be a multi-module
> project :
>
> parentProject
> pom.xml
> |
> |---webProject
>       pom.xml
> |
> |---jarProject
>       pom.xml
>
> if we want to use this structure for Continuous Integration using Jenkins
> and maven, how will be the setup ? do we have to give Jenkins only the
> pom.xml of the parentProject ?
>
>
Usually yes.
In short in jenkins/Hudson you  create a new maven2/3 job, you  specify the
git/svn url for the parent project, you specify the phase to execute (mvn
package ?) and you're good.




> thanks, your help is appreciated.
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/How-to-create-two-projects-one-of-them-is-using-the-other-tp5753312p5753428.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Adrien Rivard
Reply | Threaded
Open this post in threaded view
|

Re: How to create two projects, one of them is using the other ?

Adrien Rivard
In reply to this post by mlotfi
On Wed, Apr 10, 2013 at 3:15 PM, mlotfi <[hidden email]> wrote:

> I am little bit confused here, does maven have more than one repository ?
>
>
It can.

For  simple project you generally use only maven central.
For more complex project, you may have to add others.

For intensive use it is very encouraged to use nexus or others MRM , which
will act as repository and as proxy for others repositories.

Using Jenkins as a repository is possible but should be use only for very
special need.

For more explanation you should take a look at
http://maven.apache.org/repository-management.html



>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/How-to-create-two-projects-one-of-them-is-using-the-other-tp5753312p5753431.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Adrien Rivard
Reply | Threaded
Open this post in threaded view
|

Re: How to create two projects, one of them is using the other ?

mlotfi
In reply to this post by Adrien Rivard
Thank you Adrien,
is there any example or tutorial on how to do these steps ?
thanks