pvbj2606
(pvbj26 V)
December 29, 2021, 3:15am
1
Good day,
I have a project in Cuba-platform and tried to migrate to Jmix but i get this error:
Caused by: org.gradle.api.GradleException: Unable to find .gwt.xml file for widgets compilation
at io.jmix.gradle.ui.WidgetsCompile.compileWidgets(WidgetsCompile.java:111)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
if anyone can help me i would appreciated.
krivopustov
(Konstantin Krivopustov)
December 30, 2021, 10:37am
2
Please attach build.gradle files of your CUBA and Jmix projects.
ilyasovpi
(Pavel Ilyasov)
March 5, 2022, 10:33pm
3
I had the same issue. Then I compared the project that was previously migrated from Cuba and the project that was created on JMIX from the beginning. The difference was in the task:
compileWidgets {
generate “ru.mycompany.myawesomeproject.widgets.CustomWidgetSet”
includePaths(“/io/jmix/ /widget/", " /ru/mycompany/myawesomeproject/widgets/**”)
}
After adding the task to the project which was migrated, the problem gone
1 Like
Running into the same issue.
I have no custom widgets and hence no compileWidgets task in my build.gradle
@pvbj2606 did you figure out the problem?
@konstantin.st.ivanov any idea?
pinyazhin
(Roman Pinyazhin)
June 2, 2022, 9:16am
6
Hello!
Could you share the build.gradle file? Do you migrate project from CUBA too?
yes, migrating from cuba
plugins {
id 'io.jmix' version '1.2.0'
id 'java'
}
apply plugin: 'org.springframework.boot'
jmix {
bomVersion = '1.2.3'
projectId = 'HIDDEN'
}
group = 'com.HIDDEN'
version = '0.0.1-SNAPSHOT'
repositories {
mavenCentral()
maven {
url 'https://global.repo.jmix.io/repository/public'
}
maven {
url 'HIDDEN'
credentials {
username "aws"
password "HIDDEN"
}
}
}
dependencies {
implementation 'io.jmix.core:jmix-core-starter'
implementation 'io.jmix.data:jmix-eclipselink-starter'
implementation 'io.jmix.ui:jmix-ui-starter'
implementation 'io.jmix.ui:jmix-ui-data-starter'
implementation 'io.jmix.ui:jmix-ui-themes-compiled'
implementation 'io.jmix.ui:jmix-ui-widgets-compiled'
implementation 'io.jmix.security:jmix-security-starter'
implementation 'io.jmix.security:jmix-security-ui-starter'
implementation 'io.jmix.security:jmix-security-data-starter'
implementation 'io.jmix.localfs:jmix-localfs-starter'
implementation 'io.jmix.datatools:jmix-datatools-starter'
implementation 'io.jmix.datatools:jmix-datatools-ui-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
implementation "io.jmix.cuba:jmix-cuba-starter"
implementation "io.jmix.ui:jmix-charts-starter"
implementation "io.jmix.ui:jmix-ui-widgets"
widgets "io.jmix.ui:jmix-ui-widgets"
widgets "io.jmix.ui:jmix-charts-widgets"
implementation "io.jmix.rest:jmix-rest-starter"
implementation "io.jmix.security:jmix-security-oauth2-starter"
implementation "io.jmix.multitenancy:jmix-multitenancy-starter"
implementation "io.jmix.multitenancy:jmix-multitenancy-ui-starter"
implementation("org.mariadb.jdbc:mariadb-java-client")
//own dependencies
implementation "org.mapstruct:mapstruct:1.4.2.Final"
//annotationProcessor "org.mapstruct:mapstruct-processor:1.4.2.Final"
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
implementation("de.knightsoft-net:mt-bean-validators:1.4.2") {
exclude group: 'org.hibernate.validator', module: 'hibernate-validator'
exclude group: 'jakarta.validation'
}
implementation 'dev.samstevens.totp:totp:1.7.1'
// https://mvnrepository.com/artifact/io.sentry/sentry-spring
implementation group: 'io.sentry', name: 'sentry-spring', version: '5.1.2'
implementation group: 'io.sentry', name: 'sentry-logback', version: '5.1.2'
implementation group: 'org.apache.poi', name: 'poi', version: '3.9'
implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '3.9'
implementation "io.springfox:springfox-swagger2:2.9.2"
implementation "io.springfox:springfox-swagger-ui:2.9.2"
implementation("io.jmix.audit:jmix-audit-ui-starter")
implementation("io.jmix.audit:jmix-audit-starter")
}
test {
useJUnitPlatform()
}
pinyazhin
(Roman Pinyazhin)
June 9, 2022, 7:11am
9
The same case as described above. Your build.gradle file doesn’t contain a task to compile widgets. Try to add the following task:
compileWidgets {
generate "com.company.myapp.widgets.CustomWidgetSet"
includePaths("**/io/jmix/**/widget/**", "**/com/company/myapp/widgets/**")
}
Also check application.properties , it should contain the following:
jmix.ui.widget-set=com.company.myapp.widgets.CustomWidgetSet
1 Like
but I don’t have any custom widgets…
pinyazhin
(Roman Pinyazhin)
June 14, 2022, 9:44am
12
com.company.myapp.widgets.CustomWidgetSet will be generated automatically. It will contain information about widgets from UI, charts, etc.
Ran into this again when migrating a completely unrelated project. The above solution works. (but maybe would be nice to fix in the migration proceess)