Hi Dan, 
Thanks for your warm heart really. ^_^

> [2]"source" is the main parameter, but not "target". The plugin knows how
> do I use the files at project B to project A? 
The puzzle still stands.
I set "source", but "target". The plugin would copy the file to where?
And I don't find any configuration related to "copy" work.

My case,
<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
                <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                                <goal>add-source</goal>
                        </goals>
                        <configuration>
                                <sources>
                                        <source>
                                                
D:/maven/mmdemo/user/web/src/webapp/conf
                                        </source>
                                </sources>
                        </configuration>
                </execution>
        </executions>
</plugin>
Nothing was copied to the project.

a cup of Java, cheers!
Sha Jiang


dan tran wrote:
> 
> 2 ways:
> 
>   1. In project B, use maven-antrun-plugin to copy project's files into
> your
> project B
> 
>       I prefer this option ;-)
> 
>   2. Install your project A's files to your local repos and then use
> maven-dependency-plugin
>       to copy them into your project B
> 
>       here is an example of build-helper-maven-plugin to install/deploy
> your
> project A files
> 
>       <plugin>
>             <groupId>org.codehaus.mojo</groupId>
>             <artifactId>build-helper-maven-plugin</groupId>
>             <executions>
>                 <execution>
>                    <phase>generate-sources</phase>
>                   <goals>
>                       <goal>attach-artifact</goal>
>                    </goals>
>                    <configuration>
>                        <artifacts>
>                            <artifact>
>                               <file>path to one of your project A
> xml file</file>
>                               <type>xml</type>
>                            </artifact>
>                            <artifact>
>                                <file>path to one of your project A sql
> file</file>
>                               <type>sql</type>
>                             </artifact>
>                         </artifacts>
>                    </configuration>
>                 </execution>
>              </executions>
>        </plugin>
> 
> 
> but option 2 is way complicated ;-) use option 1 instead.
> 
> 
> 
> On 11/9/06, jiangshachina <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hello Dan,
>>
>> > ummm, not sure what is blocking you ;-)
>> > the build-helper-maven-plugin's usage?
>> Yes ;-)
>> In fact, I don't exactly understand how to earn benefits from the plugin?
>> I wish to make project A(web project) using some files(.xml, .sql...)
>> project A(web project).
>>
>> How can I make it working for me?
>> [1]"source", how do build-helper-maven-plugin see the parameter? Java
>> source
>> codes, I don't think so?
>> [2]"source" is the main parameter, but not "target". The plugin knows how
>> do
>> I use the files at project B to project A?
>> The following example doesn't show any detail or explanation.
>> http://mojo.codehaus.org/build-helper-maven-plugin/howto.html
>>
>> a cup of Java, cheers!
>> Sha Jiang
>>
>>
>> dan tran wrote:
>> >
>> > ummm, not sure what is blocking you ;-)   the
>> build-helper-maven-plugin's
>> > usage?
>> >
>> > -D
>> >
>> >
>> > On 11/9/06, jiangshachina <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Hi Wayne,
>> >> I think if try my best the goal would be got :D
>> >> But now, the plugin blocks me :(
>> >>
>> >> a cup of Java, cheers!
>> >> Sha Jiang
>> >>
>> >>
>> >> Wayne Fay wrote:
>> >> >
>> >> > Perhaps you can contribute your more complex configuration(s) back
>> for
>> >> > inclusion in future documentation efforts, once you have figured it
>> >> > out and completed your project with the configuration you are
>> looking
>> >> > for etc?
>> >> >
>> >> > Wayne
>> >> >
>> >> > On 11/9/06, jiangshachina <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> Hi dan,
>> >> >> Thanks, I'll care the plugin.
>> >> >> But its examples are very simple, the plugin would take me some
>> time.
>> >> >>
>> >> >> a cup of Java, cheers!
>> >> >> Sha Jiang
>> >> >>
>> >> >>
>> >> >> dan tran wrote:
>> >> >> >
>> >> >> > the plugin also allows you to attach arbitrary artifact to maven
>> to
>> >> be
>> >> >> > deployed.
>> >> >> >
>> >> >> > -
>> >> >> >
>> >> >> >
>> >> >> > On 11/9/06, jiangshachina <[EMAIL PROTECTED]> wrote:
>> >> >> >>
>> >> >> >>
>> >> >> >> Hi Dan,
>> >> >> >> Thanks for your help.
>> >> >> >>
>> >> >> >> > see build-helper-maven-plugin for deployment.
>> >> >> >> I get the plugin at
>> >> >> >> http://mojo.codehaus.org/build-helper-maven-plugin/index.html
>> >> >> >> Unfortunately, I don't understand why the plugin can help me.
>> >> >> >> In my mind, the plugin just add extra source directories to one
>> >> >> project.
>> >> >> >> What is the "source directory"?
>> >> >> >>
>> >> >> >> > you can deploy the xml file have other project to use it as
>> >> >> dependency
>> >> >> >> Can I deploy xml file? Deploy to where?
>> >> >> >> I don't understand :-(
>> >> >> >>
>> >> >> >> a cup of Java, cheers!
>> >> >> >> Sha Jiang
>> >> >> >>
>> >> >> >>
>> >> >> >> dan tran wrote:
>> >> >> >> >
>> >> >> >> > you can deploy the xml file have other project to use it as
>> >> >> dependency.
>> >> >> >> > see
>> >> >> >> > build-helper-maven-plugin for deployment.
>> >> >> >> >
>> >> >> >> > -D
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > On 11/8/06, jiangshachina <[EMAIL PROTECTED]> wrote:
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> Hi,
>> >> >> >> >> I have known that a project can depend on artifacts.
>> >> >> >> >> The artifact can be pom or jar, and ear project can depend on
>> >> war
>> >> >> or
>> >> >> >> ejb.
>> >> >> >> >> Now, how about other files(e.g. xml)?
>> >> >> >> >> Assumely, I have two Web application projects, the one wants
>> to
>> >> use
>> >> >> >> some
>> >> >> >> >> configuration files of the other one.
>> >> >> >> >> How can I achieve the goal? Do I have to copy the files?
>> >> >> >> >> Thanks!
>> >> >> >> >>
>> >> >> >> >> a cup of Java, cheers!
>> >> >> >> >> Sha Jiang
>> >> >> >> >> --
>> >> >> >> >> View this message in context:
>> >> >> >> >>
>> >> >> >>
>> >> >>
>> >>
>> http://www.nabble.com/Depend-on-other-files--tf2600211s177.html#a7253822
>> >> >> >> >> Sent from the Maven - Users mailing list archive at
>> Nabble.com
>> .
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >> --
>> >> >> >> View this message in context:
>> >> >> >>
>> >> >>
>> >>
>> http://www.nabble.com/Depend-on-other-files--tf2600211s177.html#a7255352
>> >> >> >> Sent from the Maven - Users mailing list archive at Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/Depend-on-other-files--tf2600211s177.html#a7269825
>> >> >> 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]
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Depend-on-other-files--tf2600211s177.html#a7270833
>> >> Sent from the Maven - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Depend-on-other-files--tf2600211s177.html#a7271874
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Depend-on-other-files--tf2600211s177.html#a7272756
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to