thorntail uberjar : reference an external module - wildfly-swarm

i am quite struggeling on an implementation :
i am trying to make a generic uberjar, totally agnostic of the target environment.
In the meantime, i am referencing in my jboss-deployment.xml a module named configuration.
i would like that my uberjar generates a reference to this external module which is outside the jar, let's say /home/user/modules/configuration
I tried to use the additionalModules property of the thorntail plugin to reference this module, but nothing is working.
How do you do this guys ?
having a generic uberjar
having a module externalized to the uberjar which contains the environment needs
Regards,
Guillaume

Related

ABP Framework, ConfigureByConvention not defined

I'm following this tutorial https://docs.abp.io/en/abp/latest/Tutorials/Part-1?UI=NG&DB=EF#map-the-book-entity-to-a-database-table
In that step it instructs me to add b.ConfigureByConvention to the configuration in DbContext but dotnet tells me it is not defined.
I have abp version 5.3.4 and checked that the tutorial is for the correct version.
I generated the project with the abp CLI so the packages should not be a problem.
Is there some step that I overlooked?
The complete error is:
'EntityTypeBuilder' does not contain a definition for
'ConfigureByConvention' and no accessible extension method
'ConfigureByConvention' accepting a first argument of type
'EntityTypeBuilder' could be found (are you missing a using
directive or an assembly reference?)
The ConfigureByConvention method is an extension method, so your IDE probably could not find the related namespace and not suggested to you.
If you add using Volo.Abp.EntityFrameworkCore.Modeling; as namespace then it should work as expected.

object johnsnowlabs is not a member of package com

I am very new to Zeppelin/spark and couldn't get an accurate description of steps to configure new dependencies like that of NLP libraries.
Found similar issue here.
I was trying to use Johnsnowlabs NLP library in Zeppelin notebook (spark version2.2.1).
Setup included :
In Zeppelin's Interpreters configurations for Spark, include the following artifact:
com.johnsnowlabs.nlp:spark-nlp_2.11:2.5.4
Then, in conf/zeppelin-env.sh, setup SPARK_SUBMIT_OPTIONS.
export SPARK_SUBMIT_OPTIONS=” — packages JohnSnowLabs:spark-nlp:2.2.2". Then restarted Zeppelin.
But the below program gives the error :
%spark
import com.johnsnowlabs.nlp.base._
import com.johnsnowlabs.nlp.annotator._
<console>:26: error: object johnsnowlabs is not a member of package com
import com.johnsnowlabs.nlp.base._
^
<console>:27: error: object johnsnowlabs is not a member of package com
import com.johnsnowlabs.nlp.annotator._
Can someone please share how this can be done? I referred this link .
TIA
you don't need to edit the conf/zeppelin-env.sh (anyway you're using it incorrectly, as you're specifying completely different version), you can make all changes via Zeppelin UI. Go to the Spark interpreter configuration, and put com.johnsnowlabs.nlp:spark-nlp_2.11:2.5.4 into spark.jars.packages configuration property (or add it if it doesn't exist), and into the Dependencies at the end of configuration (for some reason, it isn't automatically pulled into driver classpath).

Gradle C plugin: how to solve references between multiple modules

I have a c language program that has the following structure:
src/main/c/main.c
src/main/headers/main.h
src/module_1/c/module_1.h
src/module_1/headers/module_1.h
...
src/modulen/c/module_n.c
src/module/headers/module_n.h
In the gradle script I have defined:
components {
module_1(NativeLibrarySpec)
...
module_n(NativeLibrarySpec)
main(NativeExecutableSpec){
sources{
c.lib library: "module_1", linkage: "static"
...
c.lib library: "module_n", linkage: "static"
}
The reason of using this structure is to facilitate creating unit tests for each module separately.
The problem comes with the inclusion of the .h files from the modules in the main or in other modules (there are some dependencies between them). I haven't found a way to make the headers of a module available to other modules. I would actually like to make them all "global" to the project (that is, automatically added to the source set for any module).
Thanks in advance
I do not know gradle but may give you some general advise.
I haven't found a way to make the headers of a module available to other modules.
You could make a central directory (repository) for all .h files of your project, for example src/include. The header files of each module can be placed there (in the version of the curent baseline).
I would actually like to make them all "global" to the project (that is, automatically added to the source set for any module).
The above repository can support that. However, including a header in a source file is a manual task. It is also wise not to include all headers into a source file; it may only need a few.

Sencha Cmd v3 build error when implementing Bryntum Scheduler

Using Cmd 3.0.0.141, I have successfully generated a workspace and an Ext app in that workspace. The application builds correctly until I attempt to integrate the Bryntum Scheduler, where I encounter an error when I try to build:
"Failed to resolve dependency Sch.panel.SchedulerTree for file ExtCalendar.view.Tree"
the app is very simple at this point, uses Ext.application and follows the MVC pattern where I have a view defined "ExtCalendar.view.Tree" that extends 'Sch.panel.SchedulerTree". I also have models and stores that extend Bryntum classes as well, so I assume the compiler will trip over those as well, since it can't see the Sch namespace.
I've added a 'js' path to my app.json that points to the bryntum js file where 'Sch.panel.SchedulerTree' comes from. I've tried to run the 'refresh' command with the same results (Failed to resolve...). I've regenerated the bootstrap.js file manually using 'compile', but nothing from the Sch namespace ever gets added to it, despite the Brytum lib file being in the classpath.
What do I need to do in order to successfully run the 'build' command with libs like this?
Or, do I need to take a more granular approach using the 'compile' command?
With the help of the nice folks on the Sencha forums, I was able to resolve my build issues. The solution, for me, involved a shim. I added an external shim.js file to my index with as many //#require and //#define directives as needed in order to resolve the dependency issues.
According to the nice folks at Bryntum, once I upgrade from the free-trial version of the Bryntum Scheduler, I will be able to get rid of the shim and simply rely on the sencha.cfg classpath pointing at the Bryntum src.
Also, as an aside, the app.json file is not used in ExtJS apps, its inclusion in the generated files was a bug in build 141 of Cmd v3.
See this thread for more detail.

Building Maven Plugin - API to resolve maven properties

I am creating a plugin that reads information from the pom and I'm encountering some properties such as ${basedir} etc when it comes to the elements that specifies directories. I was wondering if Maven have a API that I can use where I can just pass on that properties and they can resolve it for me.
preferably not having to run another plugin first. Its possible to do the crude way but was just wondering if there's anything "fancier" that i could use.
thanks!
Declare a property which maven will inject the MavenProject model into:
/** #parameter default-value="${project}" */
private org.apache.maven.project.MavenProject mavenProject;
Then you can access properties via getProperties() as described here:
http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook#MojoDeveloperCookbook-StoringProperties
You'll also need to declare a dependency on org.apache.maven:maven-project:${version of maven} in your mojo's POM.
I hope that was what you were asking about...
-tim

Resources