bsideup / jabel

Jabel - unlock Javac 9+ syntax when targeting Java 8
Apache License 2.0
800 stars 47 forks source link

Plug in not found jabel (Maven) #142

Open strogiyotec opened 2 years ago

strogiyotec commented 2 years ago

Hello I am trying to install it locally using maven , I have a minimal pom xml file with the following lines from the README First is a dependency


        <dependency>
            <groupId>com.github.bsideup.jabel</groupId>
            <artifactId>jabel-javac-plugin</artifactId>
            <version>0.4.2</version>
            <scope>provided</scope>
        </dependency>

Then intellij profiler

<profiles>
        <profile>
            <id>intellij-idea-only</id>
            <activation>
                <property>
                    <name>idea.maven.embedder.version</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <release>14</release>
                            <compilerArgs>
                                <arg>--enable-preview</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

And then here is the compiler declaration

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <useIncrementalCompilation>false</useIncrementalCompilation>
                    <release>11</release>
                    <source>14</source>
                    <target>14</target>
                    <compilerArgs>
                        <arg>-Xplugin:jabel</arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>com.google.dagger</groupId>
                            <artifactId>dagger-compiler</artifactId>
                            <version>2.27</version>
                        </path>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>1.18.20</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

But when I run mvn clean package it fails with the following message

ROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project test
: Compilation failure
[ERROR] plug-in not found: jabel

I noticed that @bsideup you have a pom example in your blog website but it covers version 0.2 which requires annotation processor, not sure if it's a case with 0.4.2 How can I make it work with maven ? Regards !