how can I modify Implementation-Version in manifest file? - spring

my project uses spring core-Implementation-Version: 5.0.10.RELEASE in all packages
I want to change it to 5.3.24 in all packages.
I searched "5.0.10.RELEASE" in project and it is written only in manifest file.
So I thought I need to change the Implementation-Version in MANIFEST.MF in spring-core-5.0.10.RELEASE.jar
How can I do that?

Related

vscode-java: picj pom-k3d.xml instead of pom.xml

Currently, I've two "pom.xml" files into my project:
pom-k3d.xml
pom.xml
pom-k3d.xml contains some additional plugins and dependencies.
vscode is getting by default pom.xml.
Is there any way to set vscode pick pom-k3d.xml file instead?
Is there any way to split a "pom.xml file into two modular ones?
Any ideas?

Add a file to a specific folder with gradle build

I am currently working with a project (using gradle) that needs a properties file in the same package to the class that consumes it (I can't change this config). I have added the file in my package, but when I execute the gradle build command omits the file, and only adds the .class file. The app is deployed as a war file.
I have tried editing the war task, but I can't find the way to make the properties file to be added:
war {
from('src/main/com/foo/bar') {
include 'b.properties'
into 'WEB-INF/classes/com/foo/bar'
}
}
The war task does execute (I have added a prinln and it executes). Also, I have tried changing the paths, but no results. Also replacing from('path') to from (file('path')), but still doesn't seem to add the file anywhere.
How should I achieve this? Thanks!
Is there anything stopping you from following Gradle's convention for resources?
Eg put your property file at src/main/resources/com/foo/bar/b.properties
If you do this you won't need any task customisations

projects_default.yml file in thorntail

Thorntail generator does not generate any project_defaults.yml file in project structure. No resources folder also seen.Should we manually place this file to configure project properties?
Note : I am new to thorntail.
Yes, you need to create a file project-defaults.yml inside src/main/resources.

Setting dependency of a component to mantle-usl - custom Groovy class

I have a custom groovy class inside mantle-usl component. I would like to use the class in other component. Hence, I need to add a dependency so that the new component (or project) has the jar of mantle-usl ready for use.
Is there anyone who can help with this? I attempted to modify the build.gradle file of the project. And add a project dependency, but it returned an error.
project(':runtime/component/warehouse-items-masterenumerator') {
dependencies {
compile project(':runtime/component/mantle-usl')
}
}
As you would expect, this does not work. It seems that I do not have the project references set correctly.
The mantle-usl component doesn't have any compiled code in it so the build.gradle file does not build a jar file, it is only used for running the Spock tests.
I wouldn't recommend adding your own code to mantle-usl, it is easier and cleaner to put it in a separate component. For an example of a build.gradle file that does build a jar file look at the moqui/example component or most of the moqui tool components (such as moqui-elasticsearch).
You also don't need to modify the main build.gradle file from the moqui-framework repository, dependencies should be declared in the build.gradle file in each component (which are picked up automatically in the main build).

How can I make gradle include *.ftl files in war file

I have the following structure:
src/main/java/com/company/SomeJavaFile.java
src/main/java/com/company/template_file.ftl
When I create a build using gradle, the *.ftl files dont get included in the war file.
How can I make gradle include them in the war file?
Another solution would be to put your *.ftl files into src/main/resources directory instead.
Ok, found it. You simply add the following line to your build file:
gradle.build file (add the following line):
sourceSets.main.resources.srcDir 'src/main/java'
Got the answer from the following discussion thread:
http://gradle.1045684.n5.nabble.com/Copy-non-java-files-into-the-target-directory-td1432058.html
Why not put them in src/main/webapp where, if you used them, *.jsp files would go?

Resources