Unable to run Jbilling plugin as a jar - jbilling

I have create Payment plugin in Jbilling. If I use it in Jbilling source itself, it is working fine.
But if I create jar of plugin and put that jar into lib folder and made it's entry in BuildConfig.groovy as runtime 'jar name'.
when I compile source, it download the jar in grails folder, but when i am trying to add it in configuration/plugin, it is giving exception "ClassNotFound Exception".
How can i add plugin as a jar?

Whatever you want to be included as a source to jBilling, simply copy the source or lib files into the lib directory. The lib directory in jB acts similar to the ext directory in java.

Finally found solution. I modified run-app.bat, in that replace run-app to run-war and because of this all jars which are in lib folder, they automatically copied in war file and during runtime while I am trying to add as a plugin these jars also available and doesn't getting ClassNotFound Exception.

Related

Include the bytecode of a JAR file in a gradle library vs. just adding it as a dependency

If I add a JAR file to a gradle project's depenencies, the code compiles just fine, but after publishing to maven (publishToMavenLocal), the classes from the JAR are not found.
Obviously, this is because the jar is added as a "dependency" and not part of the project itself. Is there a way to get the contents of the JAR file to merge into the library? Do I need to make a separate maven repo for each JAR?
You can always try to create a fat jar which includes dependencies. You can follow the instructions provided here https://www.baeldung.com/gradle-fat-jar

How can i package an eclipse-plugin with maven as a folder?

When i export my eclipse rcp product with eclipse, then it creates my plugin as a folder and everthing works fine. but when i build my product with maven, i can't access images and audio files who are saved in the plugin jar file.
Is it's possible to package a eclipse-plugin as a folder?
Specify:
Eclipse-BundleShape: dir
in the MANIFEST.MF file for the plug-in to say you want a directory (folder) rather than a jar.
Note: If you use a Feature based build the unpack option in the feature.xml will override this.
See also the Eclipse help
Eclipse does also provide APIs to allow you to access files in the plug-in jar (mainly FileLocator).

How to add a xml a file as dependency using gradle?

I have a project build on gradle and it has a directory src/main/dist/deploy. In deploy folder there is a xml file. This xml file i want to add as a dependency in the jar file which my build.gradle is generating. This jar i am adding in the lib folder of another project that has a dependency on my gradle project. The other project is built using ant. When classes bundled in gradle jar are loaded from ant project they are unable to read that xml file from the gradle jar.
The standard java plugin does not look in src/main/dist/deploy for resources.
You should either move the xml file into java plugin's standard resource folder src/main/resources, or add the dist/deploy folder to your main sourceSet's resource list.

How to add a plugin as a jar to a grails project

I created a custom plugin 'myPlugin' for GRAILS. I compiled and installed it as a binary (my-plugin-0.1.jar) file.
The jar file can't be found by grails in a "normal" project, because it only looks for my-plugin-0.1.zip (the plugin is defined within the plugins-block in BuildConfig.groovy)
How can i add the .jar file as a plugin?
Binary plugins packaged as jar has to be referred in the dependencies section instead of the plugins section in BuildConfig
dependencies {
compile "mygroup:myplugin:0.1"
}
or you can put the jar in application's lib directory which I would discourage. :)
Add it in the dependencies block (not plugins) in BuildConfig.groovy.
Publish plugin installs the jar into local maven cache (/.m2). Verify the existence of the jar in .m2.
Also verify if the application using the plugin has mavenLocal enabled in repositories' buildConfig.

add 'a jar file and its dependencies' to final .Zip via Maven Assembly Plugin

I want to make a .Zip file by Maven Assembly Plugin and put these files into it:
executable jar
related classes in lib folder
a script to run that jar
a folder that contains some other dependencies (like lib folder) and other classes(jars) that are needed because of these dependencies!
and my question is about number 4: is there any way to put these dependencies automatically?
thanks ..
The maven assembly website has the folowing examples which I think, answer most of your questions : http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/index.html

Resources