for the command
./mvnw quarkus:add-extension -Dextensions=“name”
is it possible to add custom extensions? I tired create my own, but when I executed the above command, it always failed,
is it the fact that I can only add the extensions from the results
./mvnw quarkus:list-extensions
Unless the extension is present in the Quarkus extension registry, that command will work only if you provide the complete GAV in place of "name" in the format groupId:artifactId:version
Otherwise, the tools won't be able to resolve the extension, i.e. to translate the "name" to the actual GAV that should be added to your project as a dependency.
Luckily, the Quarkus team is developing a mechanism to be able to register Quarkus extensions such as yours and make them discoverable by the Quarkus tools. You can read more about it here https://github.com/quarkiverse/quarkiverse/wiki
If your extension is not in the catalog/platform you need to use the full maven coordinate of your extension.
Related
Since version 2.2.0 Tycho has introduced a new feature to allow using maven artifacts in PDE target platforms, and here's the how-to. Following its instructions I have included an artifact of Saxon-HE into my target platform. I can see the wrapped OSGi bundle of Saxon after ticking the Show Location Content option in the Target Definition Editor. Also I ran mvn clean verify command to make sure that the artifact is downloaded into my computer. However,
as I began to try to import the package into my Eclipse plugin code, I found no suggestions from this package.
When I tried to include the package as a feature in the Product Editor, I couldn't find any option.
In addition, when attempting to include it as required plugin / imported packages in the Plugin Editor, there was no option, too.
What's more, the product produced by mvn clean verify did not contain such plugin as Saxon-HE after checking my whole RCP project.
All the efforts in vain above made me wonder how I can use a maven artifact in my plugin development. I desperately need the functionalities Saxon-HE provides with to enhance my plugin. Anyone experienced sharing your expertise?
-- 2021.08.13 update --
Manually I included this plugin in the plugin list of my RCP project via source file editing. Its jar file appeared in the plugin folder of the product. But anyway I was not able to validate the availability of the library in the dependency tab of the plugin manifest editor as shown in Vogella's tutorial. Restarting the IDE did not help, either. This might mean that I have to manually code the source code without the content assistance.
I am using a dependency and I have some issues with it.
I could download the sources and include it as part of my project and then start modifying the source to help me debug my issue.
However, is there an easier way to do this, using maven ? I have the source-jars downloaded but I am not sure if I can then use these source jars and modify the code as well ?
I could in theory unbar the sources and add them to my source build path, but is there an easier way to accomplish this ?
I am using maven and IntelliJ.
Are you able to get a successful build of the dependency you're having issues with (in it's own project?).
If so, change the version, e.g. 1.2.3-CUSTOM-1, make the improvements, rebuild, and use it as a proper maven depdendency with <version>1.2.3-CUSTOM-1</version>.
This might seem a lot of work, but it's not really - you end up with a properly versioned jar.... having a "hacked" version of 1.2.3 jar is asking for all sorts of problems later.
On the plus side, you can share and deploy the -CUSTOM-1 jar if you need to, and you can keep versioning -CUSTOM-2, etc.
This is the "proper way" I would say.
As Thorbjørn Ravn Andersen wrote, source jars are read-only. You can setup debugger breakpoints in them, but you can't "write" in them
Either unjar the sourced jar or if you know it came from a git release tag, clone the original repository and checkout the correct tag
Make sure its sources compile
Bump up the version in case you know you are going to hack the source
On the right pane, use Maven projects / Plus icon to add sources and use the "m" Execute goal icon to build the sources in IDEA :
I have set up a Maven project that starts up a standalone Wildfly container using Cargo, but in the process of adding some new features, I need to add some content to the standalone.xml. (Specifically, a security realm.) This seems like it should be a fairly common task, but I can't find a way to do it.
I tried to use the xml-replacement feature built in to cargo, but it doesn't seem to be capable of adding content, only modifying existing content. My second attempt was to use the maven-replacer-plugin, which feels like a hack, but would have done the job. The problem I have with it is that I can't find a way to execute the replacer plugin between when cargo installs the container, and when cargo starts the container.
Thanks in Advance
I'd recommend switching from Cargo to the wildfly-maven-plugin, which is container-specific but more straightforward to use.
You can run any CLI command via the plugin to edit your standalone.xml.
See this example from one of my projects.
Of course you can override the container's configuration, see here and there how you can do that.
In your case if you wanted to put a custom standalone.xml, you simply have to embed the entire file in your project and put it in the configFiles for cargo to deploy it with your container.
I'm using Fiji for the first time, I need to open an image as a FloatType so I followed the example found here http://fiji.sc/wiki/index.php/ImgLib2_Examples#Example_1b_-_Opening_an_ImgLib2_image but I get this error:
WARN: Ignoring non-Maven build directory: /home/utente/workspace/my_project/bin
Exception in thread "main" java.lang.IllegalArgumentException: No compatible service: io.scif.SCIFIOService
at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:222)
at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:176)
at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:153)
at org.scijava.Context.<init>(Context.java:200)
at org.scijava.Context.<init>(Context.java:127)
at org.scijava.Context.<init>(Context.java:116)
at io.scif.img.AbstractImgIOComponent.<init>(AbstractImgIOComponent.java:65)
at io.scif.img.ImgOpener.<init>(ImgOpener.java:99)
at SGP_db.StartingJFrame.getGn(StartingJFrame.java:216)
at Plugin.SGP_deblurring_boundary.main(SGP_deblurring_boundary.java:58)
Can't undertand why I get this error, any ideas?
Thanks,
sara
It is almost certainly a build path issue in Eclipse. Are you using the M2E plugin to manage your projects?
If you are not, or aren't sure, please follow the directions on the Fiji web site at:
http://fiji.sc/Developing_ImgLib2#Developing_ImgLib2_with_Eclipse
I would strongly suggest not to manually juggle JAR files in non-Maven Eclipse projects. The Eclipse Maven integration will make your life much easier. For more details, see:
http://fiji.sc/Maven
I've solved importing the ImgOpener class from imglib2.io
Please note that imglib2-io no longer exists; the up-to-date way to access the ImgOpener is to use the io.scif:scifio library instead. If you are basing your work off of the ImgLib2 Examples, please note that you can grab the source from GitHub, which includes a Maven POM with the correct dependencies specified. Start from there, or from the minimal-ij1-plugin project if you need to use ImageJ 1.x routines as well.
I am relatively new to Grails and currently I busy myself with the Spring-Security UI plugin. After reading the documentation I want to make some adjustments at the property file grails-app/i18n/messages.spring-security-ui.properties, but I can't find the properties file. Neither in the project-directory, either in the plugins directory.
I have even tried to search it with the unix-command find in my project. (find . -name 'messages.spring-security-ui.properties')
Do I have to use the s2ui-override command to generate the spring-security-ui directory and its properties files?
I have installed the ui-plugin by modifying the BuildConfig.groovy (compile ":spring-security-ui:0.2") and using the command grails compile.
Thank you in advance.
Best
The plugins are installed on your local user folder, example:
~/.grails/2.0.4/projects/grailsdevs/plugins/
where:
grailsdevs = project name
By the way, you can override the messages properties in your project ones.
check the messages you can use:
http://grails-plugins.github.com/grails-spring-security-core/docs/manual/guide/25%20Internationalization.html
You don't have to override the plugin because the plugin is installed locally, if you run the app in another computer the plugin will be installed from the repository. So the best way you can do this is add the messages in your i18n resource bundle.
Go to your project... under folder: grails-app/i18n/
Hope this help you
Don't edit plugin files.
If you want a different I18N message for a key, add that line to your application's messages.properties (and the other locale files if you support multiple languages). The application's files take precedence over plugin files
Just use the same key and whatever message you want to display.