maven clover plugin java.lang.NoSuchMethodError:com_atlassian_clover.CloverVersionInfo.An_old_version_of_clover_is_on_your_compilation_classpath - maven-plugin

have somebody faced this issue with open sourced clover plugin for maven?
I'm trying to follow this instruction, but once I'm trying to run
mvn clean clover:setup test clover:aggregate clover:clover
I'm getting this error
[CLOVER] FATAL ERROR: Clover could not be initialised because of an unexpected error.
(class java.lang.NoSuchMethodError:com_atlassian_clover.CloverVersionInfo.
An_old_version_of_clover_is_on_your_compilation_classpath___Please_remove__
_Required_version_is___4_1_2()V)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.459 sec <<< FAILURE!
clover-mavan-plugin version: 4.2.1 / 4.2.0, java 1.8

The message states that there are unexpected Clover version in the runtime. It looks like you have duplicate Clover on your classpath, or other Clover version was used to instrument sources and other one is added in the runtime to classpath.
Check your pom for Clover dependencies and clover-maven-plugin.
Make sure you don't mix Atlassian Clover and OpenClover, although one being fork of the other one, you can't simply mix them.
Another explanation is that you duplicated Clover dependency (in different versions) made somehow to your project, but the solution is basically the same.

Related

How to make app compatible with Android 12 (Snow Cone)

I am trying to build my Ionic App to support Android 12. It works fine upto Android 11, but is not supporting Android 12.
==Supported credentials to Android 11==
package.json
“cordova-android”: “^9.1.0”
build.gradle file:
defaultBuildToolsVersion=“29.0.2”
defaultMinSdkVersion=22
defaultTargetSdkVersion=30
defaultCompileSdkVersion=30
config.xml file:
preference name="android-targetSdkVersion" value="30"
==Tried increasing sdk to 31==
package.json file:
“cordova-android”: “^10.0.0”
build.gradle file:
defaultTargetSdkVersion=31
defaultCompileSdkVersion=31
config.xml file:
preference name="android-targetSdkVersion" value="31"
added android:exported=“true” in MainActivity in ..\platforms\android\app\src\main\AndroidManifest.xml
Error :
FCMPlugin: Support for Gradle v4 or lower is deprecated. Please upgrade to a newer version.WARNING:: Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ and ‘api’.
It will be removed in version 7.0 of the Android Gradle plugin.
For more information, see Add build dependencies | Android Developers.
WARNING:: Using flatDir should be avoided because it doesn’t support any meta-data formats.
Task :app:processDebugMainManifest FAILED
…\platforms\android\app\src\main\AndroidManifest.xml Error:
Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See <activity> | Android Developers for details.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:app:processDebugMainManifest’.
Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See <activity> | Android Developers 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See Command-Line Interface
BUILD FAILED in 3s
15 actionable tasks: 1 executed, 14 up-to-date
Command failed with exit code 1: …\platforms\android\gradlew cdvBuildDebug -b …\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I have tried all forums and posts, nothing seem to works. Anybody has an idea on how to make this work?

Apache CXF Plugin 3.3.12 & 3.4.5 not working under Java 11?

I am trying to update my tool chain from Java 8 to 11.
Doing so I run into issues compiling WSDLs to java using the Apache CXF maven plugin.
I tried with the latest two available versions:
org.apache.cxf:cxf-codegen-plugin:3.3.12 and
org.apache.cxf:cxf-codegen-plugin:3.4.5
When I run the wsdl2java goal (phase generate-sources) it first seems to read all the WSDLs and XSDs ok but at the end it invariably ends in compile errors (see below). So it seems as if it generates code that can't be compiled under Java 11!?!
What dependencies do I need to add? Or what other steps are necessary to get this working again?
Error:
...
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/Projects/KStA_ZH_ZHQuest/code/application/zhquest-sam-web-service/target/generated-sources/cxf/ch/adnovum/nevisidm/ws/services/v1_37/AdminServicePortImpl.java:[10,17] package javax.jws does not exist
...
[ERROR] /D:/Projects/KStA_ZH_ZHQuest/code/application/zhquest-sam-web-service/target/generated-sources/cxf/ch/adnovum/nevisidm/ws/services/v1_37/AdminServicePortImpl.java:[14,22] package javax.jws.soap does not exist
[ERROR] /D:/Projects/KStA_ZH_ZHQuest/code/application/zhquest-sam-web-service/target/generated-sources/cxf/ch/adnovum/nevisidm/ws/services/v1_37/AdminServicePortImpl.java:[15,33] package javax.xml.bind.annotation does not exist
Note: I am aware of these threads: CXF codegen maven plugin doesn't work OpenJDK 11 and What dependencies do I need to run Apache CXF with Spring Boot on Java 11? but the dependencies suggested in either did not fix my issue.

