You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendy Smoak <ws...@gmail.com> on 2005/11/12 23:11:45 UTC

[m2] An XML file as a dependency?

Struts has an xml file 'validator-rules.xml' that lives in core, but
must be copied into WEB-INF of the example webapps, and now I need it
in an archetype.

Does anyone have any suggestions for managing this?  In m1 it's done with:
                <ant:copy file="${core.conf.share.dir}/validator-rules.xml"
                          todir="${maven.war.webapp.dir}/WEB-INF"
                          overwrite="false"/>

Where 'core.conf.share.dir' is a relative path to struts/current/core/src/conf.

Thanks,
--
Wendy

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


Re: [m2] An XML file as a dependency?

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/12/05, Brett Porter <br...@gmail.com> wrote:

> No, no such plugin. What we are considering (there was a proposal on
> the dev list a while back), is to setup a standard way of packaging
> and sharing build resources for Maven 2.1.
>
> If it is not currently included in the core jar, is there a reason it
> is stored in the core directory?

It belongs there, with the Struts Validator that is part of Core. 
It's a special case of a base config file that often gets edited by
application developers, so it's always been in the example apps
"loose" under WEB-INF.  But since you can have multiple Validator
config files, there's no real reason to edit that one vs. adding a
second file for your extra rules.

I'm going to see if the Validator plugin understands paths to
resources in .jar files.  If that works then I should be able to
change the example apps to use that copy.  Thanks again. :)

--
Wendy

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


Re: [m2] An XML file as a dependency?

Posted by Brett Porter <br...@gmail.com>.
On 11/13/05, Wendy Smoak <ws...@gmail.com> wrote:
> On 11/12/05, Brett Porter <br...@gmail.com> wrote:
> > For one file, you could put it in the repository, or you can copy as
> > you did below.
>
> I haven't gotten as far as copying files in m2... and since the file
> is in a different module it's a problem if someone only checks out out
> a single sub-project.  It's not something I really want to bring along
> from the m1 build.

Yes, I agree.

>
> > I assume the XML file also exists in one of your jars? another
> > alternative is to depend on that jar and have a plugin that extracts
> > that file from it.
>
> Not currently, though that might be an option.  (Is there such a
> plugin already?)

No, no such plugin. What we are considering (there was a proposal on
the dev list a while back), is to setup a standard way of packaging
and sharing build resources for Maven 2.1.

If it is not currently included in the core jar, is there a reason it
is stored in the core directory?

- Brett

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


Re: [m2] An XML file as a dependency?

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/12/05, Brett Porter <br...@gmail.com> wrote:
> For one file, you could put it in the repository, or you can copy as
> you did below.

I haven't gotten as far as copying files in m2... and since the file
is in a different module it's a problem if someone only checks out out
a single sub-project.  It's not something I really want to bring along
from the m1 build.

> I assume the XML file also exists in one of your jars? another
> alternative is to depend on that jar and have a plugin that extracts
> that file from it.

Not currently, though that might be an option.  (Is there such a
plugin already?)

Thanks for the ideas!
--
Wendy

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


Re: [m2] An XML file as a dependency?

Posted by Brett Porter <br...@gmail.com>.
For one file, you could put it in the repository, or you can copy as
you did below.

I assume the XML file also exists in one of your jars? another
alternative is to depend on that jar and have a plugin that extracts
that file from it.

- Brett

On 11/13/05, Wendy Smoak <ws...@gmail.com> wrote:
> Struts has an xml file 'validator-rules.xml' that lives in core, but
> must be copied into WEB-INF of the example webapps, and now I need it
> in an archetype.
>
> Does anyone have any suggestions for managing this?  In m1 it's done with:
>                 <ant:copy file="${core.conf.share.dir}/validator-rules.xml"
>                           todir="${maven.war.webapp.dir}/WEB-INF"
>                           overwrite="false"/>
>
> Where 'core.conf.share.dir' is a relative path to struts/current/core/src/conf.
>
> Thanks,
> --
> Wendy
>
> ---------------------------------------------------------------------
> 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