Spring-Google OAuth2 for stand alone applications - spring

I have a JavaFX client application, where it can log in to the service using Google OpenID.
Client user clicks on Google Sign In
Following URL will be opened in the default browser
https://accounts.google.com/o/oauth2/v2/auth?
response_type=code&
client_id=
scope=email&
redirect_uri=localhost:8080/login/oauth2
state=qwerrffadfadf
User logs in to Google & Authorize
Page will be auto redirected to localhost:8080/login/oauth2 with auth code
Server exchange auth code to access token
Server validate and get user's email address
Now, when JavaFX client sends a request, the server should allow any resources to the authenticated user. But, as you can see, there is no way to connect Google users to the JavaFX client session. I have seen applications are using similar methods to allow social login (Postman, Nvidia Experience).
How should I handle this?
+------------------------+
+---------+ Authorization Code +------------+
| | To | |
| + ----+ Access token exchange +--------+ |
| | +------------------------+ | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| v | |
+---+---+----+ +--------+---v------+
| | Authorization | |
| MyServer +<-------+Code-+ | Google Resource |
| | | | Server |
+------------+ | | |
| +----+---------+----+
| | ^
+-------------------------------------+ | | |
| | | | |
| | | | |
| +-----------------+ | | | |
| | | | | | |
| | JavaFX Client | | | | |
| | | | | Authorization |
| +-------+---------+ | | Code | Authorization
| | | | | | Request
| + | | | |
| Clicked on Google Sign in | | | |
| | | | | |
| v | | | |
| +------+-------+ | | | |
| | +--------------+ | |
| | | | | |
| | Client Web +<-----------------------------+ |
| | Browser | | |
| | +----------------------------------------+
| +--------------+ |
| |
| |
| Client's Computer |
| |
+-------------------------------------+

Related

Submitting a form leads to log out

