You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by burki <da...@segmentone.com> on 2008/05/20 19:30:36 UTC

Off-line maven repository

I'm finally switching form ant to maven - maven is new to me, so please bear
with me if the question below sounds idiotic ;-)

I need to build an off-line maven repository for the cxf modules.  As a
first step, I used the assembly task to build a repository packaged as a
jar.  

Most of the cxf the poms in the generated archive (and in .m2/) contain a
parent reference like:

    <parent>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-parent</artifactId>
        <version>2.1</version>
        <relativePath>../../../parent/pom.xml</relativePath>
    </parent>

If you're actually working with the cxf sources, you'll find parent/pom.xml.
But that might not always be the case - you might want to use a different
directory structure.

Interestingly, the repository structure for cxf also contains the module
"cxf-parent", whose cxf-parent-2.1.pom is identical to the parent/pom.xml
found in the source distribution.

Can anyone shed some insight as to why cxf modules contain that parent
dependency?  Could I instead just declare a dependency on cxf-parent (and
thus not having to rely on the relative path that might not exist)?

Cheers,

--dan



-- 
View this message in context: http://www.nabble.com/Off-line-maven-repository-tp17346046p17346046.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Off-line maven repository

Posted by burki <da...@segmentone.com>.
Thanks for pointing this out, you are right, maven will go get what it needs
and cache it in .m2.  For a number of reasons however, I need to reference
an "off-line" repository on the local network (I don't really want to debate
the merits of doing this ...)

dkulp was nice enough to tell me what I wanted to hear ;-)

http://www.nabble.com/Off-line-maven-repository-tp17346046p17347289.html
http://www.nabble.com/Off-line-maven-repository-tp17346046p17347289.html 



Glen Mazza-2 wrote:
> 
> 2008-05-20 burki wrote:
> 
>> I'm finally switching form ant to maven - maven is new to me, so please
>> bear
>> with me if the question below sounds idiotic ;-)
>> 
>> I need to build an off-line maven repository for the cxf modules.  As a
>> first step, I used the assembly task to build a repository packaged as a
>> jar.  
>> 
> 
> I think Maven will do that itself for you--you don't need to create the
> repository manually.  Just by creating a Mavenized project[1] it will
> download everything for you.  On Linux, it will be located
> at /home/youraccount/.m2/repository; I'm unsure with Windows.
> 
> Glen
> 
> [1] http://www.jroller.com/gmazza/date/20080417
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Off-line-maven-repository-tp17346046p17347773.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Off-line maven repository

Posted by Glen Mazza <gl...@verizon.net>.
2008-05-20 burki wrote:

> I'm finally switching form ant to maven - maven is new to me, so please bear
> with me if the question below sounds idiotic ;-)
> 
> I need to build an off-line maven repository for the cxf modules.  As a
> first step, I used the assembly task to build a repository packaged as a
> jar.  
> 

I think Maven will do that itself for you--you don't need to create the
repository manually.  Just by creating a Mavenized project[1] it will
download everything for you.  On Linux, it will be located
at /home/youraccount/.m2/repository; I'm unsure with Windows.

Glen

[1] http://www.jroller.com/gmazza/date/20080417




Re: Off-line maven repository

Posted by burki <da...@segmentone.com>.
Perfect - exactly what I was hoping for - thanks!

--dan


