It looks like it's complaining that one of the
templates it needs are missing from the directory it
expects the template to be in.
Maven reads the archetype descriptor archetype.xml,
and
that's how it figures out what templates it needs.
In this case I'm guessing that:
'src/test/java/SchemaTest.java'
is defined like this in the archetype.xml descriptor:
<sources>
<source>src/test/java/SchemaTest.java</source>
</sources>
but it should be defined like this:
<testSources>
<source>src/test/java/SchemaTest.java</source>
</testSources>
Cheers,
- Ole
--- Ersin Er <[EMAIL PROTECTED]> wrote:
> Alex,
>
> I am cd'ing to any directory, say to my Desktop
> directory and running
> the command:
>
> mvn archetype:create
> -DarchetypeGroupId=org.apache.directory.server \
>
> -DarchetypeArtifactId=apacheds-schema-archetype \
>
> -DarchetypeVersion=1.0-RC4-SNAPSHOT \
> -DgroupId=com.acme
> -DartifactId=foo-schema
>
> and the result is:
>
> [INFO]
>
------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
>
------------------------------------------------------------------------
> [INFO] Error creating from archetype
>
> Embedded error: Template
> 'src/test/java/SchemaTest.java' not in
> directory 'src/main/java'
>
> Do you think it's a local problem ?
>
> --
> Ersin
>
> On 8/26/06, Alex Karasulu <[EMAIL PROTECTED]>
> wrote:
> > This happens if you run the command inside the
> archetype directory. CD
> > out of schema-archetype and try the command.
> >
> > Alex
> >
> >
> > Craig L. Ching wrote:
> > > Bah, that error should have been:
> > >
> > > Embedded error: Unable to add module to the
> current project as it is not
> > > of packaging type 'pom'
> > >
> > > Cheers,
> > > Craig
> > >
> > >> -----Original Message-----
> > >> From: Craig L. Ching
> [mailto:[EMAIL PROTECTED]
> > >> Sent: Friday, August 25, 2006 4:54 PM
> > >> To: Apache Directory Developers List
> > >> Cc: [EMAIL PROTECTED]
> > >> Subject: RE: [ApacheDS] Custom Schema (was:
> Adding an
> > >> objectClass to ApacheDS)
> > >>
> > >> Hi Alex,
> > >>
> > >> Ok, I've tried this a few times and I'm stuck.
> I think I'm
> > >> following the directions you gave out, but when
> I issue the
> > >> mvn archetype:create command, I get an error
> that says:
> > >>
> > >> Embedded error: Unable to add module to the
> current project
> > >> as it is not of pack
> > >>
> > >> Here is a snapshot of the full command line
> (I'm using Maven
> > >> 2.0.4 on Windows XP):
> > >>
> > >> C:\dev\apacheds\schema-archetype>mvn -e
> archetype:create
> > >> -DarchetypeGroupId=org.
> > >> apache.directory.server
> > >> -DarchetypeArtifactId=apacheds-schema-archetype
> > >> -Darchet
> > >> ypeVersion=1.0-RC4-SNAPSHOT -DgroupId=com.acme
> -DartifactId=foo-schema
> > >> + Error stacktraces are turned on.
> > >> [INFO] Scanning for projects...
> > >> [INFO] Searching repository for plugin with
> prefix: 'archetype'.
> > >> [INFO]
> > >>
>
--------------------------------------------------------------
> > >> ----------
> > >> -
> > >> ---
> > >> [INFO] Building ApacheDS Schema Archetype
> > >> [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.acme
> [INFO]
> > >>
>
--------------------------------------------------------------
> > >> ----------
> > >> -
> > >> ---
> > >> [INFO] Using following parameters for creating
> Archetype:
> > >> apacheds-schema-archet
> > >> ype:1.0-RC4-SNAPSHOT
> > >> [INFO]
> > >>
>
--------------------------------------------------------------
> > >> ----------
> > >> -
> > >> ---
> > >> [INFO] Parameter: groupId, Value: com.acme
> [INFO]
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com