showing maven plugin connector error while while importing spring boot initializer project to eclipse IDE - spring

Screenshot of the error which i have encountered
jdk 11 is installed in my system and added in the environment variable. Maven is also added in the environment variable.

Related

Set Environment variables for "Load Gradle Changes" of intelliJ

I am working on spring boot project which uses gradle script to build and IntelliJ as IDE for development. I want to externalize artifactory username/password from my build.gradle and gradle.properties. One such way is to use environment variables as given here: Build Environment Properties under heading: Setting a project property via an environment variable
I can access variables when I add them to respective task configurations for example build task and it run successfully. But I am facing issue when I make changes to build.gradle and Load Gradle Changes. Getting errors:
Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project.
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'password' for root project
My questions:
Which gradle task is run when I click on Load Gradle Changes.
So that I can add environment variables in this particular task's
configuration.
How can I add these variables only in one place instead of adding them for each task individually.
Configurations:
IntelliJ IDEA 2021.3.1 (Ultimate Edition)
Gradle 7.2
Build time: 2021-08-17 09:59:03 UTC
Revision: a773786b58bb28710e3dc96c4d1a7063628952ad
Kotlin: 1.5.21
Groovy: 3.0.8
Ant: Apache Ant(TM)version 1.10.9 compiled on September 27 2020
JVM: 11.0.2(Oracle Corporation 11.0.2+9)
This works for me. The environment variable defined in OS is respected when I Reload a Gradle project in IDE:
Make sure you have defined the environment variable properly. Double check it in OS terminal. Also do not forget to restart IDE after you changed the OS environment variables for the IDE to pick up the changes.

Packaging issue with Maven project in STS

I have set up one spring boot project at STS IDE .
Getting issue with maven read with JDK 1.8 java version
I have restart the IDE
Error - Project build error: Invalid packaging for parent POM
org.springframework.boot:spring-boot-starter:1.5.9.RELEASE, must be
"pom" but is "jar".

deployment error through maven using ----java jar <jarfile>.jar

I have created a Spring Starter data jpa project and its connecting with mysql. through STS its running fine.
i wanted to deploy it individually so i clean install the application using maven and used java jar <jarfile.jar> in command prompt.
I followed the video of java brains.
Below is the error which get
JAXB is not found.
It seems that you set the scope of the JAXB dependency to provided or built the project for an old Java Version (like Java 8) that comes with JAXB and run it with a newer Java version (like Java 10) that does not come with JAXB.
You can fix this by adding the JAXB dependency to the classpath when running the JAR or by adding the dependency to your project manually(or set the scope to compile)

Spring ROO build error: no tools.jar , jdk7, pom.xml

every pioneers,
I want to try to build Spring Roo 2.0.0.M2(http://projects.spring.io/spring-roo/) with its saying of STS 3.7.0 and JDK 1.7.0_45, and I couldn't find the solution even according the post on other sites or on " Builds failing after upgrading to Java7, Missing Tools.jar and bad class versions " .
The error messages on auto generated POM.xml are:
??????????????????????????????????????
You need to run build with JDK or have tools.jar on the classpath.If this occures during eclipse build make sure you
run eclipse under JDK as well (com.mysema.maven:apt-maven-plugin:1.1.3:process:default:generate-sources)
org.apache.maven.plugin.MojoExecutionException: You need to run build with JDK or have tools.jar on the
classpath.If this occures during eclipse build make sure you run eclipse under JDK as well at
com.mysema.maven.apt.AbstractProcessorMojo.execute(AbstractProcessorMojo.java:362) at
....
?????????????????????????????????????
Even I have tried: add JDK1.7.0_45 path but not JRE path in STS project, and even I added tools.jar directly in project build-paths, and even I use "mvn generate source" and add the generate jar into source path. The error about apt-maven-plugin:1.1.3 is still there.
Is there any person who can help? I will try to use old apt-maven-plugin latter.

Hudson build error: LifecycleExecutionException Unable to locate the Javac Compiler in

I created a dynamic web project in eclipse for a web service with axis2. I then converted it into Maven project, I'm able to compile and generate war file in eclipse, but when i deploy it on server and try to build it with Hudson-3.0.0 it gives me following error:
mojoFailed org.apache.maven.plugins:maven-compiler-plugin:2.3.2(default-compile)
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project WebServices: Compilation failure
Unable to locate the Javac Compiler in:
C:\Program Files (x86)\Java\jre6..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
Please Let me know what's wrong with it!
I have exactly the same problem, ever since I upgraded Hudson from 2.2.1 to 3.0.1.
Both JAVA_HOME environment variable and JDK in hudson configuration point to JDK and not to JRE.
If I run mvn compile in the workspace directory of the job, everything works well.
Looks like the hudson cannot find java_home.
In hudson settings java.home property is set correctly ?
Does any other java projects builds successfully ?
Did you do what the exception said yet?
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
Sounds like you don't have Java installed. So install it.

Resources