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
Related
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.
I intend to run a simple Spring MVC application using Maven. When I try to perform maven clean / build, nothing runs on console instead it shows message as
" Projectname [maven build] ..[JDK path]/javaw.exe"
I have set valid JDK path in system env variables and in the eclipse.ini file. Please help as I can't find anything related to this problem on Google.
Please refer to the attached image for the error:
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.
I am trying to monitor kafka using KafkaOffsetMonitor tool. It is working fine as I used already built jar available at its github page. Now I want to make some changes in this tool but I dont know how to manually build it. I have downloaded the zip file from github page. Now how should I build it?
PS: Steps would be helpful
Below are the steps which may help you:
1. Checkout and get the source code into your local machine or you may have to unzip it if you have downloaded zip file.
2. Go to the folder which you have extracted or checked-out.
3. Run below command:
mvn clean package -U -DskipTests
Note: make sure you have installed maven in your machine.
Make the changes in the source if you want to modify the tool and build it using above steps.
I know that I'm coming at this pretty late, but I ran into the same problem. Basically, you need a Java jdk, scala, and sbt installed first. You didn't post what os you're dealing with, so it would be hard for me to give you steps for that. I use Gentoo Linux and you can install it by running emerge -av sbt
Once sbt is installed, just clone KafkaOffsetMonitor Github repository change to the top level directory and run the following sbt command: sbt assembly
The jar you will be looking for will be in: ./target/scala-<scala_version>/KafkaOffsetMonitor-assembly-<kafkaoffsetmonitor_version>.jar
I am newbie to GWT. I have built gwt maven project. To run in development mode, I first compiled project Google|Compile Project, then from command mvn gwt:run, it runs fine on
http://localhost:8888/index.html?gwt.codesvr=127.0.0.1:9997
but for production I want to access module
http://localhost:8888/index.html
When I omit gwt.codesvr= argument, I am getting error "gwt module may need to be recompiled". After Recompiling, I get the same error. Any help/pointer?
Thanks,
i run gwt project on tomcat on production mode. Jetty cant show it. Try to tun with external web module. When you are look at the IDE console title show us 'Development Mode'. Tyr with external , in any exception i can help.
You did it correctly, but as the error states, the module needs to be re-compiled (GWT Compiled). Once recompiled, Force your browser to reload (Ctrl + F5). If that doesn't work, you can look at this answer I wrote regarding cleanup of compiled output. Do what's listed there, and try running GWT compile again.
To run production mode outside Eclipse, you must do a GWT compile and create a WAR file, which you can then deploy on a Java application server such as Tomcat. This process is much easier with an ant build script.
To make an ant build script for your project:
You can easily create an ant build script by running the webAppCreator command from the directory where the GWT library is installed. That command will create a sample project just like clicking "New Web Application Project" in Eclipse, except it will also make a build.xml file.
You can run it in Eclipse by right clicking build.xml > Run As... > Ant build. By default it will run the build target. It also has a war target, which you can run to create a WAR file.
For more details on the webAppCreator, look here.