-
Notifications
You must be signed in to change notification settings - Fork 231
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
Bundlized version of ST4 and ANTLR #88
Comments
We aren't familiar with, and do not use this type of library. If you could explain what's involved in detail, or provide a pull request, it would be much easier to evaluate this. |
I want to use StringTemplate and ANTLR libraries in my application based on OSGI. I have two ways to to do that:
OSGI bundle is just a JAR file with special Manifest Headers. Without these headers OSGI environment (such as Apache Felix) couldn't install and load these libraries. The easiest way to do that is to add <build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>org.antlr.stringTemplate</Bundle-SymbolicName>
<Export-Package>org.stringtemplate.*</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build> As you can see, it is quite simple. |
Has there been any recent consideration of this? The change should have no impact unless an OSGi application kernel is being utilized. If you want I'll make the changes and send in a pull request. |
How about including the main antlr tool, which includes st 4? |
Are you suggesting adding OSGi metadata for the monolithic antlr artifact vice adding it to the ST4 artifact, or saying that this has been done already and I should be installing the main antlr tool? If the former then yes; that would be a good idea and I would be happy to contribute. |
latest antlr jars are osgi compatible
|
Looking through the public antlr 4.5 artifacts: The one maven artifact that has OSGi headers is org.antlr/antlr4-runtime/4.5 (antlr4-runtime-4.5jar), but it doesn't contain the ST4 classes. The ST4 classes are in the artifact org.antlr/antlr4/4.5 but the osgi headers are not present in the jar's manifest. Are these changes that are still not released (4.5.1)? |
Looking for antlr 4.5.x complete jar with StringTemplate-4 api exported and usable in eclipse plug-in development environment. In result, we have very hard time using ST4 and ANTLR4 in eclipse plug-in development env. |
You can solve this problem in this way:
Now you can use your |
We've now moved all the way in this direction for the ANTLR 4 runtime. However, that library proved easier than ST4, especially now that we've eliminated its last external dependency. I'll look at implementing this for ST4 as well, but there's an interesting dependency chain here: ST4 → ANTLR 3 → ST3 → ANTLR 2 The real reason this is so interesting is twofold:
|
I would like to play with this, but when I run mvn clean verify, the resulting jar does not contain the 'st4hidden' package that is in the jar I can download from the st website. What am I missing? |
@felixdo Does the resulting jar not operate as you would expect? |
No. I would like to produce a standalone OSGI bundle with no external dependencies for st4, which afaiu is the goal of this issue, and which does not exist atm. I would therefore need to include the antlr runtime just as it is included in ST-4.0.8.jar that I get from the st4 website. mvn clean verify does however not create that mysterious st4hidden package which contains the required antlr runtime. |
oh, well i guess we need to use the mvn shade thing to build a combined lib. |
yes that's what I meant. I thought the pom here already included that part. |
Maybe not even needed to include antlr, since that is already available in eclipse orbit https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4865, so if we produce a bundle with a dependency on that, it should work. or not, if i still don't understand the dependency chain here... :) |
Could you please add maven-bundle-plugin into StringTemplate/ANTLR pom.xml and OSGify these libraries?
The text was updated successfully, but these errors were encountered: