Re: [m2] Packging the same resource file in multple projects

2007-02-28 Thread John J. Franey

I think the answer is to:

1) create a new module for the resources. move the
src/main/resources/resource.xml into the new module.

2) declare a dependency in each of A and B on the new  resources module.

3) use assembly plugin in A and B to create a jar with dependencies. see
http://maven.apache.org/plugins/maven-assembly-plugin/

Regards,
John



uma_rk wrote:
> 
> 
> 
> I have a resource file that is shared by multiple projects.
> That is, the resource file resource.xml needs to be packaged in 
> multiple jar files (A.jar, B.jar) as shown below.
> 
> How can I make sure that sub-projects A and B both package the
> resource.xml in their jarfiles? 
> 
> Also, is this the right way to structure it? I placed resource.xml in
> parent only because its shared by the children of  'parent'.
> 
>   (parent-project
>   (src/main/resources
>  resource.xml
>   )
>  ;; modules
>  (A
>   (src/main/...)
>  )
> (B
>   (src/main/...)
> )
> )
> 
> Thanks,
> 
> /U
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Packging-the-same-resource-file-in-multple-projects-tf3310468s177.html#a9226420
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [m2] Packging the same resource file in multple projects

2007-02-28 Thread uma_rk

The problem is that the resouce may not be a classpath resource (e.g.
a javascript file) and I need to install the resource(s) in a specified 
directory 
in multiple webapps.

Consider for instance, a set of .js files; two webapps A and B need to install 
the
same .js files in their webapps (above WEB-INF); yet, I do not want to 
duplicate the
.js files in multiple projects for obvious reasons.

How can I do this?

Thanks,

/U

 -- Original message --
From: "John J. Franey" <[EMAIL PROTECTED]>
> 
> I think the answer is to:
> 
> 1) create a new module for the resources. move the
> src/main/resources/resource.xml into the new module.
> 
> 2) declare a dependency in each of A and B on the new  resources module.
> 
> 3) use assembly plugin in A and B to create a jar with dependencies. see
> http://maven.apache.org/plugins/maven-assembly-plugin/
> 
> Regards,
> John
> 
> 
> 
> uma_rk wrote:
> > 
> > 
> > 
> > I have a resource file that is shared by multiple projects.
> > That is, the resource file resource.xml needs to be packaged in 
> > multiple jar files (A.jar, B.jar) as shown below.
> > 
> > How can I make sure that sub-projects A and B both package the
> > resource.xml in their jarfiles? 
> > 
> > Also, is this the right way to structure it? I placed resource.xml in
> > parent only because its shared by the children of  'parent'.
> > 
> >   (parent-project
> >   (src/main/resources
> >  resource.xml
> >   )
> >  ;; modules
> >  (A
> >   (src/main/...)
> >  )
> > (B
> >   (src/main/...)
> > )
> > )
> > 
> > Thanks,
> > 
> > /U
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Packging-the-same-resource-file-in-multple-projects-tf3310
> 468s177.html#a9226420
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [m2] Packging the same resource file in multple projects

2007-02-28 Thread Wayne Fay

Create the artifact with the shared resources.
Use maven-dependency-plugin to unzip the artifact into the projects
where you want to use it.

Wayne

On 2/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


The problem is that the resouce may not be a classpath resource (e.g.
a javascript file) and I need to install the resource(s) in a specified 
directory
in multiple webapps.

Consider for instance, a set of .js files; two webapps A and B need to install 
the
same .js files in their webapps (above WEB-INF); yet, I do not want to 
duplicate the
.js files in multiple projects for obvious reasons.

How can I do this?

Thanks,

/U

 -- Original message --
From: "John J. Franey" <[EMAIL PROTECTED]>
>
> I think the answer is to:
>
> 1) create a new module for the resources. move the
> src/main/resources/resource.xml into the new module.
>
> 2) declare a dependency in each of A and B on the new  resources module.
>
> 3) use assembly plugin in A and B to create a jar with dependencies. see
> http://maven.apache.org/plugins/maven-assembly-plugin/
>
> Regards,
> John
>
>
>
> uma_rk wrote:
> >
> >
> >
> > I have a resource file that is shared by multiple projects.
> > That is, the resource file resource.xml needs to be packaged in
> > multiple jar files (A.jar, B.jar) as shown below.
> >
> > How can I make sure that sub-projects A and B both package the
> > resource.xml in their jarfiles?
> >
> > Also, is this the right way to structure it? I placed resource.xml in
> > parent only because its shared by the children of  'parent'.
> >
> >   (parent-project
> >   (src/main/resources
> >  resource.xml
> >   )
> >  ;; modules
> >  (A
> >   (src/main/...)
> >  )
> > (B
> >   (src/main/...)
> > )
> > )
> >
> > Thanks,
> >
> > /U
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> 
http://www.nabble.com/Packging-the-same-resource-file-in-multple-projects-tf3310
> 468s177.html#a9226420
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Packging the same resource file in multple projects

2007-02-28 Thread Brian E. Fox
You could use the remote-resources possibly as well. 

-Original Message-
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 28, 2007 4:35 PM
To: Maven Users List
Subject: Re: [m2] Packging the same resource file in multple projects

Create the artifact with the shared resources.
Use maven-dependency-plugin to unzip the artifact into the projects
where you want to use it.

Wayne

On 2/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> The problem is that the resouce may not be a classpath resource (e.g.
> a javascript file) and I need to install the resource(s) in a 
> specified directory in multiple webapps.
>
> Consider for instance, a set of .js files; two webapps A and B need to

> install the same .js files in their webapps (above WEB-INF); yet, I do

> not want to duplicate the .js files in multiple projects for obvious
reasons.
>
> How can I do this?
>
> Thanks,
>
> /U
>
>  -- Original message --
> From: "John J. Franey" <[EMAIL PROTECTED]>
> >
> > I think the answer is to:
> >
> > 1) create a new module for the resources. move the 
> > src/main/resources/resource.xml into the new module.
> >
> > 2) declare a dependency in each of A and B on the new  resources
module.
> >
> > 3) use assembly plugin in A and B to create a jar with dependencies.

> > see http://maven.apache.org/plugins/maven-assembly-plugin/
> >
> > Regards,
> > John
> >
> >
> >
> > uma_rk wrote:
> > >
> > >
> > >
> > > I have a resource file that is shared by multiple projects.
> > > That is, the resource file resource.xml needs to be packaged in 
> > > multiple jar files (A.jar, B.jar) as shown below.
> > >
> > > How can I make sure that sub-projects A and B both package the 
> > > resource.xml in their jarfiles?
> > >
> > > Also, is this the right way to structure it? I placed resource.xml

> > > in parent only because its shared by the children of  'parent'.
> > >
> > >   (parent-project
> > >   (src/main/resources
> > >  resource.xml
> > >   )
> > >  ;; modules
> > >  (A
> > >   (src/main/...)
> > >  )
> > > (B
> > >   (src/main/...)
> > > )
> > > )
> > >
> > > Thanks,
> > >
> > > /U
> > >
> > > --
> > > --- To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Packging-the-same-resource-file-in-multple-pro
> > jects-tf3310
> > 468s177.html#a9226420
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > 
> > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]