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] Parameter:
>> packageName, Value: com.acme [INFO] Parameter: basedir,
>> Value: C:\dev\apacheds\schema-archetype [INFO] Parameter:
>> package, Value: com.acme [INFO] Parameter: version, Value:
>> 1.0-SNAPSHOT [INFO] Parameter: artifactId, Value: foo-schema [INFO]
>> --------------------------------------------------------------
>> ----------
>> [ERROR] BUILD ERROR
>> [INFO]
>> --------------------------------------------------------------
>> ----------
>> [INFO] Error creating from archetype
>>
>> Embedded error: Unable to add module to the current project
>> as it is not of pack aging type 'pom'
>> [INFO]
>> --------------------------------------------------------------
>> ----------
>> [INFO] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: Error
>> creating from arch etype
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:559)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
>> Goal(DefaultLifecycleExecutor.java:488)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
>> ltLifecycleExecutor.java:458)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
>> dleFailures(DefaultLifecycleExecutor.java:306)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> ts(DefaultLifecycleExecutor.java:219)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> fecycleExecutor.java:140)
>>         at
>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>>         at
>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> java:39)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>         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.MojoExecutionException:
>> Error creating from a rchetype
>>         at
>> org.apache.maven.plugin.archetype.MavenArchetypeMojo.execute(MavenArc
>> hetypeMojo.java:201)
>>         at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
>> nManager.java:412)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:534)
>>         ... 16 more
>> Caused by:
>> org.apache.maven.archetype.ArchetypeTemplateProcessingExceptio
>> n: Unab le to add module to the current project as it is not
>> of packaging type 'pom'
>>         at
>> org.apache.maven.archetype.DefaultArchetype.createArchetype(DefaultAr
>> chetype.java:306)
>>         at
>> org.apache.maven.plugin.archetype.MavenArchetypeMojo.execute(MavenArc
>> hetypeMojo.java:188)
>>         ... 18 more
>> [INFO]
>> --------------------------------------------------------------
>> ----------
>> [INFO] Total time: 1 second
>> [INFO] Finished at: Fri Aug 25 16:50:48 CDT 2006 [INFO] Final
>> Memory: 4M/8M [INFO]
>> --------------------------------------------------------------
>> ----------
>>
>> C:\dev\apacheds\schema-archetype>
>>
>> Any ideas?
>>
>> Cheers,
>> Craig
>>
>>> -----Original Message-----
>>> From: Alex Karasulu [mailto:[EMAIL PROTECTED]
>>> Sent: Friday, August 25, 2006 11:48 AM
>>> To: Apache Directory Developers List
>>> Cc: [EMAIL PROTECTED]
>>> Subject: [ApacheDS] Custom Schema (was: Adding an objectClass to
>>> ApacheDS)
>>>
>>> Peoples,
>>>
>>> I've created a maven archetype to create ApacheDS schema
>> projects as
>>> maven projects.  The artifact generated by these schema
>> projects are
>>> jars containing the classes of your schema.  In a wiki page we show
>>> you how to use this jar with stock installations of ApacheDS and
>>> embedded instances to install and use your custom schemas.
>> But first,
>>> *WARNING*: Adding schema files to the core is *not* a
>> proper solution
>>> to your problem of adding custom schema to ApacheDS.
>>>
>>> The technique for doing this properly using this new archetype is
>>> outlined here:
>>>
>>>     http://docs.safehaus.org/display/APACHEDS/Custom+Schema
>>>
>>> Those of you interested in using this archetype to extend
>> the schema
>>> for both embedded and stock installs please take a minute to review
>>> this HowTo.  It would be good if you followed it and gave some
>>> feedback so I can make corrections to it for others.
>>>
>>> Alex
>>>
>




--
Ersin

Reply via email to