Why does Vaadin require a license in the Docker build? - vaadin

I am using Vaadin 23.5.5 for a private project without using the Pro components of Vaadin. When I build the project in a Docker container, Vaadin aborts the build and asks for a license key file.
...
Running Vite ...
Opening the system browser to validate the license. If the browser is not open, please open https://vaadin.com/pro/validate-license?connect=UUID&productName=vaadin-board&productVersion=23.3.5 manually.
If you are working offline, please visit https://vaadin.com/pro/validate-license?getOfflineKey=ABC for an offline license.
...
This are my dependencies:
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-jersey'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'com.google.cloud:spring-cloud-gcp-starter'
implementation 'com.google.cloud:spring-cloud-gcp-starter-storage'
implementation 'com.vaadin:vaadin-spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'com.google.cloud:spring-cloud-gcp-starter-data-firestore'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
implementation 'de.jfancy:star-rating:1.0.3'
}
dependencyManagement {
imports {
mavenBom "com.vaadin:vaadin-bom:${vaadinVersion}"
mavenBom "com.google.cloud:spring-cloud-gcp-dependencies:${springCloudGcpVersion}"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
The entire dependency tree:
https://gist.github.com/benocms/1d08207e5a89f6d50965a5136938a8a8
My understanding is that the use of the Core components is free. Am I wrong about this? Or is this a bug?

Related

How to import a proprietary library in Grails 4.0.3

I am trying to import a proprietary jar lib (ICOMConector.jar) in my grails 4.0.3 project, but it is sending me an error.
In IntelliJ, I right-clicked the project folder and accessed Open Module Settings. Then I clicked in Libraries and chose my jar. Right after, clicked in Module / Dependencies and chose that jar in a compilation scope.
In build.gradle file I put this flatDir, because the jar in my project grails stardard structure:
repositories {
maven { url "https://repo.grails.org/grails/core" }
flatDir {
dirs 'lib'
}
}
And this in the same build.gradle, I've tried all of that, including those now commented,
but the error persists.
dependencies {
//implementation name: 'lib/ICOMConector.jar'
//runtime files('lib/ICOMConector.jar')
//runtime fileTree(dir: 'lib', include: '*.jar')
compile fileTree(dir: 'lib', include: ['*.jar'])
}
when I send grails run-app in the command line, the error is:
| Running application...
startup failed:
/media/alfredo/1TBHDD/CMB/Code projects/Grails 4/detran-mspid/grails-app/init/detran/mspid/BootStrap.groovy: 5: unable to resolve class com.workers.icom.ICOMConector
**# line 5, column 1.
import com.workers.icom.ICOMConector
^
1 error**
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
I tried to instantiate the class in Bootstrap.groovy, to make it easier to verify if it is working as expected.
Could anyone help me to import this library. A friend of mine did this in a Spring boot project and it worked, so the problem seems to be a wrong configuration in Grails.
package detran.mspid
import com.workers.icom.ICOMConector
class BootStrap {
def init = { servletContext ->
ICOMConector icom = new ICOMConector()
}
def destroy = {
}
}
This is what I have in my build.gradle for using a library in grails 4.0.3 (been this way since at least grails 3, though). This is almost identical to one you tried with runtime scope.
compile files("lib/opencsv-2.3.jar")
runtimeOnly fileTree(dir: './lib', include: ['*.jar'])
It's entirely possible that either one or both of those is unnecessary...

How can I remove this error with build.gradle (module app) in AndroidStudio?

I am getting the error in following line
implementation 'com.android.support:appcompat-v7:28.0.0'
And I am getting this in description for the above error.
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0, 26.1.0.)
I uninstalled Android Studio twice & again installed it again.
But it didn't help.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.squareup.picasso:picasso:2.71828'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
The error is made by different jar, just use my two method, the error is resolved
Revise the picasso
implementation('com.squareup.picasso:picasso:2.71828'){
exclude group: 'com.android.support'
}
Add below item into build.gradle
implementation ('com.android.support:exifinterface:28.0.0')

MultiView FXML Project on iOS using Gluon-mobile and Java9

Creating a completely new MultiView FXML Project and then adding the Java9 necessities in Gradle:
buildscript {
repositories {
jcenter()
google()
maven{
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:2.0.5'
}
}
...
sourceCompatibility = 1.8
targetCompatibility = 1.8
...
dependencies {
compile 'com.gluonhq:charm:4.4.0-jdk9'
androidRuntime 'com.gluonhq:charm:4.4.1'
compile 'com.airhacks:afterburner.mfx:1.6.3'
// Added because of javax.annotation.PostConstruct Java9 issues
compile group: 'javax.xml.ws', name: 'jaxws-api', version: '2.2.6'
}
leads to [SUB] Exception in thread "JavaFX Application Thread" java.lang.IllegalStateException: Stage must be showing before making the Dialog visible.
full console log
The project runs as expected on Desktop and Android, but not on iOS simulator and device. I have tried many things, but since this error comes on newly created projects leads me to believe that it's something caused by the interplay of gluon-mobile and Java9.
Bonus: Changing only the jfxmobile-plugin to 2.0.18 fails even compiling with:
[15:08:15:141] com.gluonhq.higgs.Higgs: Still compiling... 8823
classes left.
[15:08:25:143] com.gluonhq.higgs.Higgs: Still
compiling... 4152 classes left.
[15:08:34:389] com.gluonhq.higgs.Compiler: halfway done round 0
java.lang.StackOverflowError
at java.base/java.util.HashMap.putVal(HashMap.java:642)
at java.base/java.util.HashMap.put(HashMap.java:612)
at java.base/java.util.HashSet.add(HashSet.java:220)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:170)
These steps work for me:
Using Java 9, and NetBeans 9 (beta version) with Gluon IDE plugin 2.6.2, I've created a Gluon project (multi view with FXML). Of course, this will work with other IDEs as well.
I've checked that the gradle wrapper was using 4.3.1 (or superior).
I've modified the build.gradle file to use Gluon VM with jfxmobile 2.0.18:
build.gradle file:
buildscript {
repositories {
jcenter()
google()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:2.0.18'
}
}
and updated the dependencies:
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'com.gluonhq:charm:4.4.0-jdk9'
compile 'com.airhacks:afterburner.mfx:1.6.3'
compile 'javax.annotation:javax.annotation-api:1.3.2'
androidRuntime 'com.gluonhq:charm:4.4.1'
}
Then I just deployed the project to my iOS device without any issue.
Note that it may be convenient to clean your ~/.gvm cache, as it might contain classes from older versions that shouldn't be used anymore. Of course, you should also clean your project ./gradle and /build folders.

