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
[EMAIL PROTECTED]
http://www.dankulp.com/blog




Reply via email to