Skip to content
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

Cannot generator any code with InterfaceCodeGenerator #218

Closed
jonathanjsimon opened this issue Jun 11, 2023 · 2 comments
Closed

Cannot generator any code with InterfaceCodeGenerator #218

jonathanjsimon opened this issue Jun 11, 2023 · 2 comments

Comments

@jonathanjsimon
Copy link

I followed the instructions found on https://hypfvieh.github.io/dbus-java/code-generation.html and continue to get this output when trying to generate code for NetworkManager (or any other dbus path including org.bluez from the examples) instead of any generated code.

I tried with the current master.zip as instructed as well as that for the 4.3.0 tag, just in case there was a bug in the unreleased master code.

Am I doing something wrong?

JRE: OpenJDK 20.0.1 as provided by Arch java-20-openjdk
Maven: 3.8.7
Working directory: /home/jsimon/Development/dbus-java/dbus-java-dbus-java-parent-4.3.0/dbus-java-utils

mvn -e exec:java -Dexec.mainClass="org.freedesktop.dbus.utils.generator.InterfaceCodeGenerator" -Dexec.executable="java" -Dexec.args="%classpath --system --outputDir classes org.freedesktop.NetworkManager /org/freedesktop/NetworkManager"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------< com.github.hypfvieh:dbus-java-utils >-----------------
[INFO] Building dbus-java-utils 4.3.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- exec-maven-plugin:3.1.0:java (default-cli) @ dbus-java-utils ---
Syntax: <options> [busname object] [object path]
        Options: 
        --system           | -y           Use SYSTEM DBus
        --session          | -s           Use SESSION DBus
        --outputDir <Dir>  | -o <Dir>     Use <Dir> as output directory for all generated files
        --inputFile <File> | -i <File>    Use <File> as XML introspection input file instead of querying DBus

        --enable-dtd-validation          Enable DTD validation of introspection XML
        --version                        Show version information
        --help                           Show this help

If --inputFile is given busname object argument can be skipped (or * can be used), that will force the util to extract all interfaces found in the given file.
If busname (not empty, blank and not '*') is given, then only interfaces starting with the given busname will be extracted.
@hypfvieh
Copy link
Owner

It will work if you remove the '%classpath' argument from -Dexec.args= parameter.
I will update the documentation to address this.

hypfvieh added a commit that referenced this issue Jun 12, 2023
@jonathanjsimon
Copy link
Author

I can confirm. Removing %classpath allows the program to execute. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants