The problem is that Maven is unable to download the artifact-plugin for you.

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

The most common reasons for this message are (in no particular order):

- You don't have a connection to the internet
+ Solution: connect to the internet

- The meta-data for the plugin in question has been corrupted in your local repository + Solution: Remove the entire directory for that plugin in your local repository

- You are behind a proxy or firewall that prevents Maven from accessing the central repository
+ Solution: configure Maven to handle this, see
  http://maven.apache.org/guides/mini/guide-proxies.html

If none of the about helps you, please run Maven like this to give us more to go on. It will enable debug mode. Please post the results here.

mvn -X archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

Robin Rigby wrote:
Starting again.  (Carrying on from thread "may not be this project's POM [
from cocoon-users ]")

I have destroyed the maven-2.07 and .m2 directories.  Downloaded a fresh
maven-2.0.7-bin.zip.  Start again with "Maven in 5 minutes".

I expect failures while plugins are downloaded.  The first four of these are
different, then they repeat.

There are three files in the .m2 directory (see below).  Two are effectively
empty.

No my-app directory has been created.

There is an enigmatic statement "Don't worry, there are ways to fix that"
but no suggestion of what they are.  Nor link.

am worried ...
Thanks
Robin

===========================================
here is what happens
===========================================

C:\Temp>mvn --version
Maven version: 2.0.7
Java version: 1.6.0
OS name: "windows xp" version: "5.1" arch: "x86"

C:\Temp>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be
retrieved from repository: central due to an error: Error tr
ansferring file
[INFO] Repository 'central' will be blacklisted
[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: 3 seconds
[INFO] Finished at: Fri Jul 20 12:40:42 BST 2007
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------

C:\Temp>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.codehaus.mojo: checking for updates from central
[WARNING] repository metadata for: 'org.codehaus.mojo' could not be
retrieved from repository: central due to an error: Error transferr
ing file
[INFO] Repository 'central' will be blacklisted
[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: 2 seconds
[INFO] Finished at: Fri Jul 20 12:42:12 BST 2007
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------

C:\Temp>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking
for updates from central
[WARNING] repository metadata for: 'artifact
org.apache.maven.plugins:maven-archetype-plugin' could not be retrieved from
repository: c
entral due to an error: Error transferring file
[INFO] Repository 'central' will be blacklisted
[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: 2 seconds
[INFO] Finished at: Fri Jul 20 12:49:41 BST 2007
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------

C:\Temp>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
[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: Fri Jul 20 12:52:28 BST 2007
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------

C:\Temp>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
[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: Fri Jul 20 12:53:13 BST 2007
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------

C:\Temp>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
[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: Fri Jul 20 12:54:36 BST 2007
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------

C:\Temp>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
-e
+ Error stacktraces are turned on.
[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] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin
'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid
version could be found
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLife
cycleExecutor.java:1286)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(Defaul
tLifecycleExecutor.java:1522)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggrega
tionNeeds(DefaultLifecycleExecutor.java:386)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.java:138)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        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:597)
        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)
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException:
The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist
or no valid version could be found
        at
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVer
sion(DefaultPluginVersionManager.java:228)
        at
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVer
sion(DefaultPluginVersionManager.java:90)
        at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManag
er.java:166)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLife
cycleExecutor.java:1257)
        ... 14 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jul 20 12:57:54 BST 2007
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------

C:\Temp>

===========================================
files in {username} files
===========================================

C:\Documents and
Settings\username\.m2\repository\org\apache\maven\plugins\maven-metadata-cen
tral.xml
<metadata/>

C:\Documents and
Settings\username\.m2\repository\org\apache\maven\plugins\maven-archetype-pl
ugin\maven-metadata-central.xml
<metadata>
<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-archetype-plugin</artifactId> </metadata>

C:\Documents and
Settings\username\.m2\repository\org\codehaus\mojo\maven-metadata-central.xm
l
<metadata/>
===========================================
end
===========================================




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



--
Dennis Lundberg

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

Reply via email to