knowhowlab / keepass-maven-plugin

Maven plugin to integrate KeePass into build process
Apache License 2.0
5 stars 4 forks source link

JAXB missing? #7

Open dpalic opened 3 years ago

dpalic commented 3 years ago

Hi tried to install the keepass plugin, but failing on:

[INFO] --- keepass-maven-plugin:0.4.1:read (read-kdbx-develop) @ myapp ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by de.slackspace.openkeepass.crypto.Aes (file:/home/dummy/.m2/repository/de/slackspace/openkeepass/0.5.1/openkeepass-0.5.1.jar) to field javax.crypto.JceSecurity.isRestricted
WARNING: Please consider reporting this to the maintainers of de.slackspace.openkeepass.crypto.Aes
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.372 s
[INFO] Finished at: 2021-03-30T07:17:01+02:00
[INFO] Final Memory: 25M/100M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.knowhowlab.maven.plugins:keepass-maven-plugin:0.4.1:read (read-kdbx-develop) on project myapp: Execution read-kdbx-develop of goal org.knowhowlab.maven.plugins:keepass-maven-plugin:0.4.1:read failed: A required class was missing while executing org.knowhowlab.maven.plugins:keepass-maven-plugin:0.4.1:read: javax/xml/bind/JAXB

using on ubuntu 18.04

java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03)
OpenJDK 64-Bit Server VM GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03, mixed mode, sharing)
dpalic commented 3 years ago

workarounded for me by adding the dependency manually to the plugin

            <!-- https://mvnrepository.com/artifact/org.knowhowlab.maven.plugins/keepass-maven-plugin -->
            <plugin>
               <groupId>org.knowhowlab.maven.plugins</groupId>
               <artifactId>keepass-maven-plugin</artifactId>
               <version>0.4.1</version>
               <configuration>
                  <file>${project.basedir}/accounts.kdbx</file>
               </configuration>
               <dependencies>
                  <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl -->
                  <dependency>
                     <groupId>com.sun.xml.bind</groupId>
                     <artifactId>jaxb-impl</artifactId>
                     <version>2.3.3</version>
                  </dependency>
               </dependencies>
            </plugin>
dpalic commented 3 years ago

tried to deliver a quick fix for the pom, but sadly it seems to be more complicated.

I would suggest to upgrade to latest libs for the build to get a easier integration for jaxb and so on

maybe this helps: https://stackoverflow.com/questions/50295487/noclassdeffounderror-could-not-initialize-class-com-sun-xml-bind-v2-model-impl