maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy.B...@dstglobalsolutions.com
Subject Re: AW: Controlling maven...
Date Tue, 06 Apr 2010 15:06:58 GMT
harald

Unfortunately, this leads to the problem I mentioned:

[INFO] One or more required plugin parameters are invalid/missing for
'wagon:download'

[0] Inside the definition for plugin 'wagon-maven-plugin' specify the
following:

<configuration>
  ...
  <url>VALUE</url>
</configuration>

Maven is not picking up the execution specific configuration...

Andy Bell  |  DST Global Solutions Limited  |  44 020 8390 5000x5837


                                                                           
             "Entner Harald"                                               
             <Entner.Harald@af                                             
             b.de>                                                      To 
                                       "Maven Users List"                  
             06/04/2010 15:55          <users@maven.apache.org>            
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
               "Maven Users            AW: Controlling maven...            
                   List"                                                   
             <users@maven.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           




you don't have to declare the plugin twice, you can declare it only once
and add two execution nodes.(with all required properties).

Afaik, you can put configuration information that is common to both
execution nodes outside the execution node and put the execution specific
information into the configuration child of the execution node.

e.g.

<plugin...>
             <executions>
                         <execution>
                                     ...
                                     <configuration>...</configuration>
                         </execution>
                         <execution>
                                     ...
                                     <configuration>...</configuration>
                         </execution>
             </execution>
             <configuration>
                         .. common configuration..
             </configuration>
</plugin>

hope it helps

harald
-----Urspr√ľngliche Nachricht-----
Von: Andy.Bell@dstglobalsolutions.com
[mailto:Andy.Bell@dstglobalsolutions.com]
Gesendet: Dienstag, 6. April 2010 16:46
An: users@maven.apache.org
Betreff: Controlling maven...


Hi

I am trying to use Maven to automate a complicated process:

I have 3 machines: a Maven build machine, a Project WebSite server machine
and a Project Install Builder Machine.

We have several builds, controlled by Hudson. After a particular build, the
Project Install Builder Machine will have created an Installer and a nice
set of web pages to go with it. These have been zipped up to make
transferring them easier.

I then need Maven to:

1) Get the project Installer from the Project Install Builder Machine (a
.zip file) using FTP
2) Unzip this file to a project specific folder
3) FTP the contents this folder to the WebSite machine.

I am trying to use the wagon plugin to do steps 1 and 3 but I am finding
that specifying the plugin twice in the same pom.xml is causing trouble.

If I try this...

<plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>wagon-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>ftp-deployed-properties-files</id>
                                <!--phase>pre-integration-test</phase-->
                                <goals>
                                    <goal>download</goal>
                                </goals>

                            </execution>

                        </executions>
                        <configuration>

<toDir>${project.build.directory}\WebInstaller</toDir>

<url>ftp://anonymous:hwscruis@isbuild/WebServicesBuild/target/installanywhere/investmentaccounting_Build_Output</url>

                                </configuration>
                    </plugin>

...

<plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>wagon-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>ftp-deployed-properties-files</id>
                                <!--phase>pre-integration-test</phase-->
                                <goals>
                                    <goal>upload</goal>
                                </goals>

                            </execution>
                        </executions>
                        <configuration>

<fromDir>${project.build.directory}\WebInstaller\V-1.0.0.${buildNumber}\</fromDir>

                            <url>ftp://anonymous:hwscruis@localhost</url>
                    </configuration>

</plugin>

and call it with this command: mvn wagon:download wagon:upload

then the <configuration> section from the upload is also used for the
download.

However, if I move the <configuration> sections to within the <execution>
tag, I get this message:

[INFO] One or more required plugin parameters are invalid/missing for
'wagon:download'

[0] Inside the definition for plugin 'wagon-maven-plugin' specify the
following:

<configuration>
  ...
  <url>VALUE</url>
</configuration>

-OR-

on the command line, specify: '-Dwagon.url=VALUE'

I can't use the latter option because the URL is dynamically generated from
the SCM version number and I need two different locations!

So, it seems that the wagon plugin cannot use 2 different URL's in the same
pom.xml.

I know I can put the commands in separate pom's, but that seems like a poor
solution to me.

Andy Bell  |  DST Global Solutions Limited  |  44 020 8390 5000x5837


http://www.dstglobalsolutions.com

*****************************************************************************


>From May 18th 2009:
DST International Limited will be known as DST Global Solutions Limited.
DST International Output Limited will be known as DST Output Limited.

Please update your address book with the new email address and visit our
new websites:
http://www.dstglobalsolutions.com and http://www.dstoutput.co.uk

=============================================================

Notice: This e-mail and any attachments are intended only for the
individual or company to which it is addressed and may contain information
which is privileged, confidential and prohibited from disclosure or
unauthorized use under applicable law.  If you are not the intended
recipient of this e-mail, you are hereby notified that any use,
dissemination or copying of this e-mail or the information contained in
this e-mail is strictly prohibited by the sender.
Whilst we run anti-virus software on all internet e-mails we are not liable
for any loss or damage.  The recipient is advised to run their own
anti-virus software.
If you have received this transmission in error, please return the material
received to the sender and delete all copies from your system. Thank you.

DST Global Solutions Limited is a company registered in England and Wales
with company number 1772349.
DST Global Solutions Group Services Limited is a company registered in
England and Wales with company number 5211646.
DST Global Solutions Billing Limited is a company registered in England and
Wales with company number 4370287.
DST Output Limited is a company registered in England and Wales with
company number 4220397.
Pensions and Actuarial Services Limited is a company registered in England
and Wales with company number 2957435.
The registered office for all the above mentioned companies is: DST House,
St Mark's Hill, Surbiton, Surrey, KT6 4QD, England.


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




http://www.dstglobalsolutions.com

*****************************************************************************

>From May 18th 2009:
DST International Limited will be known as DST Global Solutions Limited.
DST International Output Limited will be known as DST Output Limited.

Please update your address book with the new email address and visit our new websites:
http://www.dstglobalsolutions.com and http://www.dstoutput.co.uk

=============================================================

Notice: This e-mail and any attachments are intended only for the individual or company to
which it is addressed and may contain information which is privileged, confidential and prohibited
from disclosure or unauthorized use under applicable law.  If you are not the intended recipient
of this e-mail, you are hereby notified that any use, dissemination or copying of this e-mail
or the information contained in this e-mail is strictly prohibited by the sender.
Whilst we run anti-virus software on all internet e-mails we are not liable for any loss or
damage.  The recipient is advised to run their own anti-virus software.
If you have received this transmission in error, please return the material  received to the
sender and delete all copies from your system. Thank you.

DST Global Solutions Limited is a company registered in England and Wales with company number
1772349.
DST Global Solutions Group Services Limited is a company registered in England and Wales with
company number 5211646.
DST Global Solutions Billing Limited is a company registered in England and Wales with company
number 4370287.
DST Output Limited is a company registered in England and Wales with company number 4220397.
Pensions and Actuarial Services Limited is a company registered in England and Wales with
company number 2957435.
The registered office for all the above mentioned companies is: DST House, St Mark's Hill,
Surbiton, Surrey, KT6 4QD, England.


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


Mime
View raw message