GithubHelp home page GithubHelp logo

Comments (3)

agentgt avatar agentgt commented on June 10, 2024

After testing it doesn't really matter. Ultimately because of the way this library is designed you have to use:

<annotationProcessorPaths>
....
</<annotationProcessorPaths>

instead of just

<dependencies>
<dependency> dom apt as optional and provided </dependency>
</dependencies>

Because org.seasar.doma.processor can only be put on the classpath as that is all both Maven and Gradle support for APT (javac actually supports APT with modulepath) doma.core needs to as well. What happens though is doma.core will be on the module path in a modular environment.

The reason annotationProcessorPaths works is that Maven will put the doma.core dependency into the classpath as well as the modulepath but I warn you this can have weird results.

In my library https://github.com/jstachio/jstachio you do not have to use annotationProcessorPaths and let the compiler discover precisely because I make sure every dependencies is shaded in and never access the annotations directly.

I highly recommend you consider shading doma.core into the doma.processor to avoid issues you like this. Ideally the annotations should be in their own jar as well.


With all that being said you should still correct the module-info.java in case someone does use javac --processor-module-path

from doma.

nakamura-to avatar nakamura-to commented on June 10, 2024

Thanks for your feedback.

I highly recommend you consider shading doma.core into the doma.processor to avoid issues you like this. Ideally the annotations should be in their own jar as well.

I will consider it in a future version.

from doma.

nakamura-to avatar nakamura-to commented on June 10, 2024

Shadow jar support was addressed in #992

from doma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.