You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by um...@comcast.net on 2007/05/17 22:00:34 UTC

Sharing resources across subprojects


I have a project which contains three modules, eahc of which produces a jar artifact.

      (Parent
         (A) 
         (B)
         (C)
      )

I need to define a resource file that is shared among the three subprojects. It would inappropriate
to bury this in one of the sub-projects.

Is my only option then to define a fourth jar-artifact project 'D' to host this resources?

Is there a way to host this resource in Parent/src/main/resources and and have it be 
made available at runtime to A, B and C?

Regards

/U



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


RE: Sharing resources across subprojects

Posted by "Crossley, Jim" <Jc...@tandbergtv.com>.
The path of least resistance is to introduce the fourth project 'D' upon
which the others would depend.  You might be able to host the resource
in the parent by using relative references, e.g. in each child you'd
have something like this:

  <resources>
    <resource>
      <directory>${basedir}/../src/main/resources</directory>
    </resource>
  </resources>

Of course, that assumes you'll always check out the parent when you
intend to build the child.

Jim 

-----Original Message-----
From: uma_rk@comcast.net [mailto:uma_rk@comcast.net] 
Sent: Thursday, May 17, 2007 4:01 PM
To: Maven Users List
Subject: Sharing resources across subprojects



I have a project which contains three modules, eahc of which produces a
jar artifact.

      (Parent
         (A) 
         (B)
         (C)
      )

I need to define a resource file that is shared among the three
subprojects. It would inappropriate to bury this in one of the
sub-projects.

Is my only option then to define a fourth jar-artifact project 'D' to
host this resources?

Is there a way to host this resource in Parent/src/main/resources and
and have it be made available at runtime to A, B and C?

Regards

/U



---------------------------------------------------------------------
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