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

How to generate java class with function adapters by maven? #65

Closed
ValentinaBaranova opened this issue Sep 30, 2022 · 2 comments
Closed

Comments

@ValentinaBaranova
Copy link

Hello. I looked into javacpp-mvn-simple-demo, and it already contains native function in java for cpp function. But javacpp also provides ability to generate class with such function for class which implemets InfoMapper.
I have to run such commands manually now:

mvn clean compile && cd target/classes \
&& java -jar ../../javacpp.jar test.GreeterConfig \
&& cp test/Greeter.java ../../src/main/java/test;

And only after it I can package project with javacpp plugin. Is there a way to not run such commands manually and do it by maven?

@saudet
Copy link
Member

saudet commented Sep 30, 2022

The starting point for that is the JavaCPP Presets and there's a guide here:
https://github.com/bytedeco/javacpp-presets/wiki/Create-New-Presets
Instead of inheriting from the parent pom.xml though, you can safely copy anything from it.

@ValentinaBaranova
Copy link
Author

Thanks a lot, I will try.

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