Tuesday, February 5, 2019

Maven: use lombok combined with OpenJPA metadata generation

Here is a example how to use lombok combined with OpenJPA metadata generation inside the maven-compiler-plugin:
    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.0</version>
        </dependency>

        <!-- needs to be defined here for the annotation processor -->
        <dependency>
            <groupId>org.apache.openjpa</groupId>
            <artifactId>openjpa</artifactId>
            <version>3.0.0</version>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                        <annotationProcessors>
                            <annotationProcessor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor</annotationProcessor>
                            <annotationProcessor>org.apache.openjpa.persistence.meta.AnnotationProcessor6</annotationProcessor>
                        </annotationProcessors>
                        <compilerArgs>
                            <arg>-Aopenjpa.metamodel=true</arg>
                            <arg>-Aopenjpa.source=7</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

16 comments:

  1. https://khurramssoftwares.blogspot.com/2018/06/list-of-top-100-it-companies.html?showComment=1579627853791#c683029749222638161

    ReplyDelete
  2. Searching for Software Devlopment Company? 3sstudio is Considered as the most well-established Software Devlopment Company in Delhi offers you an entire range of Devlopment services as far as erp & Crm Devlopment, with more than 1000+ satisfied clients.

    contact us on :+91 9811241103

    ReplyDelete
  3. Good article, but it would be better if in future you can share more about this subject. Keep posting.
    Best web design services in Lahore

    ReplyDelete
  4. Thank you for the information, good content.
    Searching for Software Development Company? 3sstudio is Considered as the most well-established Software Development Company in Delhi offers you an entire range of Development services as far as ERP & CRM Development, with more than 1000+ satisfied clients.

    ReplyDelete
  5. Thank for the information, Such a good content.
    Searching for Software Devlopment Company? 3sstudio is Considered as the most well-established Software Devlopment Company in Delhi offers you an entire range of Devlopment services as far as erp & Crm Devlopment, with more than 1000+ satisfied clients.

    contact us on :+91 9811241103

    ReplyDelete
  6. Thanks for a great post! It's amazing how the IT industry has changed in 10 years. How much easier it has become to develop projects. And how the demand for specialists has increased. And if earlier companies could rely only on their own forces or on the offers of the local market, now the possibilities have expanded. You can work with it business consultant from another country without any problems. Collaboration has become easy and accessible.

    ReplyDelete
  7. Great Blog. Thank you for sharing valuable information with us. learn so many new things about developments from here. We are also from the same domain. We offer Software Development Services in India.

    ReplyDelete
  8. DigisolHub
    Blogs play an important role in your business and can generate a lot of traffic to your website. But writing a blog post and keeping your audience engaged is not an easy task. It is important to provide and write content that is informational and interesting for users. read more

    ReplyDelete