Dummy question my first Maven project: The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist ...

2006-10-19 Thread Xavier Outhier

Hi all,

I'm sure this is not a cutting edge question.
I've just downloaded and installed Maven.

1)
Well, I simply followed the Installation instructions from page
http://maven.apache.org/download.html#installation


   Windows 2000/XP

  1. Unzip maven-2.0.3-bin.zip to the directory you wish to install
 Maven 2.0.3. These instructions assume you chose C:\Program
 Files\Apache Software Foundation\maven-2.0.3
  2. Add the bin directory to your path, by opening up the system
 properties (WinKey + Pause), selecting the Advanced tab, and the
 Environment Variables button, then editing the PATH variable in
 the user variables. eg. C:\Program Files\Apache Software
 Foundation\maven-2.0.3\bin;%PATH%
  3. In the same dialog, make sure that JAVA_HOME is set to the
 location of your JDK, eg. C:\Program Files\Java\jdk1.5.0_02
  4. Run mvn --version to verify that it is correctly installed.


And then I try the first command of the Maven Getting Started Guide
(http://maven.apache.org/guides/getting-started/index.html):

2) But here is what I get:
D:\tmp\sandboxmvn --version
Maven version: 2.0.4

D:\tmp\sandbox*mvn archetype:create -DgroupId=com.mycompany.app 
-DartifactId=myApp*

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] 


[ERROR] BUILD ERROR
[INFO] 

[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does 
not exist or no valid version could be found
[INFO] 


[INFO] For more information, run Maven with the -e switch
[INFO] 


[INFO] Total time:  1 second
[INFO] Finished at: Thu Oct 19 14:37:03 CEST 2006
[INFO] Final Memory: 1M/2M
[INFO] 



D:\tmp\sandboxmvn -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] 


[ERROR] BUILD FAILURE
[INFO] 


[INFO] You must specify at least one goal. Try 'install'
[INFO] 


[INFO] Trace
org.apache.maven.BuildFailureException: You must specify at least one 
goal. Try 'install'
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:132)

   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:585)
   at 
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at 
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] 


[INFO] Total time:  1 second
[INFO] Finished at: Thu Oct 19 14:37:24 CEST 2006
[INFO] Final Memory: 1M/2M
[INFO] 



3) What should I do? Is it a configuration problem? How to install 
locally the plug-in?


Thanks for any help,

Xavier.


Re: Dummy question my first Maven project: The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist ...

2006-10-19 Thread Wendy Smoak

On 10/19/06, Xavier Outhier [EMAIL PROTECTED] wrote:

2) But here is what I get:
D:\tmp\sandboxmvn --version
Maven version: 2.0.4


(Strange, since above you say you installed 2.0.3.)


D:\tmp\sandbox*mvn archetype:create -DgroupId=com.mycompany.app
-DartifactId=myApp*
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does
not exist or no valid version could be found


It should look like this:
http://wiki.wsmoak.net/cgi-bin/wiki.pl?ArchetypeCreate

(Without the checksum errors, and with a lot more things downloaded,
since you're starting from an empty local repository.)

In your case, it doesn't look like it even *tries* to download
anything.  Is there a firewall or a proxy involved?


[INFO]

[INFO] For more information, run Maven with the -e switch


This means, 'execute the same command you just used, but add -e to it.'  So

mvn archetype:create -e ...

Nicolas' advice to try -U (update) is also good (but this really
should work out of the box...)

--
Wendy

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