Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
Error occurs when creating a new application n try to download n build dependencies for the app. I Cannot resolve dependencies when creating a new spring boot application in intellij.
Resolve dependencies error
Cannot resolve org.apache.tomcat.embed:tomcat-embed-core:9.0.50
Cannot resolve org.springframework.boot:spring-boot-test-autoconfigure:2.5.3
Cannot resolve org.springframework.boot:spring-boot-test:2.5.3
Cannot resolve mysql:mysql-connector-java:8.0.26
Cannot resolve org.springframework.boot:spring-boot-starter-test:2.5.3
Cannot resolve org.springframework:spring-jcl:5.3.9
Cannot resolve org.springframework:spring-test:5.3.9
How do i solve these issues. Spring boot 2.5.3
You will have to go to your .m2 folder on your machine depending if you are using windows it should be in
C:/Users/username/.m2 and delete the content of that folder.
Of course, you need to be sure that you have dependencies in your pom.xml that are complaining about, if you do have all dependencies, you can go to the next step.
Go back to your IntelliJ and you can run two maven commands ( clean, install ), you can either run them from the terminal of your IntelliJ, or you can run them from maven UI which is located on the top right side of the IntelliJ, next to database UI.
try this two things
1> building project from console,if not work.
2> if it is a new project try to create project create project using spring initilizr
second approach is recommended.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
When I create a maven project on Netbeans 8.0.2 it gives the following error and the build fails:
No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\user1.m2\repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
How can I solve this?
Your version of NetBeans (8.0.2) uses bundled maven which doesn't support a new requirement of using https with the Maven Central Repository.
You can:
Update to NetBeans 11.0 LTS (or 11.2)
Download and install last version of standalone maven
Please, see the detailed answer here.
Check if your firewall is blocking to access the maven repo, and allow it if so. You can check this answer.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am creating a microservice to deploy on the cloud using Docker and Kubernetes. This requires code from multiple Maven Java projects that are not on any public repository. For example, the microservice project has a dependency on a analytics project which has a dependency on a model project. There is no inheritance between the POMs of these projects. Locally, the microservice Maven project builds successfully using the artefacts already in the local Maven repository. However, when I try to build a container from the microservice project, it fails because Maven in the docker build cannot find the analytics and model jars in the container's Maven repository.
What are my best options for making the model and analytics projects available to the image build so that I can build the docker image?
So the build within docker can't see the artifacts that are only installed in your local maven. If they logically fit together (i.e. they're only ever used together) then it would make sense to combine them into a single multi-module Maven build with a single parent pom. It sounds like this could be your situation.
Otherwise your best options are:
1 Host the artifacts that docker currently can't see in a public repo. If you have a nexus you can use you could install them there.
2 Build your jar outside docker and copy the artifact in. This means a change to your dockerfile and effectively a Maven pre-docker step in your build.
3 A variation on 2 but combine the Maven and docker steps with a Maven plugin. For example you could use the Spotify docker Maven plugin.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I want to port my plugin for JIRA to make it compatible with JIRA 7.4.x
When I change the version of JIRA to 7.4.1 in pom.xml I get the following compilation errors:
package com.atlassian.crowd.embedded.api does not exist
package org.apache.velocity does not exist
package org.apache.velocity.app does not exist
package org.apache.commons.codec.binary does not exist
class file for com.atlassian.crowd.embedded.api.Group not found
class file for com.atlassian.plugin.web.Condition not found
When I set the version to 7.4.2, I can compile the plugin, and also run it in JIRA without problems.
Here is a paste with properties and dependencies of my pom.xml.
What can we do to make the plugin also compatible with JIRA 7.4.1 ?
Thanks :)
I have started with atlassian plugins and development a while ago, and I think that some parts of those packages are added in 7.4.2, so they are not usable in 7.4.1 (this is my opinion). I can only give you my opinion since I've had the problems with atlassian sdk myself and had to solve them alone since the documentation on official atlassian is not so great.
I found this article and this one with the similar problem to yours, you can check it out since it's marked as "solved", hope it will help you.
I had to add <import-package> instructions in the maven-jira-plugin in my pom.xml to solve this.
Docu: https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins
Also this answer solved my further classpath / dependency errors.
I trying to create Gradle project to use with spring Boot in Eclipse in my organization network. But I am not able to create it It's giving me an error
"Exception in thread "main" java.lang.Error: Unresolved compilation problem:
SpringApplication cannot be resolved at com.vidya.BootGradleApplication.main(BootGradleApplication.java:11)"
Please help me to solve this problem. I have attached the Image for more understanding
For anyone else with this problem, here's something important that may help you.
"Eclipse does not automatically update the classpath, if the build.gradle file is updated. Select Gradle ▸ Refresh Gradle Project from the context menu of the project or from your build.gradle file for that"
From http://www.vogella.com/tutorials/EclipseGradle/article.html#updating-classpath-with-the-latest-changes-in-the-build-file
I am using Vscode and this problem wasted me for an hour.
The way to solve this bug in Vscode is just to restart Vscode so that it can update the project
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am very new to Maven. I have the following questions:
Do we need to create POM file our own?Do we need to understand POM file fully to use Maven?
We are mentioning Plugin in the POM. will that plugins only be downloaded by Maven when use Maven? or by default all plugins will be downloaded?
Please explain.
First you need to understand the pom content otherwise you are not able to influence the build process. The pom file should be created manually but there are some exceptions like Spring Roo which will create the pom but it's better to understand the pom to see if something is going wrong.
The plugins mentioned in the pom will be downloaded automatically by Maven but there are plugins which are by default in the life cycle which will be downloaded as well in contradiction to naming them in the pom file.
You need at least to understand some basics of Maven: dependencies, how to configure plugins, how to start a new POM (you can do this in IDE or create a project from an archetype), basic commands: mvn compile, mvn package, mvn install. If your only need is to build your classes into JARs, Maven configuration would be as small as a list of dependencies.
Everything in Maven is downloaded by default - all artifacts are being searched in Central and any other configured repositories. Once downloaded, they are stored on your machine at $HOME/.m2/repository.
Might be helpful: Maven Quick-start Guide.