Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

How to run spring boot /maven project without compiling it

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

i need one info. I have maven project which I am starting in Intellij and it runs ok.
How can I run this project from command line? If I do "mvn spring:boot run" it download me everything and create again new clasess (wsdl links in pom file). I do not want that as wsdl files are not ok and I need evrytime to do some manually work on classes to get everything working.

I also tried to do "mvn package" to get jar files but this also generate new classes from wsdl files.


thank you
miha


 
Saloon Keeper
Posts: 12876
279
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could consider first using the repackage goal to generate an executable, and then launch that executable using the exec plugin.
 
Saloon Keeper
Posts: 23514
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Once you've created a package with Maven for Spring Boot, it should exist as an executable JAR file in the project's /target directory. You should then be able to execute it directly from the command line without Maven using the java -jar target/jarname.jar command.
 
Sheriff
Posts: 22146
115
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

miha zoubek wrote:If I do "mvn spring:boot run" it download me everything and create again new clasess (wsdl links in pom file). I do not want that as wsdl files are not ok and I need evrytime to do some manually work on classes to get everything working.


That should be your first focus. A mvn clean package command should always succeed without any manual steps. If the WSDLs are incorrect, then download them, tweak them, put them in your repository (e.g. in src/main/resources) and link to the workspace location: ${project.basedir}/src/....
 
reply
    Bookmark Topic Watch Topic
  • New Topic