简体   繁体   中英

Embedding/Including generated sources with maven-bundle-plugin

I'm using OSGi (Fuse 7 / Karaf 4)

I was previously generating WSDL classes in my shared libs, and exporting them to service layer.

I'm trying to shift now to exporting the WSDL itself, and generating classes at the service layer.

The service classes and blueprint use the generated classes.
But I need to use a ! in the Import-Package, so BND doesn't try to import them.

I want it to find these generated classes, which Maven builds, into target/generated/src/main/java.

But if I look in the bundle jar, these CXF-generated classes aren't included.

How do I get BND to include the sources in this folder?

At the moment, I'm getting the error:

    Caused by: java.lang.ClassNotFoundException: com.company.ObjectFactory not found by Service [374]

And fair enough, because it's not in the jar. But the sources are under /target/generated, and it all compiles fine.

Things I've tried:

Embed-Directory

Include-Resource

build-helper-maven-plugin

所以,它对我没有多大意义,但是,我删除了我的部分,这导致wsdl生成的源文件包含在捆绑包中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM