Hi,

you are mixing maven1 with maven2. The 'maven.xml' configuration file is
purely for m1. For m2 you only need the 'pom.xml'. I advise you to have
look at the 'Getting Started Guide' [1] and/or the free maven book [2]
from megere.

Hope this helps
-Tim

[1] http://maven.apache.org/guides/getting-started/index.html
[2] http://library.mergere.com/

Am Sonntag, den 18.02.2007, 22:58 -0800 schrieb Rajmahendra:
> Hi all 
> 
> i am new to Maven i have just wrote my first program ....
> i am using Maven 2.x
> 
> 
> pom.xml
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0";  >
>   
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.mymaven.main</groupId>
>   <artifactId>MavenTest</artifactId>
>   <packaging>jar</packaging>
>   <version>0.0.1</version>
>   <name>My Maven Test Project</name>
> 
>   <description>This is my first Maven Project!</description>
>   
> 
>   
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.2</version>
>     </dependency>
>     <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.8</version>
> </dependency>
> 
>     </plugins>
>     
>     
>   </build>
>   
>  
> </project>
> 
> maven.xml
> <?xml version="1.0"?>
> <project default="install:install" xmlns:j="jelly:core" xmlns:u="jelly:util"
> xmlns:ant="jelly:ant">         
>           
>           <postGoal >
>                        <tstamp/>
>                        <echo>Inside postGoal</echo>
>               </postGoal>
>       
>       <preGoal name="raj:mygoal" >
>       <attainGoal name="raj:hello"/>
>                       <echo>Inside preGoal</echo>
>       </preGoal>
>       
>       <goal name="raj:hello">
>                       <echo>Inside raj:call</echo>
>       </goal>
>       
>       
>       <goal name="install:install">
>                       <echo>Inside raj:call</echo>
>       </goal>
>       
>       
>          
> </project>
> 
> in my command prompt 
> 
> i call 
> 
> mvn raj:hello
> 
> its throwing exception. 
> but this same program runs in 1.x.x
> 
> Help me with a solution.
> 


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

Reply via email to