Information:
Language: PHP
Framework: Laravel 9
Database: Firebase, firestore
I'm trying to input data from a form in a blade to firestore database. However, it doesn't add in the database. Also after clicking the submit button, it just redirect me to the login page. Basically, it log outs me without even having successfully adding the data input.
What I have tried so far:
as per #Aless55, there might be an error. I checked, there's none.
InventoryController:
public function store(Request $request){
$data = [
'SKU' => $request->invSKU,
'Product Name' => $request->invName,
'Stock' => $request->invStock,
'Date added' => Carbon\Carbon::now(),
'Last Update' => Carbon\Carbon::now(),
'Item sold' => '0',
'Status' => 'active'
];
$postData = $this->app('firebase.firestore')
->database()
->collection('Inventory')
->newDocument()
->set($data);
if($postData){
return redirect('admin.inventory');
} else{
return redirect('admin.inventory-add');
}
}
web.php:
//For Inventory
Route::controller(App\Http\Controllers\InventoryController::class)->group(function(){
Route::get('inventory/add', 'invAdd')->middleware('user','fireauth');
Route::post('inventory/add/product', 'store')->name('add.product');
Route::get('inventory/archive', 'invArchive')->middleware('user','fireauth');
});
form part of inventory-add blade:
<form style="padding-left: 0px;margin-left: -9px;" method="POST" action="{{Route('add.product')}}">
#csrf
<div style="display: flex;">
<div style="padding-right: 0px;margin-right: 29px;">
<h6>Name</h6><input class="form-control" type="text" style="padding-bottom: 0px;" name="invName" autocomplete="off">
</div>
<div style="padding-right: 0px;margin-right: 29px;">
<h6>SKU</h6><input class="form-control" type="text" style="padding-bottom: 0px;" name="invSKU" autocomplete="off">
</div>
<div style="padding-right: 0px;margin-right: 29px;">
<h6>Starting Stock</h6><input class="form-control" type="number" name="invStock" autocomplete="off">
</div>
</div>
<div style="display: flex;margin-top: 11px;">
</div><button class="btn btn-primary" type="submit" style="margin-top: 15px;text-align: right;margin-left: 397px;padding-right: 14px;background: #2f3192;">Submit</button>
</form>
middleware:
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Session;
class FirebaseAuth
{
/**
* Handle an incoming request.
*
* #param \Illuminate\Http\Request $request
* #param \Closure $next
* #return mixed
*/
public function handle(Request $request, Closure $next)
{
$uid = Session::get('uid');
if ($uid) {
return $next($request);
}
else {
Session::flush();
return redirect('/login');
}
}
}
Route list:
+--------+-----------+-----------------------------+------------------+-----------------------------------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+-----------+-----------------------------+------------------+-----------------------------------------------------------------------+------------+
| | GET|HEAD | / | | Closure | web |
| | GET|HEAD | api/user | | Closure | api |
| | | | | | auth:api |
| | GET|HEAD | carousel | | App\Http\Controllers\NavBar#carou | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | dashboard | | App\Http\Controllers\NavBar#dboard | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | email/verify | verify | App\Http\Controllers\Auth\ResetController#verify_email | web |
| | | | | | fireauth |
| | GET|HEAD | home | home | App\Http\Controllers\HomeController#index | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | home/profile | profile.index | App\Http\Controllers\Auth\ProfileController#index | web |
| | | | | | user |
| | | | | | auth |
| | POST | home/profile | profile.store | App\Http\Controllers\Auth\ProfileController#store | web |
| | | | | | user |
| | | | | | auth |
| | GET|HEAD | home/profile/create | profile.create | App\Http\Controllers\Auth\ProfileController#create | web |
| | | | | | user |
| | | | | | auth |
| | GET|HEAD | home/profile/{profile} | profile.show | App\Http\Controllers\Auth\ProfileController#show | web |
| | | | | | user |
| | | | | | auth |
| | PUT|PATCH | home/profile/{profile} | profile.update | App\Http\Controllers\Auth\ProfileController#update | web |
| | | | | | user |
| | | | | | auth |
| | DELETE | home/profile/{profile} | profile.destroy | App\Http\Controllers\Auth\ProfileController#destroy | web |
| | | | | | user |
| | | | | | auth |
| | GET|HEAD | home/profile/{profile}/edit | profile.edit | App\Http\Controllers\Auth\ProfileController#edit | web |
| | | | | | user |
| | | | | | auth |
| | GET|HEAD | img | img.index | App\Http\Controllers\ImageController#index | web |
| | POST | img | img.store | App\Http\Controllers\ImageController#store | web |
| | GET|HEAD | img/create | img.create | App\Http\Controllers\ImageController#create | web |
| | GET|HEAD | img/{img} | img.show | App\Http\Controllers\ImageController#show | web |
| | PUT|PATCH | img/{img} | img.update | App\Http\Controllers\ImageController#update | web |
| | DELETE | img/{img} | img.destroy | App\Http\Controllers\ImageController#destroy | web |
| | GET|HEAD | img/{img}/edit | img.edit | App\Http\Controllers\ImageController#edit | web |
| | GET|HEAD | inventory | | App\Http\Controllers\NavBar#inv | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | inventory/add | | App\Http\Controllers\InventoryController#invAdd | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | POST | inventory/add/product | add.product | App\Http\Controllers\InventoryController#store | web |
| | | | | | auth |
| | GET|HEAD | inventory/archive | | App\Http\Controllers\InventoryController#invArchive | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | login | login | App\Http\Controllers\Auth\LoginController#showLoginForm | web |
| | | | | | guest |
| | POST | login | | App\Http\Controllers\Auth\LoginController#login | web |
| | | | | | guest |
| | POST | login/{provider}/callback | | App\Http\Controllers\Auth\LoginController#handleCallback | web |
| | | | | | guest |
| | POST | logout | logout | App\Http\Controllers\Auth\LoginController#logout | web |
| | GET|HEAD | notification | | App\Http\Controllers\NavBar#notif | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | notification/deleted | | App\Http\Controllers\NotificationController#notifRecDel | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | POST | notification/push | push | App\Http\Controllers\NotificationController#store | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | order | | App\Http\Controllers\NavBar#order | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | password/confirm | password.confirm | App\Http\Controllers\Auth\ConfirmPasswordController#showConfirmForm | web |
| | | | | | auth |
| | POST | password/confirm | | App\Http\Controllers\Auth\ConfirmPasswordController#confirm | web |
| | | | | | auth |
| | POST | password/email | password.email | App\Http\Controllers\Auth\ForgotPasswordController#sendResetLinkEmail | web |
| | GET|HEAD | password/reset | reset.index | App\Http\Controllers\Auth\ResetController#index | web |
| | POST | password/reset | reset.store | App\Http\Controllers\Auth\ResetController#store | web |
| | GET|HEAD | password/reset/create | reset.create | App\Http\Controllers\Auth\ResetController#create | web |
| | GET|HEAD | password/reset/{reset} | reset.show | App\Http\Controllers\Auth\ResetController#show | web |
| | PUT|PATCH | password/reset/{reset} | reset.update | App\Http\Controllers\Auth\ResetController#update | web |
| | DELETE | password/reset/{reset} | reset.destroy | App\Http\Controllers\Auth\ResetController#destroy | web |
| | GET|HEAD | password/reset/{reset}/edit | reset.edit | App\Http\Controllers\Auth\ResetController#edit | web |
| | GET|HEAD | password/reset/{token} | password.reset | App\Http\Controllers\Auth\ResetPasswordController#showResetForm | web |
| | GET|HEAD | product | | App\Http\Controllers\NavBar#prod | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | product/add | | App\Http\Controllers\ProductController#prodAdd | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | product/archive | | App\Http\Controllers\ProductController#prodArchive | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | register | register | App\Http\Controllers\Auth\RegisterController#showRegistrationForm | web |
| | | | | | guest |
| | POST | register | | App\Http\Controllers\Auth\RegisterController#register | web |
| | | | | | guest |
| | GET|HEAD | report | | App\Http\Controllers\NavBar#report | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | settings | | App\Http\Controllers\NavBar#settings | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | settings/payment/add | | App\Http\Controllers\SettingsController#payAdd | web |
| | | | | | auth |
| | GET|HEAD | shipping | | App\Http\Controllers\NavBar#ship | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
| | GET|HEAD | shipping/add | | App\Http\Controllers\ShippingController#shipAdd | web |
| | | | | | user |
| | | | | | fireauth |
| | | | | | auth |
+--------+-----------+-----------------------------+------------------+-----------------------------------------------------------------------+------------+
I have this side menu and the logout part used to be like this
<li class="nav-item"><a class="nav-link" href="" onclick="event.preventDefault();
document.getElementById('logout-form').submit();"><span></span><strong style="font-size: 16.6px;"><img src="{{ asset('build/img/vectors/logout%20icon.png?h=dbf300e18e83c66a9b08989511fc388a')}}"> Sign out</strong></a></li>
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
#csrf
</form>
I removed the form and leave the {{ route('logout') }}
and my solution:
<li class="nav-item"><a class="nav-link" href="{{ route('logout')}}"><span></span><strong style="font-size: 16.6px;"><img src="{{ asset('build/img/vectors/logout%20icon.png?h=dbf300e18e83c66a9b08989511fc388a')}}"> Sign out</strong></a></li>

