You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by siegfried <si...@heintze.com> on 2007/10/15 05:25:02 UTC

How to specify repository on the command line?

I'm trying to use the appfuse-basic-string described at
http://docs.codehaus.org/display/MAVENUSER/Archetypes+List and it is not
working. I think I need to specify the URL of the repository on the command
line. I did maven -help but was surprised to find such a small number of
switches and no switch for the repository. I did a google search for maven
repositories thinking surely someone else already asked this question but I
could not find my answer.

 

(1)     How do I specify the URL of the repository if there is no pom.xml
yet?

(2)     Do I need to specify http://static.appfuse.org/releases as the
repository for the appfuse archetypes? I tried "mvn archetype:create
-DgroupId=www.signitek -DartifactId=demo-basic-spring
-DarchetypeArtifactId=org.appfuse.archetypes
-DarchetypeGroupId=appfuse-basic-spring
-DremoteRepositories=http://static.appfuse.org/releases" but this did not
help.

(3)     If not, what am I doing wrong?

 

 

Thanks,

Siegfried

 

 

 

mvn archetype:create -DgroupId=www.signitek -DartifactId=demo-basic-spring
-DarchetypeArtifactId=org.appfuse.archetypes
-DarchetypeGroupId=appfuse-basic-spring

[INFO] Scanning for projects...

[INFO] Sea

rching 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.properties

[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)

[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader

[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 'VM_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
global in scope if allowed.

[INFO] Velocimacro : initialization complete.

[INFO] Velocity successfully started.

[INFO] [archetype:create]

[INFO] Defaulting package to group ID: www.signitek

[INFO] artifact appfuse-basic-spring:org.appfuse.archetypes: checking for
updates from central

[WARNING] repository metadata for: 'artifact
appfuse-basic-spring:org.appfuse.archetypes' 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] Error creating from archetype

 

Embedded error: Archetype does not exist.

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=appfuse-basic-spring
-DartifactId=org.appfuse.archetypes \

        -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=appfuse-basic-spring
-DartifactId=org.appfuse.archetypes \

        -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file \

         -Durl=[url] -DrepositoryId=[id]

 

 

 

 

  appfuse-basic-spring:org.appfuse.archetypes:jar:RELEASE

 

 

 

 

[INFO]
------------------------------------------------------------------------

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

[INFO]
------------------------------------------------------------------------

[INFO] Total time: 26 seconds

[INFO] Finished at: Sun Oct 14 20:10:20 MDT 2007

[INFO] Final Memory: 5M/9M

[INFO]
------------------------------------------------------------------------

 

Compilation exited abnormally with code 1 at Sun Oct 14 20:10:20


Re: How to specify repository on the command line?

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

just look at the appfuse homepage [1] there a examples for all
archetypes on the quickstart page.

-Tim

[1] http://www.appfuse.org/display/APF/Home

siegfried schrieb:
> I'm trying to use the appfuse-basic-string described at
> http://docs.codehaus.org/display/MAVENUSER/Archetypes+List and it is not
> working. I think I need to specify the URL of the repository on the command
> line. I did maven -help but was surprised to find such a small number of
> switches and no switch for the repository. I did a google search for maven
> repositories thinking surely someone else already asked this question but I
> could not find my answer.
> 
>  
> 
> (1)     How do I specify the URL of the repository if there is no pom.xml
> yet?
> 
> (2)     Do I need to specify http://static.appfuse.org/releases as the
> repository for the appfuse archetypes? I tried "mvn archetype:create
> -DgroupId=www.signitek -DartifactId=demo-basic-spring
> -DarchetypeArtifactId=org.appfuse.archetypes
> -DarchetypeGroupId=appfuse-basic-spring
> -DremoteRepositories=http://static.appfuse.org/releases" but this did not
> help.
> 
> (3)     If not, what am I doing wrong?
> 
>  
> 
>  
> 
> Thanks,
> 
> Siegfried
> 
>  
> 
>  
> 
>  
> 
> mvn archetype:create -DgroupId=www.signitek -DartifactId=demo-basic-spring
> -DarchetypeArtifactId=org.appfuse.archetypes
> -DarchetypeGroupId=appfuse-basic-spring
> 
> [INFO] Scanning for projects...
> 
> [INFO] Sea
> 
> rching 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.properties
> 
> [INFO] Default ResourceManager initializing. (class
> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> 
> [INFO] Resource Loader Instantiated:
> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
> 
> [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 'VM_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
> global in scope if allowed.
> 
> [INFO] Velocimacro : initialization complete.
> 
> [INFO] Velocity successfully started.
> 
> [INFO] [archetype:create]
> 
> [INFO] Defaulting package to group ID: www.signitek
> 
> [INFO] artifact appfuse-basic-spring:org.appfuse.archetypes: checking for
> updates from central
> 
> [WARNING] repository metadata for: 'artifact
> appfuse-basic-spring:org.appfuse.archetypes' 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] Error creating from archetype
> 
>  
> 
> Embedded error: Archetype does not exist.
> 
> 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=appfuse-basic-spring
> -DartifactId=org.appfuse.archetypes \
> 
>         -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=appfuse-basic-spring
> -DartifactId=org.appfuse.archetypes \
> 
>         -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file \
> 
>          -Durl=[url] -DrepositoryId=[id]
> 
>  
> 
>  
> 
>  
> 
>  
> 
>   appfuse-basic-spring:org.appfuse.archetypes:jar:RELEASE
> 
>  
> 
>  
> 
>  
> 
>  
> 
> [INFO]
> ------------------------------------------------------------------------
> 
> [INFO] For more information, run Maven with the -e switch
> 
> [INFO]
> ------------------------------------------------------------------------
> 
> [INFO] Total time: 26 seconds
> 
> [INFO] Finished at: Sun Oct 14 20:10:20 MDT 2007
> 
> [INFO] Final Memory: 5M/9M
> 
> [INFO]
> ------------------------------------------------------------------------
> 
>  
> 
> Compilation exited abnormally with code 1 at Sun Oct 14 20:10:20
> 
> 


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