Codename One Facebook/Android

Android build fails when I include the build hint "facebook.appId". iOS build works fine. Excerpt from the Android build log (I hope this is the relevant bit):
Merged dex A (41 defs/6.4KiB) with dex B (43 defs/53.5KiB). Result is
84 defs/71.7KiB. Took 0.2s Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define
Lbolts/AggregateException;
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lbolts/AggregateException;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
:transformClassesWithDexForRelease FAILED :transformClassesWithDexForRelease (Thread[Daemon worker,5,main])
completed. Took 2 mins 55.612 secs.
FAILURE: Build failed with an exception.
Any suggestions, anyone?
There is a conflict with the bolt jar facebook is including it and parse4cn1 is also including it.
Try to remove it by building the parse4cn1 without the bolts-android-1.2.1.jar file that is under the parse4cn1/native/android/ directory
Do you have leadbolts enabled in your project?
It looks like a conflict between leadbolts and facebook. Also try building with android.gradle=false and see if that works around the issue.

Android build fails in codenameone build sever

My android build fails after build and this is the error log i get
Total time: 1 mins 16.631 secs
Stopped 0 compiler daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':dexRelease'.] from daemon DaemonInfo{pid=5907, address=[10331ba5-2501-41cc-aa13-52a0ba46bd51 port:41817, addresses:[/0:0:0:0:0:0:0:1%1, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=2862cb6d-50e8-4321-a1fa-590435e89f0f,javaHome=/usr/java/jdk1.7.0_67,daemonRegistryDir=/home/ec2-user/.gradle/daemon,pid=5907,idleTimeout=120000,daemonOpts=-XX:MaxPermSize=512m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1500m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
This is probably related to this: https://www.codenameone.com/blog/video-new-defaults-barcode-qrcode-changes.html
You can workaround this by using android.gradle=false in the build hints. However, I'm guessing its related to some cn1lib or build hint you added. But it seems the build error log you provided is partial so I don't see any issue there.

m2eclipse - Mystery Build Failure on Package

I am using Eclipse 3.6 (Helios64) and m2eclipse 0.12.1.20110112-1712. I have a new project that only contains two classes that builds a jar. When I right click the project and select "Run As -> Maven package", I get the following error:
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # switch-provisioning-rest-client --- [INFO] Compiling 2 source files to C:\Devel\EclipseProjects\MyProject\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
javac: invalid flag: -s
...
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
When I set up a run configuration with the Goals "package -X", the project builds without error. If I run a configuration with the goal set to compile, it builds without error and I can then run "Maven package" successfully.
This is the only project I'm having issues with. All my other projects build sucessfully when doing a "Maven package".
There's nothing exceptional about the project pom.xml. It refers to the same parent pom as the other projects and contains its project specific dependencies.
Has anybody got any ideas what could be different about this project?
TIA!
This issue was answered on the m2eclipse mailing list:
http://dev.eclipse.org/mhonarc/lists/m2e-users/msg01818.html
Although my pom had 1.6 as the version, the project configuration hadn't been updated.
From: Benjamin Bentmann
This issue is not really specific to m2e but applies to mvn in general, as such the Maven user list might provide a better audience for help.
IIRC, the specific error means you trying to use a JDK 1.5 while you need JDK 1.6+ where the javac option in question was added. Assuming your project should actually compile against JDK 1.5, downgrading the maven-compiler-plugin version might also do, I would expect it started to use the -s option when the annotation processing support was added.

Resources