laravel ui auth /login 404 not found

i cant access the auth pages it always redirect 404 not found .
it was work just fine before ,i dont know whats going on suddenly
this is my route file
Route::get('/', function () {
return redirect(app()->getLocale());
});
Auth::routes();
and this my route list
+--------+----------------------------------------+------------------------------------------------------------+------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------+
| Domain | Method | URI | Name | Action
| Middleware |
+--------+----------------------------------------+------------------------------------------------------------+------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------+
| | |
| App\Http\Middleware\RedirectIfAuthenticated |
| | POST | login | generated::csqSXSmjhYevTLX7 | App\Http\Controllers\Auth\LoginController#login | web |
| | | | |
| App\Http\Middleware\RedirectIfAuthenticated |
| | POST | logout | logout | App\Http\Controllers\Auth\LoginController#logout | web |
| | GET|HEAD | password/confirm | password.confirm | App\Http\Controllers\Auth\ConfirmPasswordController#showConfirmForm | web |
| | | | |
| App\Http\Middleware\Authenticate |
| | POST | password/confirm | generated::FOcpGH5OrG9S8e7r | App\Http\Controllers\Auth\ConfirmPasswordController#confirm | web |
| | | | |
| App\Http\Middleware\Authenticate |
| | POST | password/email | password.email | App\Http\Controllers\Auth\ForgotPasswordController#sendResetLinkEmail | web |
| | GET|HEAD | password/reset | password.request | App\Http\Controllers\Auth\ForgotPasswordController#showLinkRequestForm | web |
| | POST | password/reset | password.update | App\Http\Controllers\Auth\ResetPasswordController#reset | web |
| | GET|HEAD | password/reset/{token} | password.reset | App\Http\Controllers\Auth\ResetPasswordController#showResetForm | web |
| | GET|HEAD | register | register | App\Http\Controllers\Auth\RegisterController#showRegistrationForm | web |
| | | | |
| App\Http\Middleware\RedirectIfAuthenticated |
| | POST | register | generated::28dngmMiIB5ZE1p8 | App\Http\Controllers\Auth\RegisterController#register | web |
| | | | |
|
| | GET|HEAD | {locale} | site.index | App\Http\Controllers\Site\HomeController#index | web |
| | | | |
| App\Http\Middleware\SetLocale |
| | GET|HEAD | {locale}/chooseus/{chooseus} | site.chooseus.detail | App\Http\Controllers\Site\ChooseusController#detail | web |
| | | | |
| App\Http\Middleware\SetLocale |
| | POST | {locale}/contact-us/send | site.contact.send | App\Http\Controllers\Site\ContactController#send | web |
| | | | |
+--------+----------------------------------------+------------------------------------------------------------+------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------+
i tried to reinstall laravel ui but that didn't work
Your route {locale} may que interfering with the login route. Since both are first level routes, the {locale} is taking precedence, therefore not showing you the `login`` route.
You should consider using other route syntax, like /content/{locale} for example.

Using Spring #Value annotation results in field not initialized error in Eclipse

I am currently developing a Spring Boot application in the Eclipse IDE with a Connection class which needs to know which data source to connect to. I decided to let it know this property from Spring's application.properties, through the #Value annotation:
#Value("${project.datasource}")
private final DataSource DATA_SOURCE;
where DataSource is an enum representing the possible data sources. However, in this method, I get a "Blank final field DATA_SOURCE may not have been initialized" error:
private DBConnection() throws SQLException {
ConnectionConfig config = new ConnectionConfig(DATA_SOURCE);
connection = DriverManager.getConnection(config.getUrl(), config.getUSERNAME(), config.getPASSWORD());
}
Inserting a default value doesn't work, either:
#Value("${project.datasource:POSTGRE_LOCAL}")
still gives the same error.
I tried to install the Spring Tools 4 plugin for Eclipse to check if this was just Eclipse not understanding the #Value annotation's implications, but it seems like this isn't the case. How do I solve this problem? Am I misunderstanding the implications myself?
application.properties:
project.datasource = POSTGRE_LOCAL
Project tree:
| .classpath
| .gitignore
| .project
| HELP.md
| mvnw
| mvnw.cmd
| pom.xml
|
+---.mvn
| \---wrapper
| maven-wrapper.jar
| maven-wrapper.properties
|
+---.settings
| org.eclipse.core.resources.prefs
| org.eclipse.jdt.core.prefs
| org.eclipse.m2e.core.prefs
| org.springframework.ide.eclipse.prefs
|
+---src
| +---main
| | +---java
| | | \---org
| | | \---ingsw21
| | | \---backend
| | | +---connection
| | | | DBConnection.java
| | | |
| | | +---controllers
| | | | UserController.java
| | | |
| | | +---DAOs
| | | | DAOUtente.java
| | | |
| | | +---DAOSQL
| | | | DAOSQLUtente.java
| | | |
| | | +---entities
| | | | Utente.java
| | | |
| | | +---enums
| | | | DataSource.java
| | | |
| | | \---exceptions
| | | BadRequestWebException.java
| | | DataAccessException.java
| | |
| | \---resources
| | application.properties
| |
| \---test
| \---java
| \---org
| \---ingsw21
| \---backend
| \---BackEnd
| BackEndApplicationTests.java
|
\---target
+---classes
| | application.properties
| |
| \---org
| \---ingsw21
| \---backend
| +---connection
| | DBConnection$ConnectionConfig.class
| | DBConnection.class
| |
| +---controllers
| | UserController.class
| |
| +---DAOs
| | DAOUtente.class
| |
| +---DAOSQL
| | DAOSQLUtente.class
| |
| +---entities
| | Utente.class
| |
| +---enums
| | DataSource.class
| |
| \---exceptions
| BadRequestWebException.class
| DataAccessException.class
|
\---test-classes
\---org
You cannot add #Value to a final field.
#Value("${project.datasource}")
private DataSource DATA_SOURCE;
should work just fine.
Reverse the "$" and "{". The expression syntax is "${...}".

Laravel 8 Route in blade

I have the following web routes in my Laravel project
Route::resource('client/{client}/users', UserController::class);
Route::resource('users', UserController::class);
For the latter I am able to use {{ route('users.create') }} in my blade file, but I'm not sure what to put for the other one.
I need to 2 ways separate resources because some users are able to edit users from their own client (/users) and users of other clients (/client/123/users)
`php artisan route:list shows that I'm getting the same name for both. What's the correct way to name the clients-users resource?
| | GET|HEAD | client/{client}/users | users.index | App\Http\Controllers\UserController#index | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | POST | client/{client}/users | users.store | App\Http\Controllers\UserController#store | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | GET|HEAD | client/{client}/users/create | users.create | App\Http\Controllers\UserController#create | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | PUT|PATCH | client/{client}/users/{user} | users.update | App\Http\Controllers\UserController#update | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | DELETE | client/{client}/users/{user} | users.destroy | App\Http\Controllers\UserController#destroy | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | GET|HEAD | client/{client}/users/{user} | users.show | App\Http\Controllers\UserController#show | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | GET|HEAD | client/{client}/users/{user}/edit | users.edit | App\Http\Controllers\UserController#edit | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
and
| | GET|HEAD | users | users.index | App\Http\Controllers\UserController#index | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | GET|HEAD | users/create | users.create | App\Http\Controllers\UserController#create | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | DELETE | users/{user} | users.destroy | App\Http\Controllers\UserController#destroy | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | PUT|PATCH | users/{user} | users.update | App\Http\Controllers\UserController#update | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | GET|HEAD | users/{user} | users.show | App\Http\Controllers\UserController#show | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
| | GET|HEAD | users/{user}/edit | users.edit | App\Http\Controllers\UserController#edit | web |
| | | | | | App\Http\Middleware\Authenticate:sanctum |
| | | | | | Illuminate\Auth\Middleware\EnsureEmailIsVerified |
The third arguement of the resource is an array of options, one of which allows you to specifiy a prefix.
Route::resource('client/{client}/users', UserController::class, ['as' => 'clients']);
Route::resource('users', UserController::class);
Now your routes should be
clients.users.{action}
users.{action}
You need to give it a name. That said, I don't think you want Route::resource for that route.
I'm gonna give it the name clients.users.index but you can give it whatever name you want.
Route::get('clients/{client}/users', [ClientController::class, 'users'])->name('clients.users.index');
{{ route('clients.users.index') }}
The way to handle nested resources would be to declare the route:
Route::resource('clients.users', SomeOtherController::class);