Gradle build error with SDK tools version 27

When I create a new project with my android studio 3.0.1 build.gradle (module:app) is configured automatically as bellow:
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.android.myapplication"
minSdkVersion 17
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
and build.gradle (project:my application) is configured automatically as bellow:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I've done nothing unless creating a new project but at this point an error appears with red line under appcompat implementation saying:
When using a compileSdkVersion android-O revision 2 or higher, the support library version should be 26.0.0-beta1 or higher (was 26.0.0-alpha1)
Also test:runner implementation is highlighted with following hint:
A newer version of com.android.support.test:runner than 0.5 is available: 1.0.1
and espresso-core implementation is highlighted with following hint:
A newer version of com.android.support.test.espresso:espresso-core than 2.2.2 is available: 3.0.1
QUESTION 1- I have SDK tools versions 27.0.0 and 27.0.1 and 27.0.3 installed on my system. Why android studio uses 26.0.0-alpha1 as a default which causes error?
QUESTION 2- How can I change this default to proper 27 version?
When I try changing compileSdkVersion and targetSdkVersion to 27 and changing appcompat version to v7:27.0.0 then I come up with following errors after syncing:
image description
QUESTION 3- Why this error is happening and how to rectify it?
I revert back to SDK 26 and try to upgrade test:runner and test.espresso:espresso-core to what android studio suggests. It ends up with this error:
image description
QUESTION 4- Why android studio cannot resolve the upgrading which it suggests?
QUESTION 5- What is a sample working gradle build configuration using latest SDK version (27)?
After too many investigations, I regretfully found that all errors were due to unfair sanctions by Google against my country's people (not against the government as they claim!).
My Android Studio was not able to contact jcenter and maven repositories.
After using a VPN program everything was settled and all errors were vanished!!

Exclude Gradle dependency at debug

I'm using Grails plugin to execute (war and debug) Grails 2.5.0 project.
It seems one of dependencies contain older dependency than I would like to you. When I war a project correct version is used, but at debug it uses older dependenvy version:
dependencies {
bootstrap "org.grails.plugins:tomcat:7.0.50" // No container is deployed by default, so add this
// plugins for the compile step
compile "joda-time:joda-time:2.3"
compile("org.grails.plugins:spring-security-rest:1.5.2") {
exclude module: 'xml-apis'
exclude module: 'joda-time'
}
compile 'org.grails.plugins:cache:1.1.8'
// plugins needed at runtime but not for compilation
runtime ("org.grails.plugins:hibernate4:4.3.8.1") { exclude module: 'xml-apis' } // or ":hibernate:3.6.10.18"
runtime "org.grails.plugins:database-migration:1.4.0"
}
So at debug I have joda-time 1.6 which is shipped with spring-security-rest:1.5.2. But when war-ed joda-time version is 2.3

Resources