Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support package-info for package annotation #34

Open
dufoli opened this issue Mar 5, 2020 · 10 comments
Open

support package-info for package annotation #34

dufoli opened this issue Mar 5, 2020 · 10 comments

Comments

@dufoli
Copy link
Contributor

dufoli commented Mar 5, 2020

the need is to support package annotation.
In cxf patch, I need to support this generation:
https://github.com/apache/cxf/blob/master/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java#L234

@stuartwdouglas
Copy link
Member

What is actually missing here? Is it just the flags that are wrong or is there something else missing?

@dufoli
Copy link
Contributor Author

dufoli commented Mar 5, 2020

ClassCreator is usefull to generate a class with annotation /methods/fields but when I need to annotate only package without class. What can I use ?

here is an example:
https://github.com/apache/cxf/blob/master/testutils/src/main/java/org/apache/cxf/customer/bare/package-info.java

@stuartwdouglas
Copy link
Member

package-info is just a normal class file, can't you just generate a class named package-info and add class level anntoations?

@dufoli
Copy link
Contributor Author

dufoli commented Oct 16, 2020

I have check by dumping my class file. Here is the result in idea:

package io.quarkus.it.cxf.quarkus_jaxws_asm;

@javax.xml.bind.annotation.XmlSchema(namespace = "http://cxf.it.quarkus.io/")
public class $$package-info /* Real name is 'package-info' / {
public $$package-info /
Real name is 'package-info' /() { / compiled code */ }
}

@dufoli
Copy link
Contributor Author

dufoli commented Oct 16, 2020

I expect to have :

@javax.xml.bind.annotation.XmlSchema(namespace = "http://cxf.it.quarkus.io/")
package io.quarkus.it.cxf.quarkus_jaxws_asm;

@dufoli
Copy link
Contributor Author

dufoli commented Oct 16, 2020

I need feedback, for implementation of package info support before going further.

@stuartwdouglas
Copy link
Member

Are you sure it does not already work? Just create a class called package-info

@dufoli
Copy link
Contributor Author

dufoli commented Oct 19, 2020

I will retry with class creator

@dufoli
Copy link
Contributor Author

dufoli commented Oct 19, 2020

indeed I can not test it because the important parameter is an enum. and enum has been fixed few weeks ago. So I will wait release to test it on my project .

@stuartwdouglas
Copy link
Member

quarkusio/quarkus#12814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants