ops4j / org.ops4j.pax.construct

Build, manage and deploy many types of OSGi bundles
https://ops4j1.jira.com/wiki/display/paxconstruct/Pax+Construct
24 stars 14 forks source link

IllegalStateException : No match found during execution of the following command : pax-create-bundle -n "reportincident bundle" -p org.ap ache.camel.example.reportincident.service -- "-Dspring" [PAXCONSTRUCT-102] #43

Closed ops4j-issues closed 14 years ago

ops4j-issues commented 15 years ago

Charles Moulliard created PAXCONSTRUCT-102

D:\Dvlpt\Java\workspace-ganymede\osgi\reportincident.service.osgi>pax-create-bundle -n "reportincident bundle" -p org.ap
ache.camel.example.reportincident.service – "-Dspring"

D:\Dvlpt\Java\workspace-ganymede\osgi\reportincident.service.osgi>mvn N org.ops4j:maven-pax-plugin:1.5-SNAPSHOT:create
bundle -Dpackage=org.apache.camel.example.reportincident.service -DbundleName="reportincident bundle" -DbundleGroupId= -
Dversion=1.0-SNAPSHOT "-Dspring"
INFO Scanning for projects...
INFO ------------------------------------------------------------------------
INFO Building org.apache.camel.example.reportincident.service.osgi (OSGi project)
INFO task-segment: org.ops4j:maven-pax-plugin:1.5-SNAPSHOT:create-bundle (aggregator-style)
INFO ------------------------------------------------------------------------
INFO Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoad
er'.
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.ResourceNotFo
undException: 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 pax:create-bundle
INFO Selecting latest archetype release within version range [0,2)
INFO artifact org.ops4j.pax.construct:maven-archetype-osgi-bundle: checking for updates from central
INFO ------------------------------------------------------------------------
ERROR FATAL ERROR
INFO ------------------------------------------------------------------------
INFO No match found
INFO ------------------------------------------------------------------------
INFO Trace
java.lang.IllegalStateException: No match found
at java.util.regex.Matcher.group(Matcher.java:468)
at org.ops4j.pax.construct.util.XppPathQuery.queryChildren(XppPathQuery.java:128)
at org.ops4j.pax.construct.util.XppPom.findChildren(XppPom.java:979)
at org.ops4j.pax.construct.util.XppPom.addModule(XppPom.java:441)
at org.ops4j.pax.construct.archetype.AbstractPaxArchetypeMojo.prepareTarget(AbstractPaxArchetypeMojo.java:582)
at org.ops4j.pax.construct.archetype.AbstractPaxArchetypeMojo.execute(AbstractPaxArchetypeMojo.java:336)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
a:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
INFO ------------------------------------------------------------------------
INFO Total time: 9 seconds
INFO Finished at: Tue Feb 10 16:48:22 CET 2009
INFO Final Memory: 11M/19M
INFO ------------------------------------------------------------------------


Fixed in: 1.5 Votes: 0, Watches: 0

ops4j-issues commented 15 years ago

Stuart McCulloch commented

I haven't been able to reproduce this exception with either 1.4 or 1.5-SNAPSHOT

Could you provide a standalone testcase that recreates the problem (ie. one that I can use without missing dependencies, etc.) as well as any OS, Java, and Maven details. Fixing the exception is straightforward but it would be useful to find out how it got to be in that state - in case there are other things going on that also need fixing.

BTW, I won't have time to look into this in great detail until next week at the earliest.

ops4j-issues commented 15 years ago

Charles Moulliard commented

The issue comes from the fact that the name of the bundle contains a space : -n "reportincident bundle"

ops4j-issues commented 15 years ago

Stuart McCulloch commented

Interesting - I ran exactly that command line (with the space) on Windows + Maven 2.0.9 + JDK 6 and didn't get any exception... are you using a similar setup and are you running this command in a clean directory, or inside an existing pax-construct project?

ops4j-issues commented 15 years ago

Charles Moulliard commented

I use a similar setup :

D:\Dvlpt\Java\workspace-ganymede\osgi\reportincident.service.osgi>mvn -version
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

I run this command inside a pax project

ops4j-issues commented 15 years ago

Stuart McCulloch commented

Try to recreate this and fix for 1.5

ops4j-issues commented 14 years ago

Charles Moulliard commented

Problem does not exist anymore with pax-construct 1.4