You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Ingo Feulner <in...@feulner-tech.com> on 2008/08/23 23:56:56 UTC
maven-scr-plugin 1.0.7 still seems to have problems with parent projects?
Hi,
there still seems to be a problem with maven-scr-plugin, if the
project POM references a paren POM:
It works with 1.0.5, but does not work with 1.0.6, 1.0.7 and the
trunk... here's the debug output:
It tries to reference a manifest, but there's no in a POM project...
Any ideas? best regards, Ingo,
[DEBUG] Configuring mojo 'org.apache.felix:maven-scr-plugin:1.0.8-
SNAPSHOT:scr' -->
[DEBUG] (f) finalName = serviceComponents.xml
[DEBUG] (f) generateAccessors = true
[DEBUG] (f) metaTypeName = metatype.xml
[DEBUG] (f) outputDirectory = /Users/ifeulner/Dev/svn/trunk/src/oc-
card-services/target/scr-plugin-generated
[DEBUG] (f) project = MavenProject: net.openconnector:oc-card-
services:1.0-SNAPSHOT @ /Users/ifeulner/Dev/svn/trunk/src/oc-card-
services/pom.xml
[DEBUG] -- end configuration --
[INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
[DEBUG] Starting SCRDescriptorMojo....
[DEBUG] ..generating accessors: true
[DEBUG] Setting up QDox
[DEBUG] Adding source tree /Users/ifeulner/Dev/svn/trunk/src/oc-card-
services/src/main/java
[DEBUG] Checking artifact net.openconnector.build:provision:pom:1.0-
SNAPSHOT:provided
[DEBUG] Resolving artifact net.openconnector.build:provision:pom:1.0-
SNAPSHOT:provided
[DEBUG] Trying to get manifest from artifact
net.openconnector.build:provision:pom:1.0-SNAPSHOT:provided
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Unable to get manifest from artifact
net.openconnector.build:provision:pom:1.0-SNAPSHOT:provided
Embedded error: error in opening zip file
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get
manifest from artifact net.openconnector.build:provision:pom:1.0-
SNAPSHOT:provided
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
583)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor
.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor
.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor
.executeTaskSegments(DefaultLifecycleExecutor.java:291)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to
get manifest from artifact net.openconnector.build:provision:pom:1.0-
SNAPSHOT:provided
at
org
.apache
.felix
.scrplugin
.tags
.JavaClassDescriptorManager.<init>(JavaClassDescriptorManager.java:170)
at
org
.apache
.felix.scrplugin.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:106)
at
org
.apache
.maven
.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
558)
... 16 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.jar.JarFile.<init>(JarFile.java:133)
at java.util.jar.JarFile.<init>(JarFile.java:97)
at
org
.apache
.felix
.scrplugin
.tags
.JavaClassDescriptorManager
.getManifest(JavaClassDescriptorManager.java:270)
at
org
.apache
.felix
.scrplugin
.tags
.JavaClassDescriptorManager.<init>(JavaClassDescriptorManager.java:150)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: maven-scr-plugin 1.0.7 still seems to have problems with parent projects?
Posted by Ingo Feulner <in...@feulner-tech.com>.
Am 24.08.2008 um 13:07 schrieb Ingo Feulner:
> Hi Carsten,
>
> I've just tried it and this problem is fixed now, thanks for the
> quick fix!
> But there's now another problem with the new format of the
> serviceComponent.xml - it does not work anymore when running inside
> the felix container (it's working inside eclipse now ...). Output of
> maven-scr-plugin is:
Well, of course I wanted to write "equinox"...
- Ingo.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: maven-scr-plugin 1.0.7 still seems to have problems with parent
projects?
Posted by Carsten Ziegeler <cz...@apache.org>.
Ingo Feulner wrote:
> Hi Carsten,
>
> when do you think there will be a new release of the plugin and the
> metatype implementation?
> Anything I can help here?
>
Hi Ingo,
we're planning to have a release by next week. Testing and reporting
problems (or even having no problems) is always a great help.
Thanks
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: maven-scr-plugin 1.0.7 still seems to have problems with parent projects?
Posted by Ingo Feulner <in...@feulner-tech.com>.
Hi Carsten,
when do you think there will be a new release of the plugin and the
metatype implementation?
Anything I can help here?
Best regards, Ingo.
Am 25.08.2008 um 14:03 schrieb Carsten Ziegeler:
> Ingo Feulner wrote:
>> Ok, thanks for the information, so I'll wait for the new release of
>> the
>> two components.
>>
>> For the scr-plugin: Looking at the generated metatype.xml, which also
>> uses the "metatype" namespace in all tags,
>> is it possible there will be the same problems as with the
>> serviceComponents.xml?
>> I haven't tried it yet...
>>
> Hi Ingo,
>
> yes, you're right - the generated metatype xml file suffers from the
> same problem; I just fixed this in the plugin. Fortunately the
> metatype
> implementation at Apache Felix is not checking the namespace,
> therefore
> it should work ootb.
>
> Thanks!
> Carsten
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
Re: maven-scr-plugin 1.0.7 still seems to have problems with parent
projects?
Posted by Carsten Ziegeler <cz...@apache.org>.
Ingo Feulner wrote:
> Ok, thanks for the information, so I'll wait for the new release of the
> two components.
>
> For the scr-plugin: Looking at the generated metatype.xml, which also
> uses the "metatype" namespace in all tags,
> is it possible there will be the same problems as with the
> serviceComponents.xml?
> I haven't tried it yet...
>
Hi Ingo,
yes, you're right - the generated metatype xml file suffers from the
same problem; I just fixed this in the plugin. Fortunately the metatype
implementation at Apache Felix is not checking the namespace, therefore
it should work ootb.
Thanks!
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: maven-scr-plugin 1.0.7 still seems to have problems with parent projects?
Posted by Ingo Feulner <in...@feulner-tech.com>.
Ok, thanks for the information, so I'll wait for the new release of
the two components.
For the scr-plugin: Looking at the generated metatype.xml, which also
uses the "metatype" namespace in all tags,
is it possible there will be the same problems as with the
serviceComponents.xml?
I haven't tried it yet...
Best regards, Ingo.
Am 25.08.2008 um 07:49 schrieb Carsten Ziegeler:
> Ingo Feulner wrote:
>> Hi Carsten,
>>
>> I've just tried it and this problem is fixed now, thanks for the
>> quick fix!
>> But there's now another problem with the new format of the
>> serviceComponent.xml - it does not work anymore when running inside
>> the
>> felix container
> Hi Ingo,
>
> yes this is a known problem :( Unfortunately we did not handle the xml
> format correctly. Therefore you have to use the latest Felix scr
> implementation from svn. This should handle the correct xml format now
> generated by the scr plugin.
>
> We will release both, scr and the plugin asap.
>
> Carsten
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
Re: maven-scr-plugin 1.0.7 still seems to have problems with parent
projects?
Posted by Carsten Ziegeler <cz...@apache.org>.
Ingo Feulner wrote:
> Hi Carsten,
>
> I've just tried it and this problem is fixed now, thanks for the quick fix!
> But there's now another problem with the new format of the
> serviceComponent.xml - it does not work anymore when running inside the
> felix container
Hi Ingo,
yes this is a known problem :( Unfortunately we did not handle the xml
format correctly. Therefore you have to use the latest Felix scr
implementation from svn. This should handle the correct xml format now
generated by the scr plugin.
We will release both, scr and the plugin asap.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: maven-scr-plugin 1.0.7 still seems to have problems with parent projects?
Posted by Ingo Feulner <in...@feulner-tech.com>.
Hi Carsten,
I've just tried it and this problem is fixed now, thanks for the quick
fix!
But there's now another problem with the new format of the
serviceComponent.xml - it does not work anymore when running inside
the felix container (it's working inside eclipse now ...). Output of
maven-scr-plugin is:
=======================
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
<scr:component enabled="true" immediate="true"
name="net.oc.cardservices.terminal.CardTerminalRegistry">
<implementation
class="net.oc.cardservices.terminal.CardTerminalRegistry"/>
<service servicefactory="false">
<provide
interface="net.oc.cardservices.terminal.CardTerminalRegistry"/>
</service>
<property name="service.pid"
value="net.oc.cardservices.terminal.CardTerminalRegistry"/>
<reference name="cardTerminalFactory"
interface="net.oc.cardservices.terminal.CardTerminalFactory"
cardinality="1..1" policy="static" bin
d="bindCardTerminalFactory" unbind="unbindCardTerminalFactory"/>
<reference name="eventAdmin"
interface="org.osgi.service.event.EventAdmin" cardinality="1..1"
policy="static" bind="bindEventAdmin" unbind="unbindEv
entAdmin"/>
</scr:component>
<scr:component enabled="true" immediate="true"
name="net.oc.cardservices.terminal.pcsc.PCSCCardTerminalFactory">
<implementation
class="net.oc.cardservices.terminal.pcsc.PCSCCardTerminalFactory"/>
<service servicefactory="false">
<provide
interface="net.oc.cardservices.terminal.CardTerminalFactory"/>
</service>
<property name="service.pid"
value="net.oc.cardservices.terminal.pcsc.PCSCCardTerminalFactory"/>
</scr:component>
</components>
===============================
This results in an exception by the declarative services (1.0.4):
(it seems, that the felix implementation does not recognize the
implementation tag anymore... )
===============================
[Felix Shell TUI] INFO org.apache.felix.scr - ServiceEvent REGISTERED
[Felix Shell TUI] ERROR net.oc.oc-card-services - General problem with
descriptor entry 'OSGI-INF/serviceComponents.xml'
org.osgi.service.component.ComponentException: Component
net.oc.cardservices.terminal.CardTerminalRegistry validation failed:
Implementation class name missing
at
org
.apache
.felix
.scr.impl.ComponentMetadata.validationFailure(ComponentMetadata.java:
352)
at
org
.apache
.felix.scr.impl.ComponentMetadata.validate(ComponentMetadata.java:280)
at org.apache.felix.scr.impl.XmlHandler.endElement(XmlHandler.java:244)
at
org
.apache
.felix.scr.impl.parser.KXml2SAXParser.parseXML(KXml2SAXParser.java:77)
at
org
.apache
.felix
.scr
.impl
.BundleComponentActivator.initialize(BundleComponentActivator.java:154)
at
org
.apache
.felix
.scr
.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:110)
at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:
227)
at
org.apache.felix.scr.impl.Activator.loadAllComponents(Activator.java:
193)
at org.apache.felix.scr.impl.Activator.start(Activator.java:102)
at
org
.apache
.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1610)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1544)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:371)
at
org
.apache
.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:82)
at org.apache.felix.shell.impl.Activator
$ShellServiceImpl.executeCommand(Activator.java:276)
at org.apache.felix.shell.tui.Activator
$ShellTuiRunnable.run(Activator.java:167)
at java.lang.Thread.run(Thread.java:637)
[
====================================
Best regards, Ingo.
Am 24.08.2008 um 06:31 schrieb Carsten Ziegeler:
> Hi Ingo,
>
> thanks for reporting this - I've create the issue FELIX-696 and
> committed a fix for this to svn trunk. The plugin now checks the
> artifact type (jar or bundle) before trying to open it.
>
> Could you please test the latest version?
>
> Thanks
> Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: maven-scr-plugin 1.0.7 still seems to have problems with parent
projects?
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Ingo,
thanks for reporting this - I've create the issue FELIX-696 and
committed a fix for this to svn trunk. The plugin now checks the
artifact type (jar or bundle) before trying to open it.
Could you please test the latest version?
Thanks
Carsten
Ingo Feulner wrote:
> Hi,
>
> there still seems to be a problem with maven-scr-plugin, if the project
> POM references a paren POM:
> It works with 1.0.5, but does not work with 1.0.6, 1.0.7 and the
> trunk... here's the debug output:
> It tries to reference a manifest, but there's no in a POM project...
>
> Any ideas? best regards, Ingo,
>
>
> [DEBUG] Configuring mojo
> 'org.apache.felix:maven-scr-plugin:1.0.8-SNAPSHOT:scr' -->
> [DEBUG] (f) finalName = serviceComponents.xml
> [DEBUG] (f) generateAccessors = true
> [DEBUG] (f) metaTypeName = metatype.xml
> [DEBUG] (f) outputDirectory =
> /Users/ifeulner/Dev/svn/trunk/src/oc-card-services/target/scr-plugin-generated
>
> [DEBUG] (f) project = MavenProject:
> net.openconnector:oc-card-services:1.0-SNAPSHOT @
> /Users/ifeulner/Dev/svn/trunk/src/oc-card-services/pom.xml
> [DEBUG] -- end configuration --
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [DEBUG] Starting SCRDescriptorMojo....
> [DEBUG] ..generating accessors: true
> [DEBUG] Setting up QDox
> [DEBUG] Adding source tree
> /Users/ifeulner/Dev/svn/trunk/src/oc-card-services/src/main/java
> [DEBUG] Checking artifact
> net.openconnector.build:provision:pom:1.0-SNAPSHOT:provided
> [DEBUG] Resolving artifact
> net.openconnector.build:provision:pom:1.0-SNAPSHOT:provided
> [DEBUG] Trying to get manifest from artifact
> net.openconnector.build:provision:pom:1.0-SNAPSHOT:provided
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Unable to get manifest from artifact
> net.openconnector.build:provision:pom:1.0-SNAPSHOT:provided
>
> Embedded error: error in opening zip file
> [INFO]
> ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get
> manifest from artifact
> net.openconnector.build:provision:pom:1.0-SNAPSHOT:provided
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
>
> 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)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to get
> manifest from artifact
> net.openconnector.build:provision:pom:1.0-SNAPSHOT:provided
> at
> org.apache.felix.scrplugin.tags.JavaClassDescriptorManager.<init>(JavaClassDescriptorManager.java:170)
>
> at
> org.apache.felix.scrplugin.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:106)
>
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
>
> ... 16 more
> Caused by: java.util.zip.ZipException: error in opening zip file
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.<init>(ZipFile.java:114)
> at java.util.jar.JarFile.<init>(JarFile.java:133)
> at java.util.jar.JarFile.<init>(JarFile.java:97)
> at
> org.apache.felix.scrplugin.tags.JavaClassDescriptorManager.getManifest(JavaClassDescriptorManager.java:270)
>
> at
> org.apache.felix.scrplugin.tags.JavaClassDescriptorManager.<init>(JavaClassDescriptorManager.java:150)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org