Iam sorry to ask question in this way, because Ive post these question five days ago and got no anwsers, so I post them again. > I define my own pakcaging type just like ear but have some customer file > type process. > but sometimes, the project have some resources outside the project. why we put the resource file outside the project because the resource file is different in different environment, I think maybe the antrun plugin can be our choice.
2008/10/23 Wendy Smoak <[EMAIL PROTECTED]> > On Wed, Oct 22, 2008 at 10:53 AM, sean.chen(陈思淼) <[EMAIL PROTECTED]> > wrote: > > I hope some one can give me some options, if the Maven dont support > this > > issues, just tell me, That dont works. > > Thanks for help. > > It's better to start a separate thread for each question, with a > descriptive subject line. > > > 1 Can maven import some properties files outside the project? > > Maven can define some resource properties in the head section using the > > properties Tag just like this: > ... > > I have define the configs in a my.properties file, how can I import this > > config file and use it in the build process? > > Depending on how you want to use it, resource filtering might help. > > > 2 How to copy the resource files into my packaged folder in the build > time? > > Usually the resources plugin does this for you... anything in > src/main/resources gets copied and packaged in the artifact. > > > I define my own pakcaging type just like ear but have some customer file > > type process. > > but sometimes, the project have some resources outside the project. > > The convention is to share things through the repository. If they are > *outside* the project, then consider packaging them up into a jar or > zip, and using the dependency plugin to retrieve them from the > repository and place them where you need them. > > -- > Wendy >