I had completed my java ee application with postgres on my Windows development machine. Now, I would like to deploy it to CentOS linux.
However, the concept wasn't as straight forward as I think.
I had to export my project as .war file, then install Wildfly, install Postgres, setup Datasource in standalone.xml, then deploy in Wildfly Console. It seems too much work (especially setting up datasource).
I used to work with Ruby on Rails, where we have a git source control, and we just git pull on the server to deploy, but things don't seems that straight forward for Java EE.
Am i missing something?
Thanks
If your app is a Maven app, you can use the Wilfly Maven plugin to deploy on a Wildfly server running locally or on a remote server: https://docs.jboss.org/wildfly/plugins/maven/latest/
Here is an excellent blog post that describes how to configure your Maven settings and your pom: https://docs.jboss.org/wildfly/plugins/maven/latest/
Related
I'm using Intellij Community edition I don't have the luxurary of using the Ultimate edition; Hence, I can't install the weblogic plugin. When I make edits to any class file it will not hot deploy to the server. Is there a way to configure weblogic so that hot deploys are picked up.
WLS has FastSwap, which is a hot redeploy feature, although has some limitations, and probably not as good as the mentioned plug-in.
TL;DR:
To enable FastSwap in your application, add the following element to the weblogic-application.xml file.
<fast-swap>
<enabled>true</enabled>
</fast-swap>
more details at:
https://docs.oracle.com/middleware/1212/wls/DEPGD/deployunits.htm#DEPGD153
As an alternative you can try the Manik-Hotdeploy-Maven-Plugin
Manik-Hot-Deploy is an Open Source Maven Plugin which brings hot-deploy to the development of web applications. This is independent form your IDE or Application server. You just have to configure the target folders of your server.
I am using windows 7, an old version of Eclipse, Eclipse Java EE IDE for Web Developers. Mars.2 Release (4.5.2) and WebSphere Application Server Version 8.5.5.9 Liberty.
I am working on a pretty old codebase. Java 1.7 and configuration/library management tools like Maven or Ant is not used here. I used neither eclipse nor WebSphere before. So it is very confusing to me.
The issue is that whatever code, I update it doesn't reflect when try to debug my code. I tried clan build by eclipse as well as manually delete the build directory to make sure it is really clean. Still, my latest code change is not visible after deployed to the WebSphere Application Server. How can I see my latest code changed in the IDE?
UPDATED Question
In the WebSphere Application Server installation location there are following directory:-
bin,
clients,
dev,
lafiles,
lib,
templates,
usr
usr dir has subdirectory:-
.settings,
servers,
shared,
.project
Inside the servers directory:-
.classCache,
.logs,
myserver
This myserver directory is copied from one of my colleagues. I was told it is kind of WebSphere Application Server profile.
This myserver has the following subdirectory:-
apps,
config,
dropins,
logs,
resources,
tranlog,
workarea,
jvm.options,
server.env,
server.xml
I deployed the application from eclipse as Run As:-
Run on Server
The application is deployed at apps directory as Application-HEAD.ear.xml
If I open Application-HEAD.ear.xml file I can read
All my application submodule path is given there.
If I delete this Application-HEAD.ear.xml, it is generated as soon as I deploy from eclipse. But the problem still exists my code change is not reflected.
I have a server that it has weblogic on its own. I develop my program with intelliJ. Can I connect intelliJ to the weblogic server and just run and deploy the project from intelliJ (just like when we use Tomcat application server on our local and start/stop that with intelliJ)?
You indeed can. You can create a Run/Debug configuration for WebLogic same way as for Tomcat, but you might see it as an option only after you click N items more (irrelevant), which is at the very bottom of the list.
Also, this is supported only in Ultimate edition. If you're using community edition, you can't do that from the IDE.
The process of configuration is also described in Intellij IDEA's guides
Am getting into java web development and currently web server (tomcat) is running on the same laptop I use for coding. Now, I want to install FreeBSD on other computer, then install stuff like tomcat, some db server to learn more about unix and have a more real world environment. Idea is to have my laptop for coding (it uses win7 and InteliJ as IDE) and this other computer (freeBSD on it) for server side stuff. So my question is, how do I make this happen? Is there a way to connect intelij to that computer and have intelij acces its file system where my web related stuf would be stored. That sounds like a good way to do it. Give me some advice and pointers, Thanks !
Not sure if this is what you want.
IntelliJ will allow you to remote debug an application in the tomcat server. However to have IntelliJ reload the application to tomcat requires the ultimate edition of IntelliJ.
That said you can write scripts or use Maven (Ant or Gradle) from within IntelliJ to deploy your application to Tomcat, its more clunky than the remote deploy option with ultimate.
I have created an Java app on openshift platform with JBoss Application Server 7 and MySQL 5.5 using eclipse and Jboss Openshift Tools. Now I wannt to run this application on localhost but I am unable to find any option to do so.
I googled and followed some links and was able to create jboss-as-7.1.1 server but cannot figure out how to run the application using this server as there is not option to select a server in Run As window of eclipse. Do i need to modify anything in project settings?
Did you create a server adapter for your jboss-as-7.1.1 in Eclipse? I assume you did so it looks like your project is missing the required Eclipse WTP nature. Maven project (like any OpenShift Java app) get those for free if you have m2e-wtp installed. To me it looks like you're missing that one (and eventually possibly Eclipse m2e) and need to install it.
Either use the Eclipse marketplace or point Eclipse to the following update site:
http://download.eclipse.org/m2e-wtp/releases/luna/