dkulp wrote:
> 
> 
> On May 20, 2008, at 1:30 PM, burki wrote:
> 
>>
>> I'm finally switching form ant to maven - maven is new to me, so  
>> please bear
>> with me if the question below sounds idiotic ;-)
>>
>> I need to build an off-line maven repository for the cxf modules.   
>> As a
>> first step, I used the assembly task to build a repository packaged  
>> as a
>> jar.
>>
>> Most of the cxf the poms in the generated archive (and in .m2/)  
>> contain a
>> parent reference like:
>>
>>    <parent>
>>        <groupId>org.apache.cxf</groupId>
>>        <artifactId>cxf-parent</artifactId>
>>        <version>2.1</version>
>>        <relativePath>../../../parent/pom.xml</relativePath>
>>    </parent>
> 
> The relative path stuff is really just used if mvn cannot find the  
> parent in any of the configured repositories.   For the most part,  
> that just means when building CXF from source.     You can ignore it  
> 99% of the time.
> 
> Even in a source distribution, if they were not there, it would work  
> perfectly fine if you build from the root of the trunk first.    Part  
> of having that there was that it was SUPPOSED to be usable by various  
> site generation maven plugins (mvn site:site) to help wire together  
> the various cross site links and stuff.   However, that has never  
> worked quite correctly.   We don't use the maven site generation stuff  
> anyway.
> 
> Dan
> 
> 
>>
>>
>> If you're actually working with the cxf sources, you'll find parent/ 
>> pom.xml.
>> But that might not always be the case - you might want to use a  
>> different
>> directory structure.
>>
>> Interestingly, the repository structure for cxf also contains the  
>> module
>> "cxf-parent", whose cxf-parent-2.1.pom is identical to the parent/ 
>> pom.xml
>> found in the source distribution.
>>
>> Can anyone shed some insight as to why cxf modules contain that parent
>> dependency?  Could I instead just declare a dependency on cxf-parent  
>> (and
>> thus not having to rely on the relative path that might not exist)?
> 
> Yep.   If mvn can find the cxf-parent module in a repository, you'll  
> be fine.
> 
> Dan
> 
> 
> 
>>
>>
>> Cheers,
>>
>> --dan
>>
>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Off-line-maven-repository-tp17346046p17346046.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
> 
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Off-line-maven-repository-tp17346046p17347648.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Off-line maven repository

Posted by Daniel Kulp <dk...@apache.org>.
On May 20, 2008, at 1:30 PM, burki wrote:

>
> I'm finally switching form ant to maven - maven is new to me, so  
> please bear
> with me if the question below sounds idiotic ;-)
>
> I need to build an off-line maven repository for the cxf modules.   
> As a
> first step, I used the assembly task to build a repository packaged  
> as a
> jar.
>
> Most of the cxf the poms in the generated archive (and in .m2/)  
> contain a
> parent reference like:
>
>    <parent>
>        <groupId>org.apache.cxf</groupId>
>        <artifactId>cxf-parent</artifactId>
>        <version>2.1</version>
>        <relativePath>../../../parent/pom.xml</relativePath>
>    </parent>

The relative path stuff is really just used if mvn cannot find the  
parent in any of the configured repositories.   For the most part,  
that just means when building CXF from source.     You can ignore it  
99% of the time.

Even in a source distribution, if they were not there, it would work  
perfectly fine if you build from the root of the trunk first.    Part  
of having that there was that it was SUPPOSED to be usable by various  
site generation maven plugins (mvn site:site) to help wire together  
the various cross site links and stuff.   However, that has never  
worked quite correctly.   We don't use the maven site generation stuff  
anyway.

Dan


>
>
> If you're actually working with the cxf sources, you'll find parent/ 
> pom.xml.
> But that might not always be the case - you might want to use a  
> different
> directory structure.
>
> Interestingly, the repository structure for cxf also contains the  
> module
> "cxf-parent", whose cxf-parent-2.1.pom is identical to the parent/ 
> pom.xml
> found in the source distribution.
>
> Can anyone shed some insight as to why cxf modules contain that parent
> dependency?  Could I instead just declare a dependency on cxf-parent  
> (and
> thus not having to rely on the relative path that might not exist)?

Yep.   If mvn can find the cxf-parent module in a repository, you'll  
be fine.

Dan



>
>
> Cheers,
>
> --dan
>
>
>
> -- 
> View this message in context: http://www.nabble.com/Off-line-maven-repository-tp17346046p17346046.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog