You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Arne Styve <as...@offsimcentre.no> on 2007/05/14 14:34:54 UTC

Problems finding custom archetype...

Hi,
 
I've tried to build my own archetype to use when new projects are to be created here at our company. I've followed the recepie at http://maven.apache.org/plugins/maven-archetype-plugin/examples/archetype.html, and my new archetype works fine when running it from the same machine as it was created (and installed in the local repository).
I then deploy the artifact to our company repository (snapshot). When I now try to create a new project on a different PC, using the newly created archetype, Maven is not able to find the archetype. I have included the <pluginRepositories>-tag in my settings.xml file, and I am using the same Maven2 repository for plugins as for other artifacts. What might the problem bee ?
 
Regards
Arne


SV: Problems finding custom archetype...

Posted by Arne Styve <as...@offsimcentre.no>.
Hi again Wendy,
 
You made my day ;-)
 
I had version 1.0-alpha-3. Upgraded to 1.0-alpha-4, and it worked.
 
Thank you very much!!
 
Regards 
 
Arne

________________________________

Fra: Wendy Smoak [mailto:wsmoak@gmail.com]
Sendt: må 14.05.2007 18:08
Til: Maven Users List
Emne: Re: Problems finding custom archetype...



On 5/14/07, Arne Styve <as...@offsimcentre.no> wrote:
> Hi Wendy,
>
> Her is the command and the resulting output. Would be greate if you are able to spot the error:
...
> [INFO] Failed to resolve artifact.
> GroupId: no.offsimcentre
> ArtifactId: osc-archetype-simple
> Version: 1.0-SNAPSHOT
> Reason: Unable to download the artifact from any repository
> Try downloading the file manually from the project website.
> Then, install it using the command:
>     mvn install:install-file -DgroupId=no.offsimcentre -DartifactId=osc-archetype-simple \
>         -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
>
>   no.offsimcentre:osc-archetype-simple:jar:1.0-SNAPSHOT
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)

It's not checking your internal repository.  The remoteRepositories
parameter was added at some point... what version of the archetype
plugin are you using?

   mvn help:describe -Dplugin=archetype

Try adding -U on the command line to get Maven to update its plugins.

--
Wendy

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




Re: Problems finding custom archetype...

Posted by Wendy Smoak <ws...@gmail.com>.
On 5/14/07, Arne Styve <as...@offsimcentre.no> wrote:
> Hi Wendy,
>
> Her is the command and the resulting output. Would be greate if you are able to spot the error:
...
> [INFO] Failed to resolve artifact.
> GroupId: no.offsimcentre
> ArtifactId: osc-archetype-simple
> Version: 1.0-SNAPSHOT
> Reason: Unable to download the artifact from any repository
> Try downloading the file manually from the project website.
> Then, install it using the command:
>     mvn install:install-file -DgroupId=no.offsimcentre -DartifactId=osc-archetype-simple \
>         -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
>
>   no.offsimcentre:osc-archetype-simple:jar:1.0-SNAPSHOT
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)

It's not checking your internal repository.  The remoteRepositories
parameter was added at some point... what version of the archetype
plugin are you using?

   mvn help:describe -Dplugin=archetype

Try adding -U on the command line to get Maven to update its plugins.

-- 
Wendy

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


SV: Problems finding custom archetype...

Posted by Arne Styve <as...@offsimcentre.no>.
Hi Wendy,
 
Her is the command and the resulting output. Would be greate if you are able to spot the error:
 
 
C:\tmp>mvn archetype:create \
    -DgroupId=no.offsimcentre \
    -DartifactId=testing  \
    -DarchetypeGroupId=no.offsimcentre \
    -DarchetypeArtifactId=osc-archetype-simple \
    -DarchetypeVersion=1.0-SNAPSHOT \
    -DremoteRepositories=http://osc.hials.no/maven2/Snapshots

[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: resource.loader => 'classpath'.
[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 : messages on  : VM system will output logging messages
[INFO] Velocimacro : autoload off  : VM system will not automatically reload global library macros
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [archetype:create]
[INFO] Defaulting package to group ID: no.offsimcentre
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
GroupId: no.offsimcentre
ArtifactId: osc-archetype-simple
Version: 1.0-SNAPSHOT
Reason: Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
    mvn install:install-file -DgroupId=no.offsimcentre -DartifactId=osc-archetype-simple \
        -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

  no.offsimcentre:osc-archetype-simple:jar:1.0-SNAPSHOT
from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon May 14 17:44:34 CEST 2007
[INFO] Final Memory: 4M/7M
[INFO] ------------------------------------------------------------------------
C:\Documents and Settings\asty\Skrivebord>
 
 

 

Re: Problems finding custom archetype...

Posted by Wendy Smoak <ws...@gmail.com>.
On 5/14/07, Arne Styve <as...@offsimcentre.no> wrote:

> I've tried this too, but still it will not work. When I chekout the archetype project (that is used to create the archetype), and do a "mvn install", then creating a new project using the new archetype works fine on this PC too.....

Please post the command you're using and the resulting error message.
It's hard to debug "doesn't work". :)

-- 
Wendy

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


SV: Problems finding custom archetype...

Posted by Arne Styve <as...@offsimcentre.no>.
Hi Wendy,

>> I then deploy the artifact to our company repository (snapshot). When I now try to create a new project on a different PC, >>using the newly created archetype, Maven is not able to find the archetype. I have included the <pluginRepositories>-tag >> in my settings.xml file, and I am using the same Maven2 repository for plugins as for other artifacts. What might the
>> problem be ?
>
>Use -DremoteRepositories on the command line, as described here:
>
>http://maven.apache.org/plugins/maven-archetype-plugin/examples/remote-repositories.html
>

I've tried this too, but still it will not work. When I chekout the archetype project (that is used to create the archetype), and do a "mvn install", then creating a new project using the new archetype works fine on this PC too.....
 
Arne

Re: Problems finding custom archetype...

Posted by Wendy Smoak <ws...@gmail.com>.
On 5/14/07, Arne Styve <as...@offsimcentre.no> wrote:

> I then deploy the artifact to our company repository (snapshot). When I now try to create a new project on a different PC, using the newly created archetype, Maven is not able to find the archetype. I have included the <pluginRepositories>-tag in my settings.xml file, and I am using the same Maven2 repository for plugins as for other artifacts. What might the problem bee ?

Use -DremoteRepositories on the command line, as described here:

http://maven.apache.org/plugins/maven-archetype-plugin/examples/remote-repositories.html

-- 
Wendy

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