Where do i add custom JAR files to Grails 3 - grails-3.1

I want to add my jars to the project and use them.
What path relative to project should i put them?
How do i configure it so they are included in classpath?

Related

Adding folder to custom DNN extension

I am creating a custom extension for DNN using Christoc's DotNetNuke Module and Theme Development Template
I add folders to my extension project and i do a release build, once i install the extension on my site the folders are not there. These folders are part of the extension project. Do i need to add them as resource to the extension or something? because my JavaScript folder and CSS folder are there once installed and i created these folders manaully my self also
Thank You
You need to add the Folder, or the FILE TYPES in the folder to the BuildScripts within my project templates. Look at the ModulePackage.targets file.
Chris

File Path to jar inside another jar

For an Eclipse plugin, I need to refer to a jar file inside the plugin directory (to provide code to users). This works perfectly when running the plugin while developing (inside a runtime-eclipse-application).
But when I build an update site, my plugin is built into a jar file. File paths for images are still working, but when the jar should be imported, eclipse shows the following error:
Description Resource Path Location Type
The container 'DoodleDebug' references non existing library 'file:\C:\Users\Me\.eclipse\org.eclipse.platform_3.7.0_740800064\plugins\ch.unibe.scg.doodledebug_1.0.0.201208281642.jar!\DoodleDebug-Client.jar'
The outer jar path is correct and when inspecting it with WinRAR, I can see the desired jar file inside it!
Why isn't this working as expected?
You will need to install your plugin in an exploded form. To do this, in your MANIFEST.MF file, add the following line:
Eclipse-BundleShape: dir
This will ensure that your plugin is installed as a directory, not a jar file. There is no way to reference nested jars, so they must be exploded.
See here for more information: http://eclipsesource.com/blogs/2009/01/20/tip-eclipse-bundleshape/

Maven Plugin Working Directory Not Constant

I wrote a Maven Plugin that creates some XML files on the classpath of my project. The Maven Project is fairly complex and has one master project with many sub projects (think services for a larger application).
The plugin takes a directory argument in the pom.xml, which is something relative to the classpath like this:
<docDestination>src/main/webapp/static/</docDestination>
However, when I try to access this folder via new File(docDestination), the resulting directory depends on the project (or sub-project) from which I ran the mvn install command that triggered the plugin.
The plugin is only specified in the pom.xml of one of the sub-projects, but if I run mvn-install from the parent it creates the XML files in the src/main/... folder of the parent application. How do I get the plugin to use the filesystem of the project in which it is declared rather than the filesystem of the parent project?
I should note that if I navigate to the sub-project in Terminal and run mvn install in that directory the files are created in the right place, which explains the title of my post.
Use the ${basedir} variable:
<docDestination>${basedir}/src/main/webapp/static</docDestination>
This should use the basedir currently used by the respective module (regardless of whether this is the top-level or a sub-module).

How do I add a new directory via DNN skin installation?

How do you add a new directory to DNN upon skin install? Is through the reference in the manifest?
Yes, you can create a new directory through a manifest file. This applies to modules, skins - anything that uses a manifest file.
You will need to use the fileComponent in the manifest file, and specifically, the basePath element in order to specify where in the website your files will be installed. You can also install in relative paths.
See more here : http://www.dotnetnuke.com/Resources/Wiki/Page/Manifest-File-Component.aspx

Dnn Module Packaging Question

I have folders inside a module which I developed and there are many files inside them.
How can I package the folders with files?
Should I archive the folders in a zip file? If so, how can I extract them again?
You have a few options.
Include a resources.zip file, that will be extracted for you upon installation, just be sure to include the resources.zip in your .dnn file list.
If you are using a DNN 5.x manifest, you could keep the folder structure within the module and just use the folder names items in the 5.x manifest.

Resources