Exclude file from resource in Gradle
If you want to exclude one file from resource, you may use this snippet:
sourceSets {
main {
resources {
exclude '**/*.bak'
}
}
}
Related cards:
Add new resource folder in Gradle
If you want to add new resource folder to Gradle build, use this snippet:
sourceSets {
main {
resources {
srcDir 'src/main/java'
}
}
}
.java (.groovy and *scala) file will be skipped on build from resources.
Gradle and dbmaintain
Introduction
dbmaintain is plugin (best for my opinion) that allowes to safely migrate dbscheme. It has excellent support for Maven and Ant but not for Gradle. But Gradle has excellent support for Ant, so we can call dbmaintain ant ...
Fixing archlinux pacman integerity errors
If you look something like :
error: freeplane: signature from "Leonidas Spyropoulos <artafinde@archlinux.org>" is marginal trust
:: File /var/cache/pacman/pkg/freeplane-1.9.12-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP s...
Gradle WAR building
To build WAR by Gradle system change java plugin to war plugin:
apply plugin: 'war'
After that execute gradle:
gradle build
WAR will be in folder builds/libs/
First or last symbols in string
Last 12 symbols from UUID:
uuidgen | tail -c 12
First 8 symbols from UUID:
uuidgen | head -c 8
Add user's rights in ACL
Add full permissions for a folder:
setfacl -Rm u:ubuntu:rwx /opt/folder
Full permissions for folder and new entities in folder:
setfacl -Rm d:u:ubuntu:rwx /opt/folder
Gradle. Attach task to build lifecycle
It's easy. Just add to somewhere after your task definition:
processTestResources.dependsOn recreateDatabase
- processTestResource - default task (phase of build lifecycle)
- recreateDatabase - your custom task, that will be called befor...
Change JAVA_HOME in powershell
$env:JAVA_HOME = 'C:\apps\liberica-jdk-11\'
Spaces between =
is very importments.
Linux rescue
In grub menu select autoline and press e
. Find the line which is started with linux
and append
init=/bin/sh
to the end of this. After you will boot it (Ctrl-x), you will get a root shell immediately. But the filesystme will...