Extensible Applications using META-INF/services
Answered
Hello,
I need to add support to Extensible Applications in my java application. They way to do it is by creating META-INF/services in the src directory. Inside that directory I need to add a file with name containing the classes and package name.
How can I do it using Intellij? Do I need to manually creating this and than adding it to Intellij, if so, how do I add it to the project to be included? Is it done using intellij?
Thanks,
Please sign in to leave a comment.
I recommend creating the resources directory (next to your src directory) with META-INF/services. All the files from the directory that is configured as the resource root will be available in the application classpath. See https://www.jetbrains.com/help/idea/configuring-content-roots.html .
Do I create the resources directory from Intellij or from the Windows Explorer?
Either way will work, why not create it with IntelliJ IDEA?
I am trying to Add content root after creating the META-INF/services but getting error.
I've attached screenshot including the project structure.
You don't need to add the new content root, just mark the resources directory as the Resources.
Working!!!.
Thanks,