Could you try deleting the maven-archetype-plugin and maven-archetype-site (including the poms and metadata files) from you local repository, then build again?

-Deng

Shilpac wrote:
Hi,
  Following is the error when I tried to create a file using maven


C:\Maven>mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes
-Da
rchetypeArtifactId=maven-archetype-site -DgroupId=com.mycompany.app -DartifactI
d=my-app-site
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
-------------------------------------------------------------------------
---
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:create] (aggregator-style)
[INFO]
-------------------------------------------------------------------------
---
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.pr
operties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.
resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLo
aderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.
ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in
any
resource loader.
[INFO] Velocimacro : error using  VM library template VM_global_library.vm :
org
.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'V
M_global_library.vm'
[INFO] Velocimacro :  VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in
templates

[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may
NOT
replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be glob
al in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [archetype:create]
[INFO] Defaulting package to group ID: com.mycompany.app
[INFO] artifact org.apache.maven.archetypes:maven-archetype-site: checking
for u
pdates from central
[WARNING] repository metadata for: 'artifact
org.apache.maven.archetypes:maven-a
rchetype-site' could not be retrieved from repository: central due to an
error:
Error transferring file
[INFO] Repository 'central' will be blacklisted
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.archetypes
ArtifactId: maven-archetype-site
Version: RELEASE

Reason: Unable to determine the release version

Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file -DgroupId=org.apache.maven.archetypes
-DartifactId=
maven-archetype-site \
        -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file
there:
  mvn deploy:deploy-file -DgroupId=org.apache.maven.archetypes
-DartifactId=mave
n-archetype-site \
        -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file \
         -Durl=[url] -DrepositoryId=[id]


  org.apache.maven.archetypes:maven-archetype-site:jar:RELEASE



[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Tue Jul 31 16:20:54 GMT+05:30 2007
[INFO] Final Memory: 4M/8M
[INFO]
------------------------------------------------------------------------

Can you please tell me the cause of this error? or Do I need to do changes
in the settings.xml?

Maria Odea Ching-2 wrote:
Hi,

It would be more helpful if you could post your build stack trace..

Thanks,
Deng

Shilpac wrote:
How to create a file under maven project?
I have created folder using the following command

mvn archetype:create  -DarchetypeGroupId=org.apache.maven.archetypes -
DgroupId=com.cognizant -DartifactId=MavenDemo
getting build successful.
But tried creating file using the following command

mvn archetype:create  -DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifactId=maven-archetype-site -DgroupId=com.cognizant
-DartifactId=MavenDemo

after executing this command I am getting build failure message because
of
which I am unable to create a file. Can anybody suggest solution for
this?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






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

Reply via email to