Executable JAR unable to find Liquibase db/changelog.xml

The project runs as expected with spring-boot:run. However, the executable JAR fails to run because it cannot find db/changelog.xml.
The following steps can be used to reproduce the problem:
run mvn package from project root
go to target folder
run java -jar executable-jar-with-liquibase-1.0.0-SNAPSHOT.jar
The log will now show an error because the table domain has not been created.
Note that the application.yml is found, since if liquibase.enabled is set to false, it will refuse to run entirely (as it should).
application.yml
server:
context-path: /api
spring:
datasource:
platform: h2
url: jdbc:h2:mem:testdb;MODE=PostgreSQL;DB_CLOSE_ON_EXIT=FALSE
jackson:
date-format: yyyy-MM-dd
jpa:
database-platform: org.hibernate.dialect.PostgreSQLDialect
hibernate:
ddl-auto: none
liquibase:
enabled: false
change-log: classpath:db/changelog.xml
The generated JAR has the following contents:
.
|____BOOT-INF
| |____classes
| | |____application.yml
| | |____db
| | | |____changelog.xml
| | | |____changelogs
| | | | |____changelog_000.xml
| | |____nl
| | | |_____42
| | | | |____app
| | | | | |____ApplicationConfig.class
| | | | | |____domain
| | | | | | |____Domain.class
| | | | | | |____DomainController.class
| | | | | | |____DomainRepository.class
| | | | | | |____DomainService.class
| | | | | |____shared
| | | | | | |____AbstractEntity.class
| | | | | |____WebAppConfig.class
| | | | | |____WebApplication.class
| |____lib
| | |____accessors-smart-1.1.jar
| | |____antlr-2.7.7.jar
| | |____asm-5.0.3.jar
| | |____aspectjweaver-1.8.9.jar
| | |____assertj-core-2.5.0.jar
| | |____classmate-1.3.1.jar
| | |____dom4j-1.6.1.jar
| | |____h2-1.4.192.jar
| | |____hamcrest-core-1.3.jar
| | |____hamcrest-library-1.3.jar
| | |____hibernate-commons-annotations-5.0.1.Final.jar
| | |____hibernate-core-5.0.11.Final.jar
| | |____hibernate-entitymanager-5.0.11.Final.jar
| | |____hibernate-jpa-2.1-api-1.0.0.Final.jar
| | |____hibernate-validator-5.2.4.Final.jar
| | |____jackson-annotations-2.8.3.jar
| | |____jackson-core-2.8.3.jar
| | |____jackson-databind-2.8.3.jar
| | |____jackson-datatype-jsr310-2.8.3.jar
| | |____jandex-2.0.0.Final.jar
| | |____javassist-3.20.0-GA.jar
| | |____javax.transaction-api-1.2.jar
| | |____jboss-logging-3.3.0.Final.jar
| | |____jcl-over-slf4j-1.7.21.jar
| | |____json-20140107.jar
| | |____json-path-2.2.0.jar
| | |____json-smart-2.2.1.jar
| | |____jsonassert-1.3.0.jar
| | |____jul-to-slf4j-1.7.21.jar
| | |____liquibase-core-3.5.1.jar
| | |____log4j-over-slf4j-1.7.21.jar
| | |____logback-classic-1.1.7.jar
| | |____logback-core-1.1.7.jar
| | |____mockito-core-1.10.19.jar
| | |____objenesis-2.1.jar
| | |____slf4j-api-1.7.21.jar
| | |____snakeyaml-1.17.jar
| | |____spring-aop-4.3.3.RELEASE.jar
| | |____spring-aspects-4.3.3.RELEASE.jar
| | |____spring-beans-4.3.3.RELEASE.jar
| | |____spring-boot-1.4.1.RELEASE.jar
| | |____spring-boot-autoconfigure-1.4.1.RELEASE.jar
| | |____spring-boot-configuration-processor-1.4.1.RELEASE.jar
| | |____spring-boot-devtools-1.4.1.RELEASE.jar
| | |____spring-boot-starter-1.4.1.RELEASE.jar
| | |____spring-boot-starter-aop-1.4.1.RELEASE.jar
| | |____spring-boot-starter-data-jpa-1.4.1.RELEASE.jar
| | |____spring-boot-starter-jdbc-1.4.1.RELEASE.jar
| | |____spring-boot-starter-logging-1.4.1.RELEASE.jar
| | |____spring-boot-starter-test-1.4.1.RELEASE.jar
| | |____spring-boot-starter-tomcat-1.4.1.RELEASE.jar
| | |____spring-boot-starter-web-1.4.1.RELEASE.jar
| | |____spring-boot-test-1.4.1.RELEASE.jar
| | |____spring-boot-test-autoconfigure-1.4.1.RELEASE.jar
| | |____spring-context-4.3.3.RELEASE.jar
| | |____spring-core-4.3.3.RELEASE.jar
| | |____spring-data-commons-1.12.3.RELEASE.jar
| | |____spring-data-jpa-1.10.3.RELEASE.jar
| | |____spring-expression-4.3.3.RELEASE.jar
| | |____spring-jdbc-4.3.3.RELEASE.jar
| | |____spring-orm-4.3.3.RELEASE.jar
| | |____spring-tx-4.3.3.RELEASE.jar
| | |____spring-web-4.3.3.RELEASE.jar
| | |____spring-webmvc-4.3.3.RELEASE.jar
| | |____tomcat-embed-core-8.5.5.jar
| | |____tomcat-embed-el-8.5.5.jar
| | |____tomcat-embed-websocket-8.5.5.jar
| | |____tomcat-jdbc-8.5.5.jar
| | |____tomcat-juli-8.5.5.jar
| | |____validation-api-1.1.0.Final.jar
| | |____xml-apis-1.4.01.jar
|____META-INF
| |____MANIFEST.MF
| |____maven
| | |____nl.mad
| | | |____executable-jar-with-liquibase
| | | | |____pom.properties
| | | | |____pom.xml
|____org
| |____springframework
| | |____boot
| | | |____loader
| | | | |____archive
| | | | | |____Archive$Entry.class
| | | | | |____Archive$EntryFilter.class
| | | | | |____Archive.class
| | | | | |____ExplodedArchive$1.class
| | | | | |____ExplodedArchive$FileEntry.class
| | | | | |____ExplodedArchive$FileEntryIterator$EntryComparator.class
| | | | | |____ExplodedArchive$FileEntryIterator.class
| | | | | |____ExplodedArchive.class
| | | | | |____JarFileArchive$EntryIterator.class
| | | | | |____JarFileArchive$JarFileEntry.class
| | | | | |____JarFileArchive.class
| | | | |____data
| | | | | |____ByteArrayRandomAccessData.class
| | | | | |____RandomAccessData$ResourceAccess.class
| | | | | |____RandomAccessData.class
| | | | | |____RandomAccessDataFile$DataInputStream.class
| | | | | |____RandomAccessDataFile$FilePool.class
| | | | | |____RandomAccessDataFile.class
| | | | |____ExecutableArchiveLauncher$1.class
| | | | |____ExecutableArchiveLauncher.class
| | | | |____jar
| | | | | |____AsciiBytes.class
| | | | | |____Bytes.class
| | | | | |____CentralDirectoryEndRecord.class
| | | | | |____CentralDirectoryFileHeader.class
| | | | | |____CentralDirectoryParser.class
| | | | | |____CentralDirectoryVisitor.class
| | | | | |____FileHeader.class
| | | | | |____Handler.class
| | | | | |____JarEntry.class
| | | | | |____JarEntryFilter.class
| | | | | |____JarFile$1.class
| | | | | |____JarFile$2.class
| | | | | |____JarFile$3.class
| | | | | |____JarFile$JarFileType.class
| | | | | |____JarFile.class
| | | | | |____JarFileEntries$1.class
| | | | | |____JarFileEntries$EntryIterator.class
| | | | | |____JarFileEntries.class
| | | | | |____JarURLConnection$1.class
| | | | | |____JarURLConnection$JarEntryName.class
| | | | | |____JarURLConnection.class
| | | | | |____ZipInflaterInputStream.class
| | | | |____JarLauncher.class
| | | | |____LaunchedURLClassLoader$1.class
| | | | |____LaunchedURLClassLoader.class
| | | | |____Launcher.class
| | | | |____MainMethodRunner.class
| | | | |____PropertiesLauncher$1.class
| | | | |____PropertiesLauncher$ArchiveEntryFilter.class
| | | | |____PropertiesLauncher$FilteredArchive$1.class
| | | | |____PropertiesLauncher$FilteredArchive.class
| | | | |____PropertiesLauncher$PrefixMatchingArchiveFilter.class
| | | | |____PropertiesLauncher.class
| | | | |____util
| | | | | |____SystemPropertyUtils.class
| | | | |____WarLauncher.class
The entire project can be found here: https://github.com/robert-bor/executable-jar-with-liquibase
What am I doing wrong here?
there used to be a problem with the includeAll tag in liquibase, see this issue. It should be fix meanwhile, but at the moment I could not make it run with the includeAll tag.
As a solution for your problem use:
<include file="classpath:db/changelogs/changelog_000.xml" relativeToChangelogFile="false"/>

Resources