question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Drop in .jar based extensions into deployment folder

See original GitHub issue

I see that extensions (Such as PlantUmlService.java) seem to be registered via “ApplicationController.java”. i.e. extensions need to be registered at compile-time (as I understand it).

I wonder if it might be possible to place a jarfile in an extensions folder (such as “program files/asciidocfx/extensions” folder), and have the extension auto-register (using either Service Registry or OSGi) without having to compile the extension monolithically into AsciidocFX.

Then custom plugins could be used within that local AsciiDocFx installation.

The custom extension should implement an interface such as, let’s say:

public interface AsciidocFXExtension {
   public String getActivationString();
   public void init(String[] keyValues);
   public String render(String content);
   public void end();
}

The jarfiles would be self contained and contain all their own dependencies so they can’t pollute the classpath of other extensions. They would also be contained in folders each for all their supporting jars.

For example:

extensions/myextension
   myextension.jar   (contains service registry metadata)
   some_yaml_library.jar (added to classpath for this extension run without need for explicit import)

(The above interface assumes that extensions run synchronously which may not be a safe assumption)

Now, with getActivationString() returning “myextension”, I can use the following text in my document:

[myextension,key1="value1",key2="value2"]
--
sometext-used-by-my-extension
--

(all without having to recompile the base app).

The interface would be packaged up in a single jar, and then anyone could write a hot deployable plugin.

The reason for this is to be able to add potentially custom bespoke plugins to an individual AsciidocFX installation without having to fork AsciidocFX or to contribute to monolith bloat.

Might this be possible in a future release?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rahmanustacommented, Apr 4, 2017

Hi @ainsley, thanks for the explanation. AsciidocFX should be modular and easy extendable. I want to develop this like feature in the future.

Thanks

0reactions
rahmanustacommented, Sep 19, 2018

No, there is nothing to sign. You can freely contribute. https://github.com/asciidocfx/AsciidocFX/blob/master/LICENSE

Read more comments on GitHub >

github_iconTop Results From Across the Web

WAR Files and Deployment - Learning Java, 4th Edition [Book]
The WAR file is simply a JAR file (which is itself a fancy ZIP file) with specified directories for the Java code and...
Read more >
Building my first extension - Quarkus
The role of the extensions is to leverage Quarkus paradigms to integrate seamlessly a library into Quarkus architecture - e.g. do more things...
Read more >
Deploying JavaFX Applications: Packaging Basics
Packages code and resources needed for the JavaFX application into a JAR file and embeds the utility classes to support autodetection of JavaFX...
Read more >
Release artifacts and artifact sources - Azure Pipelines
You can configure a release to be created automatically, or the deployment of a release to a stage to be triggered automatically, when...
Read more >
Configuring Your Project for Deployment - Sonatype Help
The preferred way to do this is to take advantage of the features provided by the Nexus Staging Maven plugin or the Nexus...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found