You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Daivish Shah <da...@gmail.com> on 2012/02/21 21:09:15 UTC

One question about Multi Project Structure in MAVEN

Hi,

I have a project with following structure.

maven-main-project
           maven-ear
           maven-ejb
           maven-schema
           maven-pojo
           maven-java

This is my project structure for multi-module project. And now if i don't
want to publish any artifacts outside of this project. I mean to say i
don't want to publish any artifactory/nexus/archiva repository copy for
other people to use it.

*Use Case :*

Here my maven-ear is part of the maven-main-project and that's the only
module which use the maven-pojo and maven-java generated artifacts and
which i don't want to publish it on repository but just want to use it for
building the EAR.

How can i disable those 2 (maven-pojo and maven-java) projects not to
publish artifacts at repository level.

Looking for some solution on this, As don't want to create unncessary
artifacts on repository as nobody is going to use it other then my own Main
project EAR project.

Thanks.

RE: One question about Multi Project Structure in MAVEN

Posted by Ch...@emc.com.
> So basically i have to use deploy plugin to deploy the stuffs at repository and
> over there i can define what components i want to publish or deployed.

Sometimes the definitions are kind of vague in the maven literature.  A "repository" is simply the thing that holds your maven artifacts.  There's your "local" one, .m2, and  zero to many "remote" ones.  "Deploy" means put the artifact in a remote repository.  "Install" means put it in your local one.  The remote ones can be public, or private.  You most assuredly want a private one.  At some point, you might also deploy a publicly distributable artifact to a public repository, like maven central, so the public can get to it.  

 


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


RE: One question about Multi Project Structure in MAVEN

Posted by "Thiessen, Todd (Todd)" <tt...@avaya.com>.
Ya. Installing to local and overriding how the artifacts get deployed is asking for trouble.

> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Wednesday, February 22, 2012 5:06 AM
> To: Maven Users List
> Subject: Re: One question about Multi Project Structure in MAVEN
> 
> > Thanks a lot !! That is all i wanted to confirm with you guys.
> >
> > So basically i have to use deploy plugin to deploy the stuffs at
> repository
> > and over there i can define what components i want to publish or
> deployed.
> >
> > And locally i will have all those copy available by executing mvn
> install.
> 
> Do be aware that if you just use the same POM files in the deployment
> that you use to build, you may end up with Maven complaining about
> missing artifacts since you are not uploading all of the files, and
> you may have configured them as dependencies for some of your
> projects.
> 
> So you might need to make another set of POM files just for the
> deployment and remove these 2 modules and all references to them as
> dependencies from the POMs.
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


Re: One question about Multi Project Structure in MAVEN

Posted by Wayne Fay <wa...@gmail.com>.
> Thanks a lot !! That is all i wanted to confirm with you guys.
>
> So basically i have to use deploy plugin to deploy the stuffs at repository
> and over there i can define what components i want to publish or deployed.
>
> And locally i will have all those copy available by executing mvn install.

Do be aware that if you just use the same POM files in the deployment
that you use to build, you may end up with Maven complaining about
missing artifacts since you are not uploading all of the files, and
you may have configured them as dependencies for some of your
projects.

So you might need to make another set of POM files just for the
deployment and remove these 2 modules and all references to them as
dependencies from the POMs.

Wayne

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


Re: One question about Multi Project Structure in MAVEN

Posted by Daivish Shah <da...@gmail.com>.
Hi Wayne,

Thanks a lot !! That is all i wanted to confirm with you guys.

So basically i have to use deploy plugin to deploy the stuffs at repository
and over there i can define what components i want to publish or deployed.

And locally i will have all those copy available by executing mvn install.

This is what i wanted.

Thanks.


On Tue, Feb 21, 2012 at 2:20 PM, Wayne Fay <wa...@gmail.com> wrote:

> > But when we execute MVN INSTALL it will generate all artifacts locally or
> > on our local cache correct ?
>
> Yes it will generate all artifacts locally in your local
> ~/.m2/repository directory or where ever you have configured the
> localRepository in settings.xml.
>
> It is not possible to turn off generation of the files into this directory.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: One question about Multi Project Structure in MAVEN

Posted by Wayne Fay <wa...@gmail.com>.
> But when we execute MVN INSTALL it will generate all artifacts locally or
> on our local cache correct ?

Yes it will generate all artifacts locally in your local
~/.m2/repository directory or where ever you have configured the
localRepository in settings.xml.

It is not possible to turn off generation of the files into this directory.

