use maven plugin like this  "mvn somePlugin:goal -Dparam=value" in cmd

the "param" should be the param of somePlugin supply?

And, the ${variable} in the pom file,it should be a variable which maven can
know it,
it can be a environment variable of OS or a property file  configed in the
pom

hope help you , Please forgive my poor English - -

2009/11/17 Max Grigoriev <[email protected]>

> Hi everybody,
>
>
>
> I have a project which uses remote-resources (hibernate mapping files).
>
>
>
> My pom.xml
>
>
>
> ...
>
> <plugin>
>
>     <artifactId>maven-remote-resources-plugin</artifactId>
>
>     <version>1.1</version>
>
>     <executions>
>
>         <execution>
>
>             <goals>
>
>                 <goal>process</goal>
>
>             </goals>
>
>             <configuration>
>
>                 <resourceBundles>
>
>
> <resourceBundle>com.myproj.sws2:sws-mapping:${sws.mapping.version}</resourceBundle>
>
>                 </resourceBundles>
>
>
> <outputDirectory>${project.build.directory}</outputDirectory>
>
>                 <attached>false</attached>
>
>             </configuration>
>
>         </execution>
>
>     </executions>
>
> </plugin>
>
> ...
>
> <plugin>
>
>     <artifactId>maven-release-plugin</artifactId>
>
>     <version>2.0-beta-9</version>
>
>     <configuration>
>
>         <tagBase>https://path-to-svn/tags</tagBase>
>
>     </configuration>
>
> </plugin>
>
> ...
>
>
>
>
>
> When I make mvn package -Dsws.mapping.version=2.0.0 - everything's ok and
> resources are resolved and downloaded also they are put to WAR file.
>
>
>
> But when I try to release this project:
>
>
>
> mvn release:clean release:prepare  -Dsws.mapping.version=2.0.0
> -Dusername=svn_user -Dpassword=svn_passwd
>
>
>
>
>
> And I  receive error:
>
> [INFO] [INFO] [remote-resources:process {execution: default}]
>
> [INFO] [WARNING] Unable to get resource
> 'com.myproj.sws2:sws-mapping:jar:null' from repository myrep (
> http://maven.myrepcom:8081): While configuring wagon for 'mavuser':
>
> Unable to apply wagon configuration.
>
>  [INFO] [INFO]
> ------------------------------------------------------------------------
>
> [INFO] [ERROR] BUILD ERROR
>
> [INFO] [INFO]
> ------------------------------------------------------------------------
>
> [INFO] [INFO] Resources JAR cannot be found.
>
>
>
> As you can see, resource version is unset -
> 'com.myproj.sws2:sws-mapping:jar:null'.
>
>
>
> Why my property (sws.mapping.version) is null not 2.0.0 as I set in command
> line ?
>
>
>
>
>
> Thanks
>
>


-- 
alien.sulin(苏琳冲)
SuLinchong
Qq        387973308
Msn      [email protected]

Reply via email to