You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rajmahendra <ra...@gmail.com> on 2007/02/15 11:23:19 UTC

Mavan2 simple program not working.

hi all

i am using JDK 1.5 and Maven 2.0.4

I have written a simple program but its not working


pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>de.focusdv.bcs</groupId>
  <artifactId>new-app</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>new-app</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>

maven.xml
<?xml version="1.0"?>
<project >
          <postGoal >

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


i am trying to call

mvn raj:hello

but its not working...

i am gettting following error.
The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist
or no valid version could be found

Please help me
-- 
Thank you,
With warm regards,
Rajmahendra R Hegde (Raj)
Website: http://www.rajmahendra.com/
              http://rajmahendra.zaadz.com/
              http://360.yahoo.com/rajeshblog/

----------------------------------------------------------------------------------------------
"Genius is one per cent inspiration and ninety-nine per cent
perspiration. Accordingly, a  'genius' is often merely a talented
person who has done all of his or her homework."
                                                            -Thomas Alva
Edison
                                                                   (1847 -
1931)

Re: Mavan2 simple program not working.

Posted by Stephane Nicoll <st...@gmail.com>.
There's no maven.xml in maven2, this is maven1 specific. You should
take some time to read the mini guides on the maven web site first.

Are you behind a firewall? It sounds like maven can't access the repository.

Stéphane

On 2/15/07, Rajmahendra <ra...@gmail.com> wrote:
> hi all
>
> i am using JDK 1.5 and Maven 2.0.4
>
> I have written a simple program but its not working
>
>
> pom.xml
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>de.focusdv.bcs</groupId>
>   <artifactId>new-app</artifactId>
>   <packaging>jar</packaging>
>   <version>1.0-SNAPSHOT</version>
>   <name>new-app</name>
>   <url>http://maven.apache.org</url>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
>
> </project>
>
> maven.xml
> <?xml version="1.0"?>
> <project >
>           <postGoal >
>
>                  <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>
>
>
> i am trying to call
>
> mvn raj:hello
>
> but its not working...
>
> i am gettting following error.
> The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist
> or no valid version could be found
>
> Please help me
> --
> Thank you,
> With warm regards,
> Rajmahendra R Hegde (Raj)
> Website: http://www.rajmahendra.com/
>               http://rajmahendra.zaadz.com/
>               http://360.yahoo.com/rajeshblog/
>
> ----------------------------------------------------------------------------------------------
> "Genius is one per cent inspiration and ninety-nine per cent
> perspiration. Accordingly, a  'genius' is often merely a talented
> person who has done all of his or her homework."
>                                                             -Thomas Alva
> Edison
>                                                                    (1847 -
> 1931)
>

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


Re: Mavan2 simple program not working.

Posted by Patrick Kimber <ma...@gmail.com>.
Hi Raj

I don't think you need the maven.xml file.

Try running
mvn package

This should compile your program and build a jar file which will be
placed into the target folder.

Let me know if it works.

Patrick

On 15/02/07, Rajmahendra <ra...@gmail.com> wrote:
> hi all
>
> i am using JDK 1.5 and Maven 2.0.4
>
> I have written a simple program but its not working
>
>
> pom.xml
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>de.focusdv.bcs</groupId>
>   <artifactId>new-app</artifactId>
>   <packaging>jar</packaging>
>   <version>1.0-SNAPSHOT</version>
>   <name>new-app</name>
>   <url>http://maven.apache.org</url>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
>
> </project>
>
> maven.xml
> <?xml version="1.0"?>
> <project >
>           <postGoal >
>
>                  <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>
>
>
> i am trying to call
>
> mvn raj:hello
>
> but its not working...
>
> i am gettting following error.
> The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist
> or no valid version could be found
>
> Please help me
> --
> Thank you,
> With warm regards,
> Rajmahendra R Hegde (Raj)
> Website: http://www.rajmahendra.com/
>               http://rajmahendra.zaadz.com/
>               http://360.yahoo.com/rajeshblog/
>
> ----------------------------------------------------------------------------------------------
> "Genius is one per cent inspiration and ninety-nine per cent
> perspiration. Accordingly, a  'genius' is often merely a talented
> person who has done all of his or her homework."
>                                                             -Thomas Alva
> Edison
>                                                                    (1847 -
> 1931)
>

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


Re: [m2] Mavan2 simple program not working.

Posted by franz see <fr...@gmail.com>.
Good day to you, Raj,

Aside from the maven.xml that's already been mentioned....try running with
"-cpu" to check for plugin updates (i.e. "mvn clean install -cpu" ).

Cheers,
Franz


Rajmahendra wrote:
> 
> hi all
> 
> i am using JDK 1.5 and Maven 2.0.4
> 
> I have written a simple program but its not working
> 
> 
> pom.xml
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>de.focusdv.bcs</groupId>
>   <artifactId>new-app</artifactId>
>   <packaging>jar</packaging>
>   <version>1.0-SNAPSHOT</version>
>   <name>new-app</name>
>   <url>http://maven.apache.org</url>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> 
> </project>
> 
> maven.xml
> <?xml version="1.0"?>
> <project >
>           <postGoal >
> 
>                  <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>
> 
> 
> i am trying to call
> 
> mvn raj:hello
> 
> but its not working...
> 
> i am gettting following error.
> The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not
> exist
> or no valid version could be found
> 
> Please help me
> -- 
> Thank you,
> With warm regards,
> Rajmahendra R Hegde (Raj)
> Website: http://www.rajmahendra.com/
>               http://rajmahendra.zaadz.com/
>               http://360.yahoo.com/rajeshblog/
> 
> ----------------------------------------------------------------------------------------------
> "Genius is one per cent inspiration and ninety-nine per cent
> perspiration. Accordingly, a  'genius' is often merely a talented
> person who has done all of his or her homework."
>                                                             -Thomas Alva
> Edison
>                                                                    (1847 -
> 1931)
> 
> 

-- 
View this message in context: http://www.nabble.com/Mavan2-simple-program-not-working.-tf3232946s177.html#a8984108
Sent from the Maven - Users mailing list archive at Nabble.com.


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