Hi,
The profile in your settings need to be active.
Try with :

>   <profiles>
>   <profile>
     <id>normal</id>
     <activation>
        <activeByDefault>true</activeByDefault>
     </activation>
>   <properties>
>   <myversion>3.8.1</myversion>
>   </properties>
>   </profile>
>   </profiles>

Use mvn help:effective-pom to see the pom interpolated.

--
Olivier

2008/1/2, Thomas Chang <[EMAIL PROTECTED]>:
> Hi all,
>
>   According to the link 
> http://maven.apache.org/examples/injecting-properties-via-settings.html I do 
> in my "pom.xml" and "settings.xml" followings:
>
>   in the "pom.xml":
>   =============
>   ...
>   <dependency>
>   <groupId>junit</groupId>
>   <artifactId>junit</artifactId>
>   <version>${myversion}</version>
>   </dependency>
>   ...
>
>   in the "settings.xml":
>   ===============
>   ...
>   <profiles>
>   <profile>
>   <properties>
>   <myversion>3.8.1</myversion>
>   </properties>
>   </profile>
>   </profiles>
>   ...
>
>   But a sI run "mvn eclipse:eclipse" I get error as follow. Somebody can help?
>   ...
>   Downloading: 
> file:////sap-dev/CVSREPO/CvsMaven/junit/junit/${myversion}/junit-${
> myversion}.jar
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>   Missing:
> ----------
> 1) junit:junit:jar:${myversion}
>     Try downloading the file manually from the project website.
>     Then, install it using the command:
>       mvn install:install-file -DgroupId=junit -DartifactId=junit \
>           -Dversion=${myversion} -Dpackaging=jar -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file there:
>     mvn deploy:deploy-file -DgroupId=junit -DartifactId=junit \
>           -Dversion=${myversion} -Dpackaging=jar -Dfile=/path/to/file \
>            -Durl=[url] -DrepositoryId=[id]
>     Path to dependency:
>         1) com.wei.chen.app:TestXml:jar:1.0-SNAPSHOT
>         2) junit:junit:jar:${myversion}
>   ----------
> 1 required artifact is missing.
>   for artifact:
>   com.wei.chen.app:TestXml:jar:1.0-SNAPSHOT
>   from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
>
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Wed Jan 02 14:18:48 CET 2008
> [INFO] Final Memory: 2M/5M
> [INFO] 
> ------------------------------------------------------------------------
>   E:\Projekte\TestXml>
>   ...
>
>
>
> ---------------------------------
> Ihr erstes Fernweh? Wo gibt es den schönsten Strand.

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

Reply via email to