I have maven-checkstyle-plugin(v2.5) and maven-eclipse-plugin(v2.8) configured.
Everything worked as expected but as soon as I introduced,
module name="SuppressWarningsHolder" AND/OR module name="SuppressWarningsFilter" to my checkstyle-config.xml, I started to have problems building the project.
Here is what I get:
[ERROR] BUILD ERROR
1> [INFO] ------------------------------------------------------------------------
1> [INFO] Failed during checkstyle configuration
1>
1>EXEC : Embedded error : cannot initialize module TreeWalker - Unable to instantiate SuppressWarningsHolder
1> Unable to instantiate SuppressWarningsHolderCheck
If I remove SuppressWarningsHolderCheck, I get the same error for SuppressWarningsFilter.
Any ideas?
Thanks
It appears you have two problems:
You are using maven-checkstyle-plugin v2.5, which is based on Checkstyle 5.0. In Checkstyle 5.0, the SuppressWarningsHolderCheck and the SuppressWarningsFilter did not exist yet, as they were introduced in 5.7. So you must first upgrade your maven-checkstyle-plugin.
The SuppressWarningsFilter must be configured directly under Checker, not under TreeWalker. The documentation does not make that part very explicit, although it is there. Note that the SuppressWarningsHolder does go under TreeWalker.
If you do both things, stuff should hopefully start working.
Related
I am building a small project with KMM, it builds perfectly fine on android but cannot build it in XCode. Cocoapods was also installed an genereted without any erros.
What I'm using:
macbook air m1
Kotlin 1.6.10,
gradle 7.3.0-alpha03
Ktor 1.5.2,
SQLDelight 1.4.3,
You can find the project here: https://github.com/PiotrKedra/comperative-analysis-of-kmm-flutter-react-native/tree/master/preapp-kmm
The error I got:
...
> Task :shared:linkPodDebugFrameworkIos FAILED
e: Compilation failed: Backend Internal error: Exception during IR lowering
File being compiled: /opt/buildAgent/work/b2fef8360e1bcf3d/formats/json/commonMain/src/kotlinx/serialization/json/internal/TreeJsonDecoder.kt
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.IrFakeOverrideUtilsKt.getTarget(IrFakeOverrideUtils.kt:24)
* Source files:
* Compiler version info: Konan: 1.6.10 / Kotlin: 1.6.10
* Output kind: FRAMEWORK
e: org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /opt/buildAgent/work/b2fef8360e1bcf3d/formats/json/commonMain/src/kotlinx/serialization/json/internal/TreeJsonDecoder.kt
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.IrFakeOverrideUtilsKt.getTarget(IrFakeOverrideUtils.kt:24)
...
Caused by: java.lang.IllegalStateException: Could not resolveFakeOverride() for FUN FAKE_OVERRIDE name:decodeNullableSerializableElement visibility:public modality:OPEN <T> ($this:kotlinx.serialization.encoding.CompositeDecoder, descriptor:kotlinx.serialization.descriptors.SerialDescriptor, i:kotlin.Int, deserializer:kotlinx.serialization.DeserializationStrategy<T of kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeNullableSerializableElement?>) returnType:T of kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeNullableSerializableElement? [fake_override]
at org.jetbrains.kotlin.ir.util.IrFakeOverrideUtilsKt.getTarget(IrFakeOverrideUtils.kt:24)
...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared:linkPodDebugFrameworkIos'.
> Compilation finished with errors
For Kotlin 1.6.10, you need Ktor that was build on Kotlin 1.6.10. Ktor 1.6.8 is what you need. You will also need to inclode Kotlinx.serialization into the common module. Currently, you only have the plugin for Ktor (I'm guessing you are trying to deserialize network calls directly into appropriate data classes).
I tried installing package nativescript-onesignal. After that, I got an error like UNMET PEER DEPENDANCY. Then I updated my modules following some posts on GitHub and StackOverflow. But, now when I try to build and run the application I got BUILD FAILED error. Unable to understand what went wrong. I followed some posts to resolve this but with no success.
Following is the error I got in the console.
tns run android
Searching for devices...
Preparing project...
Successfully prepared plugin nativescript-camera for android.
Successfully prepared plugin nativescript-carousel for android.
Successfully prepared plugin nativescript-drop-down for android.
Successfully prepared plugin nativescript-filter-select for android.
Successfully prepared plugin nativescript-geolocation for android.
Successfully prepared plugin nativescript-gradient for android.
Successfully prepared plugin nativescript-imagepicker for android.
nativescript-iqkeyboardmanager is not supported for android.
Successfully prepared plugin nativescript-iqkeyboardmanager for android.
Successfully prepared plugin nativescript-loading-indicator for android.
Successfully prepared plugin nativescript-localstorage for android.
Successfully prepared plugin nativescript-locate-address for android.
Successfully prepared plugin nativescript-numeric-keyboard for android.
Successfully prepared plugin nativescript-onesignal for android.
Successfully prepared plugin nativescript-phone for android.
Successfully prepared plugin nativescript-social-share for android.
Successfully prepared plugin nativescript-telerik-ui for android.
Successfully prepared plugin nativescript-theme-core for android.
Successfully prepared plugin nativescript-webview-interface for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin tns-i18n for android.
Successfully prepared plugin nativescript-permissions for android.
Successfully prepared plugin tns-core-modules-widgets for android.
Starting a Gradle Daemon, 2 incompatible and 2 stopped Daemons could not be reused, use --status for details
> Configuring > 0/3 projects > root project
:config phase: createDefaultIncludeFiles
> Configuring > 0/3 projects > root project
:config phase: addAarDependencies
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\Common-2017.1.719-dev-release.aar
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\Data-2017.1.719-dev-release.aar
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\List-2017.1.719-dev-release.aar
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\Primitives-2017.1.719-dev-release.aar
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\widgets-release.aar
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
Incremental java compilation is an incubating feature.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_2xnifqnj4smqh1ggt6ywlsjt4.run(C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\build-tools\android-static-binding-generator\build.gradle:144)
:asbg:clean UP-TO-DATE
:deleteMetadata
:deleteFlavors
:deleteConfigurations UP-TO-DATE
:deleteGeneratedBindings UP-TO-DATE
:clean
BUILD SUCCESSFUL
Total time: 30.954 secs
Project successfully prepared (Android)
Building project...
> Configuring > 0/3 projects > root project
:config phase: createDefaultIncludeFiles
+found plugins: nativescript-camera
+ creating include.gradle file for C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-camera
Renaming plugin directory to flavor name: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\nativescript-camera -> C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F0
+found plugins: nativescript-carousel
Renaming plugin directory to flavor name: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\nativescript-carousel -> C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F1
+found plugins: nativescript-geolocation
+ creating include.gradle file for C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-geolocation
Renaming plugin directory to flavor name: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\nativescript-geolocation -> C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F2
+found plugins: nativescript-imagepicker
Renaming plugin directory to flavor name: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\nativescript-imagepicker -> C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F3
+found plugins: nativescript-onesignal
Renaming plugin directory to flavor name: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\nativescript-onesignal -> C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F4
+found plugins: nativescript-phone
+ creating include.gradle file for C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-phone
Renaming plugin directory to flavor name: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\nativescript-phone -> C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F5
+found plugins: nativescript-telerik-ui
Renaming plugin directory to flavor name: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\nativescript-telerik-ui -> C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F6
+found plugins: nativescript-webview-interface
+ creating include.gradle file for C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-webview-interface
Renaming plugin directory to flavor name: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\nativescript-webview-interface -> C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F7
+found plugins: tns-core-modules-widgets
+ creating include.gradle file for C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\tns-core-modules-widgets
Renaming plugin directory to flavor name: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\tns-core-modules-widgets -> C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F8
> Configuring > 0/3 projects > root project
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android/configurations folder...
:config phase: pluginExtend
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\include.gradle
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-camera\include.gradle
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-carousel\include.gradle
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-geolocation\include.gradle
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-imagepicker\include.gradle
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-onesignal\include.gradle
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-phone\include.gradle
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-telerik-ui\include.gradle
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\nativescript-webview-interface\include.gradle
+applying configuration from: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\configurations\tns-core-modules-widgets\include.gradle
> Configuring > 0/3 projects > root project
:config phase: addAarDependencies
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\Common-2017.1.719-dev-release.aar
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\Data-2017.1.719-dev-release.aar
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\List-2017.1.719-dev-release.aar
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\Primitives-2017.1.719-dev-release.aar
+adding dependency: C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\libs\aar\widgets-release.aar
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
Incremental java compilation is an incubating feature.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_2xnifqnj4smqh1ggt6ywlsjt4.run(C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\build-tools\android-static-binding-generator\build.gradle:144)
:preBuild UP-TO-DATE
:preF0F1F2F3F4F5F6F7F8DebugBuild UP-TO-DATE
:checkF0F1F2F3F4F5F6F7F8DebugManifest
:preF0F1F2F3F4F5F6F7F8ReleaseBuild UP-TO-DATE
:prepareAquaappRuntimeUnspecifiedLibrary
:prepareComAndroidSupportAnimatedVectorDrawable2600Alpha1Library
:prepareComAndroidSupportAppcompatV72600Alpha1Library
:prepareComAndroidSupportDesign2600Alpha1Library
:prepareComAndroidSupportRecyclerviewV72600Alpha1Library
:prepareComAndroidSupportSupportCompat2600Alpha1Library
:prepareComAndroidSupportSupportCoreUi2600Alpha1Library
:prepareComAndroidSupportSupportCoreUtils2600Alpha1Library
:prepareComAndroidSupportSupportFragment2600Alpha1Library
:prepareComAndroidSupportSupportMediaCompat2600Alpha1Library
:prepareComAndroidSupportSupportV42600Alpha1Library
:prepareComAndroidSupportSupportVectorDrawable2600Alpha1Library
:prepareComAndroidSupportTransition2600Alpha1Library
:prepareComGoogleAndroidGmsPlayServicesBase1104Library
:prepareComGoogleAndroidGmsPlayServicesBasement1104Library
:prepareComGoogleAndroidGmsPlayServicesGcm1104Library
:prepareComGoogleAndroidGmsPlayServicesIid1104Library
:prepareComGoogleAndroidGmsPlayServicesLocation1104Library
:prepareComGoogleAndroidGmsPlayServicesTasks1104Library
:prepareComOnesignalOneSignal362Library
:prepareComRomandanylykPageindicatorview020Library
:prepareCommon20171719DevReleaseLibrary
:prepareData20171719DevReleaseLibrary
:prepareList20171719DevReleaseLibrary
:preparePrimitives20171719DevReleaseLibrary
:prepareWidgetsReleaseLibrary
:prepareF0F1F2F3F4F5F6F7F8DebugDependencies
:compileF0F1F2F3F4F5F6F7F8DebugAidl
:compileF0F1F2F3F4F5F6F7F8DebugRenderscript
:generateF0F1F2F3F4F5F6F7F8DebugBuildConfig
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:setProperties
:generateTypescriptDefinitions SKIPPED
:copyTypings SKIPPED
:asbg:generateInterfaceNamesList
:asbg:traverseJsFiles
:asbg:runAstParser
Running full build
finished with reading lines with js files
:asbg:generateBindings
:generateF0F1F2F3F4F5F6F7F8DebugResValues
:generateF0F1F2F3F4F5F6F7F8DebugResources
:mergeF0F1F2F3F4F5F6F7F8DebugResources
:processF0F1F2F3F4F5F6F7F8DebugManifest
[com.onesignal:OneSignal:3.6.2] C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\build\intermediates\exploded-aar\com.onesignal\OneSignal\3.6.2\AndroidManifest.xml:52:13-48 Error:
Attribute meta-data#onesignal_app_id#value at [com.onesignal:OneSignal:3.6.2] AndroidManifest.xml:52:13-48 requires a placeholder substitution but no value for <onesignal_app_id> is provided.
[com.onesignal:OneSignal:3.6.2] C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\build\intermediates\exploded-aar\com.onesignal\OneSignal\3.6.2\AndroidManifest.xml:56:13-67 Error:
Attribute meta-data#onesignal_google_project_number#value at [com.onesignal:OneSignal:3.6.2] AndroidManifest.xml:56:13-67 requires a placeholder substitution but no value for <onesignal_google_project_number> is provided.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F0\AndroidManifest.xml Error:
Attribute meta-data#onesignal_app_id#value at AndroidManifest.xml requires a placeholder substitution but no value for <onesignal_app_id> is provided.
C:\Users\Rajdeep\Documents\aqua-app\src\platforms\android\src\F0\AndroidManifest.xml Error:
Attribute meta-data#onesignal_google_project_number#value at AndroidManifest.xml requires a placeholder substitution but no value for <onesignal_google_project_number> is provided.
> Building 67% > :processF0F1F2F3F4F5F6F7F8DebugManifest
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:processF0F1F2F3F4F5F6F7F8DebugManifest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processF0F1F2F3F4F5F6F7F8DebugManifest'.
> Manifest merger failed with multiple errors, see logs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 7.429 secs
Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1.
Please help me solve this.
Thank you..
There are two errors in your Gradle build:
Attribute meta-data#onesignal_app_id#value at [com.onesignal:OneSignal:3.6.2] AndroidManifest.xml:52:13-48 requires a placeholder substitution but no value for <onesignal_app_id> is provided.
Attribute meta-data#onesignal_google_project_number#value at AndroidManifest.xml requires a placeholder substitution but no value for <onesignal_google_project_number> is provided.
According to the onesignal documentation, you need to provide both of these in order to use the plugin - https://documentation.onesignal.com/docs/android-sdk-setup
So, you could include, in your app/App_Resources/Android/app.gradle the following:
android {
defaultConfig {
manifestPlaceholders = [onesignal_app_id: "PUT YOUR ONESIGNAL APP ID HERE",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
}
}
I have a multi-project with the following structure:
:very:bestappever
:bestappever-distrib
The SonarQubePlugin gives
:sonarqube
09:35:05.139 INFO - Load global repositories
09:35:05.252 INFO - Load global repositories (done) | time=114ms
09:35:05.254 INFO - Server id: 20160428045618
09:35:05.256 INFO - User cache: C:\Users\tk09\.sonar\cache
09:35:05.265 INFO - Install plugins
09:35:05.401 INFO - Install JDBC driver
09:35:05.414 INFO - Create JDBC datasource for jdbc:mysql://10.48.213.38:3306/sonar
09:35:06.456 INFO - Initializing Hibernate
:sonarqube FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sonarqube'.
> The base directory of the module ':very:bestappever' does not exist: C:\Workarea\verybestappever\very\:very:bestappever
You may note, that the full path of project ':very:bestappever' is inserted at the wrong place.
This may be related to https://jira.sonarsource.com/browse/SONARGRADL-12 from which I've adopted the bestappever example by moving the :bestappever project to :very:bestappever. You can find this example at https://github.com/ThiporKong/sonarqube-gradle-issue.
Am I missing something? Are there any configuration options that can be used to work with deeply nested gradle multi-projects? I've tried the proposals from Sonarqube how to configure gradle sub-projects correctly? but to no avail.
Thanks and regards,
Thipor
Problem also reported on SonarQube user group. A ticket was created (https://jira.sonarsource.com/browse/SONARGRADL-14) and a bugfix release 2.0.1 was deployed on Gradle plugin portal.
I tried to run the hello-slick template from inside Typesafe Activator.
When it recompiled it produced:
Refreshing list of source files to watch for changes...
[info] Loading global plugins from C:\Users\Edward G Prentice\.sbt\plugins\project
[info] Loading global plugins from C:\Users\Edward G Prentice\.sbt\plugins
[info] Loading project definition from C:\Users\Edward G Prentice\hello-slick\project
[info] Set current project to hello-slick (in build file:/C:/Users/Edward%20G%20Prentice/hello-slick/)
[error] Expected '"'
[error] apply -cp "C:/Users/Edward
[error] ^
Failed to reload source file list: sbt process never got in touch, so unable to handle request WatchTransitiveSourcesRequest(true)
so clearly it is not expecting spaces in that portion of the classpath. I understand what's failing but not how to fix it.
...and what is the best channel to resolve problems with Typesafe Activator?
when I am builting my project in NetBeans using Maven I get this warning message:
[WARNING] DEPRECATED [postinstallScript]: Use postinstallScriplet
[WARNING] DEPRECATED [preinstallScript]: Use preinstallScriplet
[WARNING] DEPRECATED [preremoveScript]: Use preremoveScriplet
I change
<preinstallScript>src/main/scripts/preinstall</preinstallScript>
<postinstallScript>src/main/scripts/postinstall</postinstallScript>
<preremoveScript>src/main/scripts/preremove</preremoveScript>
to
<preinstallScriptlet>src/main/scripts/preinstall</preinstallScriptlet>
<postinstallScriptlet>src/main/scripts/postinstall</postinstallScriptlet>
<preremoveScriptlet>src/main/scripts/preremove</preremoveScriptlet>
in pom.xml. Then I got this error:
[ERROR]BUILD ERROR
------------------------------------------------------------------------
Failed to configure plugin parameters for: org.codehaus.mojo:rpm-maven-plugin:2.0.1
(found static expression: 'src/main/scripts/postinstall' which may act as a default value).
Cause: Cannot assign configuration entry 'postinstallScriptlet' to 'class org.codehaus.mojo.rpm.Scriptlet' from 'src/main/scripts/postinstall', which is of type class java.lang.String
and project was not built. What's wrong with this?
Thanks in advance.
You probably need to use it like this:
<preinstallScriptlet>
<scriptFile>src/main/bin/preinstall.sh</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</preinstallScriptlet>
(as per: http://www.mojohaus.org/rpm-maven-plugin/adv-params.html )