Error When Putting Application in Production with Command - mvn spring-boot:run

Asked

Viewed 350 times

0

After generating the build which went all right, I am trying to run the command mvn spring-boot:run Inside a folder I’m only with the file comunicacaolegado-0.0.1-SNAPSHOT. jar

When executing the command it starts processing , but soon is giving this error below :

No plugin found for prefix 'spring-boot' in the Current project and in t he plugin groups [org.apache.Maven.plugins, org.codehaus.mojo] available from th and repositories [local (C: Users User.m2 Repository), central (https://Ref. m Aven.apache.org/maven2)] -> [Help 1]

I am struggling since 12:00 today and without success. Someone can give a help what I can do to solve this problem ? I am running this ,because I will put running the application on my computer same.

1 answer

0


After generating the build which went all right, I am trying to execute the command mvn spring-boot:run Inside a folder I am only with the file comunicacaolegado-0.0.1-SNAPSHOT. jar

When executing command: mvn spring-boot:run...

Maven first needs to find the file where the Maven settings for this project are located (pom.xml). Finding it, Maven will validate the syntax, apply its variable settings, configure standard plugins, configure new plugins, etc. When at the end of this process, everything is ok, Maven will know how to manage this project and asks the plugin spring-boot to execute the Goal run.

As in this folder you don’t have the file that guides Maven, he’s telling you: - Dude, you’re having this plugin run with this Goal, but I don’t have anywhere to start and I don’t know how to help you.

Now, assuming that your artifact (comunicacaolegado-0.0.1-SNAPSHOT.jar) follows the structure of a Spring Boot project and was "built" in the right way, just double-click on . jar and the project will execute (wisely with the S.O. configured for any .jar to be executed by the JRE), or, just open that your preferred command line program, enter the folder containing your . jar and run: java -jar comunicacaolegado-0.0.1-SNAPSHOT. jar.

Links:
https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-running-your-application.html

  • Bruno, the command you spoke of really worked. java -jar comunicacaolegado-0.0.1-SNAPSHOT.jar. I tried to use the mvn spring-boot:run anyway and it didn’t work. With the command you passed I did a test even on a remote client that is in another location and the application went up without problem. Thank you for your attention.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.