how to run a make command in spring boot eclipse - eclipse

i created a Makefile to generate migrations for database using this command
make makeMigration MIGRATION_LABEL="user-creation"
but i didn't know where to put it or how to use it in eclipse, could you show me the way please ?

Related

Running Maven commands on the command line in Eclipse

I am trying to use Maven to export my project into a JAR file, however I am also trying to export the dependencies as well and I am using the shade plugin, however I am wondering how exactly would I then run it?
I read I need to run "mvn shade:shade", however I don't exactly know where I run this? in the terminal I get 'mvn' is not recognized as an internal or external command, operable program or batch file.
So I don't really know where I am supposed to run this
Note: This solution assumes that your project is configured/imported as a Maven project.
Right-click the project in Eclipse. Select Run as > Maven build... > Goals, type package and then click Run.
Following best practices, you should not run shade:shade from the CLI (which you are actually doing with this approach), but rather bind the shade plugin to the package phase.
This link will explain how to do that, if you haven't already done it.

Eclipse How to create new run configuration with commands

I'm working on an Eclipse microprofile application, and I would like to create a run configuration that executes these 3 commands in order:
mvn clean package
mvn package
java -jar target/myApp.jar
How can I do this? I have this:
Where and how can I set what I want?
I'm not sure that from the m2 plugin, you be able to accomplish the task of running multiple maven goals within a single run configuration.
However, as a workaround, you can add a batch file within your maven project directory with the following entries
call cls
%cd%
call mvn clean install
call java -jar target/myApp.jar
Running the above script can help you with running multiple maven commands in a synchronized manner.
First, you have to create a Maven Build launch configuration for each of the first two commands. The third command (java -jar target/myApp.jar) can be done with an External Tools Configuration of the type Program.
Then, create a Launch Group with all these three launch configurations.

creating geoserver war by modifying source code

I am trying to build geoserver from source code with some changes.
I had installed the following for build and add to path in environmental variable:
"C:\apache-maven-3.5.0\bin; C:\Program Files\Java\jdk1.8.0_111\bin ;C:\Users\Administrator\eclipse\java-neon2\eclipse\eclipse.exe"
At command prompt to the path "C:\geoserver_build\src"(source code), I had run the following command and build successfully:
"C:\geoserver_build\src>mvn -DskipTests clean install -P allExtensions"
"C:\geoserver_build\src>mvn -DdownloadSources eclipse:eclipse"
After this I import the project in Eclipse and run the Maven build.
I navigate to gs-web-app > src/test/java/org.geoserver.web > Start.Java, after succesfull run as Java application start I am able to run http://localhost:8080/geoserver/web/ and its working fine.
I had made some change in geoserver and change an png with modification located at "C:\geoserver_build\src\web\core\src\main\java\org\geoserver\web\img".
Now I want to make geoserver.war file with change I had made.
I had gone through "Geoserver generate web archive file", but not helped out.
Please suggest me the way to do in detail.
The developers' guide does include instructions on how to build GeoServer using maven.
It should be as simple as:
mvn clean install -P allExtensions

Maven build on save

I just jumped into a webapplication that uses Maven. It's a project that's been around for some months now and a lot have people worked on it and left. So it's a mess and there hasn't been a lot of documenting around it.
So I've been trying to find my way around the project and something I've been running into is that I have to build 2 folders, move a file into the server folder to see the changes I've made. This is a slow and tedious process, so I'm trying to speed it up.
We are all using the Eclipse IDE and after I've done changes in the code I have to right click a the rootfolder > run as > maven build > goals: clean install. This I have to do for two folders.
Then I have to close Wildfly (the server app for the project) and move a .ear file from folder a to b and restard Wildfly to see my changes. As you can see this takes quite some actions so I'm looking for a method to automate this.
Is it possible to configure this in Eclipse or should I look into creating a .bat file that a user can run that performs the actions stated above?
Eclipse by default should build each class file as you edit it.
I would suggest running Wildfly within Eclipse. Take a look at JBoss tools for some better integration in this area. Once you have it configured to run within Eclipse then it should auto reload the files as you edit them - no need to even restart Wildfly.
I've created a batch file:
rem run a maven clean install
cd C:\Users\A647450\workspace\****\*****
call mvn clean install
rem run a maven clean install
cd C:\Users\A647450\workspace\*****\****
call mvn clean install
rem copy created EAR file to Wildfly folder
copy C:\Users\A647450\workspace\****\****\target\****-1.2.1-SNAPSHOT.ear C:\wildfly-10.1.0.Final\standalone\deployments\****-1.2.1-SNAPSHOT.ear /y
This does get the job done, but takes a while.

spring roo tutorial- undo perform eclipse command

I am following following spring roo tutorial
http://static.springsource.org/spring-roo/reference/html/beginning.html
My problem is I ran perform eclipse command without reading full paragraph before. Now, since I am already using STS, I was not supposed to eclipsify my roo project.
Now, how to undo perform eclipse command so that I can directly import the project.
The way that I reverted the perform eclipse command was by exiting roo and from the directory where project is I typed
mvn eclipse:clean
Try to import the project as a maven project directly, instead of importing a existing project.
If there is any problem with the imported project, try to update the project configuration from the Maven context menu (right click on the project. The exact name of the option depends of the version of the m2eclipse plugin that you have in STS: 0.12 or 1)
Since you are in learning mode and have just started, why not simply delete the current project and start over based on the tutorial?
All operations described before the "perform eclipse" command in the referenced tutorial can be completed in less than 10 minutes. That ways you also get to revise the top 5-6 commands of Roo which you just learned and get a clean setup (without any beginner frustrations)