Wayne

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


Re: One question about Multi Project Structure in MAVEN

Posted by Daivish Shah <da...@gmail.com>.
HI wayne,

I think deploy approach is the correct one looks like in this case.

But when we execute MVN INSTALL it will generate all artifacts locally or
on our local cache correct ?

Thanks.


On Tue, Feb 21, 2012 at 12:50 PM, Wayne Fay <wa...@gmail.com> wrote:

> > How can i disable those 2 (maven-pojo and maven-java) projects not to
> > publish artifacts at repository level.
>
> You can perhaps try to do this using deploy:deploy-file to only deploy
> the specific files/artifacts you want deployed but not the entire
> project.
>
> > Looking for some solution on this, As don't want to create unncessary
> > artifacts on repository as nobody is going to use it other then my own
> Main
> > project EAR project.
>
> This isn't sufficient justification for these efforts, IMO.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: One question about Multi Project Structure in MAVEN

Posted by Ron Wheeler <rw...@artifact-software.com>.
On 21/02/2012 3:50 PM, Wayne Fay wrote:
>> How can i disable those 2 (maven-pojo and maven-java) projects not to
>> publish artifacts at repository level.
> You can perhaps try to do this using deploy:deploy-file to only deploy
> the specific files/artifacts you want deployed but not the entire
> project.
>
>> Looking for some solution on this, As don't want to create unncessary
>> artifacts on repository as nobody is going to use it other then my own Main
>> project EAR project.
> This isn't sufficient justification for these efforts, IMO.
+1 Unless you are building a personal toy that will never go into 
production use and will never require maintenance.
If it is a serious project, it should be properly structured and 
everything required to build and maintain it should be in a repo of some 
kind - sources in SCM, jars in Maven Repo.
If you do not put the jars in a repo, then you may have to check out a 
bunch of sources to rebuild something that is not changing in order to 
update a configuration file.


Ron

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


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



Re: One question about Multi Project Structure in MAVEN

Posted by Wayne Fay <wa...@gmail.com>.
> How can i disable those 2 (maven-pojo and maven-java) projects not to
> publish artifacts at repository level.

You can perhaps try to do this using deploy:deploy-file to only deploy
the specific files/artifacts you want deployed but not the entire
project.

> Looking for some solution on this, As don't want to create unncessary
> artifacts on repository as nobody is going to use it other then my own Main
> project EAR project.

This isn't sufficient justification for these efforts, IMO.

Wayne

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


RE: One question about Multi Project Structure in MAVEN

Posted by Matt Walsh <mw...@chartwelltechnology.com>.
Put this in your pojo and java poms:

                        <plugin>
 
<artifactId>maven-deploy-plugin</artifactId>
                                <configuration>
                                        <skip>true</skip>
                                </configuration>
                        </plugin>

It will still install to local, but won't deploy to remote.

> -----Original Message-----
> From: Daivish Shah [mailto:daivish.shah@gmail.com]
> Sent: Tuesday, February 21, 2012 1:09 PM
> To: Maven Users List
> Subject: One question about Multi Project Structure in MAVEN
> 
> Hi,
> 
> I have a project with following structure.
> 
> maven-main-project
>            maven-ear
>            maven-ejb
>            maven-schema
>            maven-pojo
>            maven-java
> 
> This is my project structure for multi-module project. And now if i
> don't
> want to publish any artifacts outside of this project. I mean to say i
> don't want to publish any artifactory/nexus/archiva repository copy
for
> other people to use it.
> 
> *Use Case :*
> 
> Here my maven-ear is part of the maven-main-project and that's the
only
> module which use the maven-pojo and maven-java generated artifacts and
> which i don't want to publish it on repository but just want to use it
> for
> building the EAR.
> 
> How can i disable those 2 (maven-pojo and maven-java) projects not to
> publish artifacts at repository level.
> 
> Looking for some solution on this, As don't want to create unncessary
> artifacts on repository as nobody is going to use it other then my own
> Main
> project EAR project.
> 
> Thanks.

______________________________________________________________________
This message, including any attachments, is confidential and contains information intended only for the person(s) named above. Any other distribution, copying or disclosure is strictly prohibited. If you are not the intended recipient or have received this message in error, please notify us immediately by reply email and permanently delete the original transmission from all of your systems and hard drives, including any attachments, without making a copy.

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


Re: One question about Multi Project Structure in MAVEN

Posted by Curtis Rueden <ct...@wisc.edu>.
>
> "Publish" does not mean to the whole world.
>

