hot deployment of large codebase to weblogic 10.3 - eclipse

I have a very large code base whose build.xml consists of so many jar, some war files. One .class file may refer to more than one jar file. I manually compile the code and deploy the .ear file using Ant into weblogic 10.3 application server. But this compilation and deployment takes around 10 to 15 mins time. Is there any way to escape this part? Means, when I modify any java class from ide, it would generate a .class file in bin folder. Can I take all the modified .class files from bin folder and directly deploy them on corresponding jar files without doing server restart? Any help would be appreciated.
Thanks in Advance,

I recommend taking Ant out of your iterative development process. Since you are already an Eclipse user, install Oracle Enterprise Pack for Eclipse and deploy/run your app from Eclipse. OEPE will take care to do the minimal amount of work possible at deploy time for a given set of changes.

Related

Deploying a new version of WAR onto tomcat on eclipse

So I'm having this issue with eclipse and tomcat 6.
I am able to upload the first version of my war on eclipse using server(tomcat 6)->add resource, add all.
But then I tried editing some lines, and then run as maven clean->run as maven install, then clean, clean tomcat work directory, and restart the server, and it would not show me the reflected changes.
Any suggestions?
You clean your application, and executing an install, but seems you're not executing the build correctly. Ensure you're generating a new war file (take a look at the date of when it is generated to make sure you're deploying the last version). If your project has many modules, e.g: war and jars. Make sure you build the jars as well, and the jars are being replaced in the tomcat/libs folder or in your WEB-INF/libs, check the date of when are the depending jars generated too, then you can see the differences.
Best regards.

WAS related files getting packaged in ear

I have got an ear file to deploy on WAS. In the ear file, I see the war file, the jar files and other static stuff. But I also see files like variales.xml,security.xml and deployment.xml although the ant build script did not generate these files.
Where did these extra files come from? What purpose do they serve?
These files are part of a feature known as Enhanced EARs. See the WebSphere Application Server V7: Packaging Applications for Deployment redbook for more information. In short, application-specific configuration can be included in the application to minimize the per-server configuration that an administrator must perform when installing an application.

Deploy a War file with Eclipse and Tomcat 6 without a build file

I know there are a bunch of posts on this topic, but I can't seem to figure it out. Here is my setup:
- Eclipse Indigo
- Tomcat 6
- Struts WAR file that I imported into Eclipse from http://www.manning.com/dbrown/SampleApplication.zip
I added the server to Eclipse, and added the project to the server. It runs fine, but I'd like to make some changes to the XML and java files (not the jsp files). I was under the impression that Eclipse takes care of the deployment after I save and restart the server, but I guess this isn't the case. I looked into creating an ant file to do a custom build, but I'm not really sure how to make it since I don't even know how to do a deployment "manually". How would I go about doing a manual deployment? Thanks.
A war file is usually created by exporting it from an IDE like eclipse, netbeans, etc.
While generating a war file there is 2 options,
You can include your java files with it
You can avoid java files from it.
In both the cases class files will be there which are created from java files. Class files will be able to take care of the actions of java class.
If the war file which you down loaded is not having those java files, you will not be able to use it with eclipse, where as it will work fine if you are putting it into tomcat directory for running.
For running a war file manually just put it into tomcat webapps folder and run tomcat.
Then you can access the pages using the url.
http://localhost:8080/yourprojectname/
If you want to check whether the war file contains any java files, after starting the tomcat server it will extract the war file into the same directry, where you can search for java files.
If you want to run the project from eclipse,
import it into eclipse, open index.jsp page
right click-> run as-> run on server
if you have not yet configured the server yet,select the server in the list, specify its installation path, then add projects into server in next step, finish it. then it will load your project.
Please provide little more details so that we can help you better.
manual: copy the war in the tomcat folder then start tomcat.
if you want to use eclipse you need to click redeploy war first by right clickling the deployed war in the servers tab under tomcat.

Generate Jar in netbeans 7.1

I am using netbeans 7.1 (new to it). I would like to know how to export our projects as a .jar file (though I have searched a lot in Internet).
Many times ./dist folder itself is not created, even though it is created, I see only .zip files (not jar). It would be great if one can help me out in this aspect. Seems like in earlier version of netbeans, the jar would be available in ./dist folder.
Do this before search :) (right click the project > Clean and Build)
When you use the Clean and Build command, the IDE runs a build script that performs the following tasks:
Deletes any previously compiled files and other build outputs.
Recompiles the application and builds a JAR file containing the compiled files.
There is no difference in Netbeans 7.1, the jar will be in the dist folder :)

Custom Re deployments from My Eclipse IDE

Experts
When we redeploy any application from an IDE such as MYEclipse , it just redeploys the .class files. I want to customize the eclipse developer, so the deployer can also deploy the custom files (other than class files).
Should i write any custom ANT script for Myeclipse or any custom settings the My Eclipse provides us ?
IDEs along the classes and libraries usually deploy everything they find in the web / www-root folder (in the folder that contains the WEB-INF and META-INF).
So you can configure your deployed applications structure using the IDE by structuring the content of that folder.
If it still doesn't fit your needs, then ANT would be the best option.
In my opinion ANT is always the best option, but using the development environment's functionality is proven faster then writing an ant build file.
Say, if you're developing a web service, a web application consuming that service, and a library that both the service and the webapp uses, then with a single (and not even long or difficult) ant file you can build them, create the aar, war and jar files and deploy them all in their correct places, eg. under axis, inside the global lib folder, and in the webapps folder.
All these in one step.