How do I use an older version of SpringBoot on a project? - java

Recently I bought a course on Udemy of Java SpringBoot, and it requires the 2.3.4 version, but this version is not available anymore to create a project. I'm using IntelliJ IDEA Ultimate 2021.2.1.
I tried changing the pom.xml file but it didn't work out, as I got the error: "Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:2.3.4 in central".
So far, I tried changing the IDE for SpringToolSuite4 and asking for Maven to update the project and running mvn -U clean install, but still didn't work.
Is there anything I can do to fix this ?

Spring Boot Versions before 2.4.X have had been version definition like 2.3.4.RELEASE ... instead of 2.3.4.
https://search.maven.org/artifact/org.springframework.boot/spring-boot-starter-parent

Related

Java Spring Boot application doesn't run from IDEA due to kotlin error

I have a Java Spring Boot application which is coded purely in Java. When I try to run it from Intellij IDEA using run configuration, I get the following error:
Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
If I remove build step from run configuration, build using mvn clean install and then run the application, everything works fine.
I have tried changing Kotlin compiler settings in IDEA but the issue persists.
Intellij settings -> languages & Frameworks -> Kotlin -> change Update Channel to a new version
I had the same issue with running a spring boot application. For me pdating my IDEA to the most recent version (2021.1.1 Ultimate Edition) solved this issue with Kotlin for me.
intellij > preferences > plugins > Installed : "uncheck bundled kotlin"

Configuring maven with Anypoint Studio

I am trying to setup Anypoint Studio 6.6 on my MacBook, I have been using it on windows and it works fine. I have installed Java 8 and Maven 3.6.3 and I have also set up the environment variables so I can use java and maven on the terminal and the works good. On preferences, the Installed JREs and classpath variables are all pointing to the JDK but when I try to run a project with maven, I get the error - There was an error running the studio:studio goal on project projectname.
I updated the settings.xml as instructed by the documentation https://docs.mulesoft.com/mule-runtime/3.9/configuring-maven-to-work-with-mule-esb, but I am still getting this error. How can I fix this please?
Those instructions are to set Maven to work with Mule. You also need to point Studio to your Maven installation, which I suspect you already did. For the error related to studio:studio, you should have pasted the complete error in the question, however I guess you need to add the plugins repository: https://stackoverflow.com/a/24557069/721855

Cannot build JXBrowser jar with v6.18+

I am getting some errors that had been fixed according to the 6.18 release notes and was hoping to bump the dependency version to fix the issue, but when I mvn install the project now, I get a build error
Classes found in the wrong directory: {META-INF/versions/9/com/teamdev/jxbrowser/chromium/swing/internal/AWTHelper$1.class=com.teamdev.jxbrowser.chromium.swing.internal.AWTHelper$1, META-INF/versions/9/com/teamdev/jxbrowser/chromium/swing/internal/NativeLinux.class=com.teamdev.jxbrowser.chromium.swing.internal.NativeLinux, META-INF/versions/9/com/teamdev/jxbrowser/chromium/javafx/internal/NativeMac.class=com.teamdev.jxbrowser.chromium.javafx.internal.NativeMac, META-INF/versions/9/com/teamdev/jxbrowser/chromium/javafx/internal/dialogs/ColorDialog.class=com.teamdev.jxbrowser.chromium.javafx.internal.dialogs.ColorDialog, META-INF/versions/9/com/teamdev/jxbrowser/chromium/internal/JavaVersion.class=com.teamdev.jxbrowser.chromium.internal.JavaVersion, META-INF/versions/9/com/teamdev/jxbrowser/chromium/swing/internal/AWTHelper.class=com.teamdev.jxbrowser.chromium.swing.internal.AWTHelper, META-INF/versions/9/com/teamdev/jxbrowser/chromium/swing/internal/Native.class=com.teamdev.jxbrowser.chromium.swing.internal.Native, META-INF/versions/9/com/teamdev/jxbrowser/chromium/internal/X509CertificateFactory.class=com.teamdev.jxbrowser.chromium.internal.X509CertificateFactory, META-INF/versions/9/com/teamdev/jxbrowser/chromium/swing/internal/AWTHelper$InstanceHolder.class=com.teamdev.jxbrowser.chromium.swing.internal.AWTHelper$InstanceHolder, META-INF/versions/9/com/teamdev/jxbrowser/chromium/javafx/internal/Native.class=com.teamdev.jxbrowser.chromium.javafx.internal.Native, META-INF/versions/9/com/teamdev/jxbrowser/chromium/internal/OS.class=com.teamdev.jxbrowser.chromium.internal.OS}
I have cleared my maven cache and tried versions 6.18-6.20 but I can only build with 6.17 and below. My license file claims to work for versions 6.X, so I would assume that is not the issue.
Thanks!
Starting from the version 6.18, JxBrowser provides multi-release jars, so it is able to work with both Java 8 and Java 9. And it seems that the maven used to build the application does not support the MR-JAR's, so it generates a build error. So you need to upgrade Maven version.

Eclipse RCP: Required plugin could not be found

I am new to Eclipse RCP and plugin development so please don't be cruel.
I am using Maven and I have a remote repository. Yesterday Eclipse was fine but today it got messed up and I imported all the projects again so I reconfigured all but I can't get out of this problem. We use e(fx)clipse 2.5 but I installed the 3.0 version of it because I didn't find the link to install it via Eclipse.
Could you please tell me how I add a dependency? There is something that I am missing there?
Thank you
Adding the location http://download.eclipse.org/releases/oxygen/ to your target platform should fix the errors.

custom rules are not shown in the dashboard

I'm writing a custom rules for java, following the tutorial http://docs.sonarqube.org/display/PLUG/Writing+Custom+Java+Rules+101
I've build the maven project successfully, and moved the jar to the folder /extenstions/plugins/ ,and I restarted the sonar service, but I cannot find out the rule I wrote in the rules page.
I thought about I have the wrong version of the software. I've checked the version I use. sonarqube is 5.3, sonarscanner is 2.5, java version is 1.8, maven version is 3.0.5. I've downloaded the java-plugin-4.1.jar from the website and put it into the folder /extensions/plugins/
Finally Like Michael said the java-plugin version and the sonarqube version doesn't match very well. I upgraded the sonarqube and mysql, the rule finally come into effect. Thank you Michael.

Categories