Well, it *can*, if that's what you want... ;-)

-Curtis


On Tue, Feb 21, 2012 at 4:25 PM, Ron Wheeler <rwheeler@artifact-software.com
> wrote:

> On 21/02/2012 3:09 PM, Daivish Shah wrote:
>
>> Hi,
>>
>> I have a project with following structure.
>>
>> maven-main-project
>>            maven-ear
>>            maven-ejb
>>            maven-schema
>>            maven-pojo
>>            maven-java
>>
>> This is my project structure for multi-module project. And now if i don't
>> want to publish any artifacts outside of this project. I mean to say i
>> don't want to publish any artifactory/nexus/archiva repository copy for
>> other people to use it.
>>
> Other people being your coworkers and co-developers?
> A Maven repo is a private place.
> You control who has access.
> It is normally only for your team (even if you are the whole team).
>
> If you are using Maven you need a repo. We went for 2 years without one
> and it was a really stupid oversight on our part.
> It greatly simplifies your life and makes Maven much easier to understand
> and makes it much easier to do the right things.
> "Publish" does not mean to the whole world.
>
> Ron
>
>
>  *Use Case :*
>>
>> Here my maven-ear is part of the maven-main-project and that's the only
>> module which use the maven-pojo and maven-java generated artifacts and
>> which i don't want to publish it on repository but just want to use it for
>> building the EAR.
>>
>> How can i disable those 2 (maven-pojo and maven-java) projects not to
>> publish artifacts at repository level.
>>
>> Looking for some solution on this, As don't want to create unncessary
>> artifacts on repository as nobody is going to use it other then my own
>> Main
>> project EAR project.
>>
>> Thanks.
>>
>>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Re: One question about Multi Project Structure in MAVEN

Posted by Ron Wheeler <rw...@artifact-software.com>.
On 21/02/2012 3:09 PM, Daivish Shah wrote:
> Hi,
>
> I have a project with following structure.
>
> maven-main-project
>             maven-ear
>             maven-ejb
>             maven-schema
>             maven-pojo
>             maven-java
>
> This is my project structure for multi-module project. And now if i don't
> want to publish any artifacts outside of this project. I mean to say i
> don't want to publish any artifactory/nexus/archiva repository copy for
> other people to use it.
Other people being your coworkers and co-developers?
A Maven repo is a private place.
You control who has access.
It is normally only for your team (even if you are the whole team).

If you are using Maven you need a repo. We went for 2 years without one 
and it was a really stupid oversight on our part.
It greatly simplifies your life and makes Maven much easier to 
understand and makes it much easier to do the right things.
"Publish" does not mean to the whole world.

Ron

> *Use Case :*
>
> Here my maven-ear is part of the maven-main-project and that's the only
> module which use the maven-pojo and maven-java generated artifacts and
> which i don't want to publish it on repository but just want to use it for
> building the EAR.
>
> How can i disable those 2 (maven-pojo and maven-java) projects not to
> publish artifacts at repository level.
>
> Looking for some solution on this, As don't want to create unncessary
> artifacts on repository as nobody is going to use it other then my own Main
> project EAR project.
>
> Thanks.
>


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



RE: One question about Multi Project Structure in MAVEN

Posted by "Bobbepalli, Purnachandrarao" <pu...@chase.com>.
Please have a look on the following....


<build>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          
          <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
          
        </configuration>
      </plugin>
    </plugins>
  </build>

-----Original Message-----
From: Daivish Shah [mailto:daivish.shah@gmail.com] 
Sent: Tuesday, February 21, 2012 3:09 PM
To: Maven Users List
Subject: One question about Multi Project Structure in MAVEN

Hi,

I have a project with following structure.

maven-main-project
           maven-ear
           maven-ejb
           maven-schema
           maven-pojo
           maven-java

This is my project structure for multi-module project. And now if i don't want to publish any artifacts outside of this project. I mean to say i don't want to publish any artifactory/nexus/archiva repository copy for other people to use it.

*Use Case :*

Here my maven-ear is part of the maven-main-project and that's the only module which use the maven-pojo and maven-java generated artifacts and which i don't want to publish it on repository but just want to use it for building the EAR.

How can i disable those 2 (maven-pojo and maven-java) projects not to publish artifacts at repository level.

Looking for some solution on this, As don't want to create unncessary artifacts on repository as nobody is going to use it other then my own Main project EAR project.

Thanks.
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
 If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.

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