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

Documentation about Integration is not up-to-date #1380

Closed
nandorholozsnyak opened this issue Jun 19, 2022 · 0 comments · Fixed by #1381
Closed

Documentation about Integration is not up-to-date #1380

nandorholozsnyak opened this issue Jun 19, 2022 · 0 comments · Fixed by #1381
Labels
bug Something isn't working

Comments

@nandorholozsnyak
Copy link
Contributor

nandorholozsnyak commented Jun 19, 2022

Describe the bug
The documentation for the Integration part is not up-to-date, if you create an integration point based on that docs, it will not work.

https://www.jbang.dev/documentation/guide/latest/integration.html

In the docs now:

/**
*
* @param param build dir directory which will be made into a jar when build is done
* @param pomFile location of pom.xml representing the projects dependencies
* @param dependencies list of GAV to Path of artifact/classpath dependencies
* @param nativeImage true if --native been requested
* @return Map<String, Object> map of returns; special keys are "native-image" which is a and "files" to
*          return native-image to be run and list of files to get written to the output directory.
*
*/
Map<String, Object> postBuild(Path builddir, Path pomFile, List<Map.Entry<String, Path>> dependencies,
            boolean nativeImage) {
}

But in reallity this should in the docs, I mean the parameter list:

public static Map<String, Object> postBuild(Path appClasses,
                                                Path pomFile,
                                                List<Map.Entry<String, String>> repositories,
                                                List<Map.Entry<String, Path>> dependencies,
                                                List<String> comments,
                                                boolean nativeImage) {
} 

And in JBang the following code snippet is happening:

Method method = clazz.getDeclaredMethod("postBuild", Path.class, Path.class, List.class, List.class,
				List.class, boolean.class);

Expected behavior
Change the documentation for the Integration

JBang version
❯ jbang --version
0.95.0

Additional context
@maxandersen I saw some tickets about the Integration API/SPI "refactor" or rework. Is it process somewhere? Any ideas for it?
Maybe a Maven dependency that would include an interface and a wrapper class that can include the already existing method parameters inside that and it would be much cleaner probably to implement an integration point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant