-
Notifications
You must be signed in to change notification settings - Fork 200
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 for project Lombok #182
Comments
Acknowledged. I'll make this an enhancement request for support for project Lombok. |
+1 for Lombok support ! |
Okay, so I'm having a hard time figuring out how to integrate with Lombok. My goal is to get Enunciate to be compiled against the code generated by Lombok, but the project homepage seems to imply that it's integrated into the IDE. How does it work? If you're using Gradle, does Gradle use some kind of Lombok task to generate the boilerplate code? Or you do you rely on Eclipse to generate the boilerplate code and then have Gradle compile it that way? |
Hi @stoicflame the project homepage gives instructions to "patch" your IDE to properly handle lombok annotations but to generate code using lombok you just need to include lombok dependency in your pom.xml or build.gradle and put lombok annotations in your code! You can find more here : http://jnb.ociweb.com/jnb/jnbJan2010.html |
Does anyone have a sample project I can use to demonstrate how to apply Enunciate to it? |
Today I took the The good news is that - overall - it is working for me ! However, I am actually running into issues with See : In that case I get :
and I'm not sure if we can relate that one to any existing issue... On my end I will see if I can workaround the issue in my own project by always using |
After using the workaround above and also after removing duplicate class name reported in #166 I'm now able to generate enunciate docs for my project! Thanks a lot @stoicflame for the great work! I think you can safely close that issue as it was confirmed (using branch listed above) that using lombok works with enunciate without any major issue. |
Sweet. Thanks! |
This issue is closed, but there is no milestone specified. Does enunciate 2.2.0 support lombok or will it be for the next release ? I tried the 2.2.0 but it doesn't work for me. Maybe I miss something but it works if I manually write the getters. |
This issue is closed because support can be enabled by using the technique described above. |
I think should use like this
maybe like java doc plugin, should surpport like |
Seems reasonable. Tracking at #427. |
I have tried the solution proposed above but still find unsufficient support. In the enunciate-sample-lombok there is no Javadoc on the model fields. Even when I add Javadoc to the Persona fields, I can't find no documentation on the enunciate html page. In fact, there is no field at all and the example says |
I'll take a closer look at Lombok support for 2.6. |
Okay, with the fix at #427, I was able to successfully integrate Enunciate into a Lombok project as follows: Configure Lombok to Generate the SourcesIn Maven, it looks like this: <plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>${lombok.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>utf-8</encoding>
<addOutputDirectory>false</addOutputDirectory>
<sourceDirectory>src/main/java</sourceDirectory>
</configuration>
</plugin> The Lombok plugin will put the generated sources in Set the Enunciate Compiler DirectoryIn Maven, that looks like this: <plugin>
<groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-maven-plugin</artifactId>
<version>${enunciate.version}</version>
<executions>
<execution>
<goals>
<goal>assemble</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/delombok</source>
</sources>
</configuration>
</execution>
</executions>
</plugin> I have confirmed that the appropriate documentation is also included. |
Great news ! I'm looking forward for the 2.6.0 then. |
How about gradle? I'm not able to create it with gradle plugin. Even with uncommented sourcepath metod I still get empty classes with no properties.
|
I don't know Enunciate internals, but maybe it is worth to create lombok module to first-class support instead of using delombok step? Would it be doable @stoicflame ? |
We may need to enhance the gradle plugin to support setting the source files. Sure, a lombok module is totally doable. |
At 43a3ca0, @SpOOnman contributed a new module with native Lombok support, so you don't have to apply the delombok step. This will be included in Enunciate 2.7. See https://github.com/stoicflame/enunciate/wiki/Lombok. |
@stoicflame For some strange reason I can't get lombok support working. After running the archetype I've changed the pom according to the wiki. And I added |
@peter-janssen, I'm not seeing the problem. When I remove the See this patch. If you can provide more details about what you're seeing, let's open a new issue to track it. |
I am seeing enuciate is not generating no attributes for data type if project is using Lombok.
Using Lombok we don't need to explicit getter and setter code.
I am using gradle enuciate plugin.
The text was updated successfully, but these errors were encountered: