Repository navigation
Closed
vaadin/flow
#11300Labels
Released with Platform 20.0.4Released with Platform 21.0.0.alpha8blocked by upstreamSomething needs to be fixed first in the depending librariesSomething needs to be fixed first in the depending librariesbugSomething isn't workingSomething isn't workingprerelease version for platform 21.0.0
Description
Desktop (please complete the following information):
- Vaadin Plugin version: 17.0.1
Describe the bug
ReflectionsClassFinder should only scan class files. at the moment there is to much useless log output
To Reproduce
.gradle clean build --debug
Expected behavior
just scan class files
org.reflections.ReflectionsException: could not create class object from file META-INF/MANIFEST.MF
at org.reflections.scanners.AbstractScanner.scan(AbstractScanner.java:32)
at org.reflections.Reflections.scan(Reflections.java:253)
at org.reflections.Reflections.scan(Reflections.java:202)
at org.reflections.Reflections.<init>(Reflections.java:123)
at com.vaadin.gradle.ReflectionsClassFinder.<init>(ReflectionsClassFinder.kt:43)
at com.vaadin.gradle.VaadinUtilsKt.getClassFinder(VaadinUtils.kt:63)
at com.vaadin.gradle.VaadinUtilsKt.createNodeTasksBuilder(VaadinUtils.kt:157)
at com.vaadin.gradle.VaadinPrepareFrontendTask.vaadinPrepareFrontend(VaadinPrepareFrontendTask.kt:89)
at jdk.internal.reflect.GeneratedMethodAccessor624.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
...
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.reflections.ReflectionsException: could not create class file from MANIFEST.MF
at org.reflections.adapters.JavassistAdapter.getOfCreateClassObject(JavassistAdapter.java:102)
at org.reflections.adapters.JavassistAdapter.getOfCreateClassObject(JavassistAdapter.java:24)
at org.reflections.scanners.AbstractScanner.scan(AbstractScanner.java:30)
... 108 more
Metadata
Metadata
Assignees
Labels
Released with Platform 20.0.4Released with Platform 21.0.0.alpha8blocked by upstreamSomething needs to be fixed first in the depending librariesSomething needs to be fixed first in the depending librariesbugSomething isn't workingSomething isn't workingprerelease version for platform 21.0.0
Activity
mvysny commentedon Dec 17, 2020
Thank you, reproduced on github.com/vaadin/base-starter-gradle v14; simply run
./gradlew --debug.mvysny commentedon Dec 17, 2020
The bug is present in the
ReflectionsClassFinder: it doesn't configure the Reflections library properly to only process.classfiles. That class comes from Vaadin 14 and so the bug is present upstream. However, the same bug can not be reproduced with Maven plugin even if running with-X(probably slf4j is missing on classpath and thus the Reflections library logs nothing). That leads me to believe that upstream will not fix this issue.The
ReflectionsClassFinderhas been copied out of Vaadin for Gradle plugin 0.17+ anyways; proposed solution is to copy out the class for Gradle plugin 0.14 and patch it locally.Configure Reflections to only process .class files. Fixes #99
mvysny commentedon Dec 17, 2020
Thank you, the fix will now be present in a future release of both 14.x (0.14.4.4 or higher) and master (0.18.0.2 or higher).
mvysny commentedon Mar 17, 2021
The fix is to configure
ConfigurationBuilderto only consider*.classfiles as follows:Reopening since the new Vaadin 20 plugin will have the same issue.
mvysny commentedon Mar 17, 2021
Reported upstream as vaadin/flow#10304
Workaround for #99
mvysny commentedon Jun 2, 2021
Upstream bug has been fixed in Vaadin 20; however it has not been fixed in Vaadin 14. Therefore I'm leaving this ticket open.
fix: remove the ClassFinder workaround
fix: remove the ClassFinder workaround for Gradle (#11300)
fix: remove the ClassFinder workaround for Gradle (#11300)
fix: remove the ClassFinder workaround for Gradle (#11300) (#11314)
vaadin-bot commentedon Jun 28, 2021
This ticket/PR has been released with platform 21.0.0.alpha8. For prerelease versions, it will be included in its final version.
vaadin-bot commentedon Jul 5, 2021
This ticket/PR has been released with platform 20.0.4. For prerelease versions, it will be included in its final version.