Deploy IVY resolved war file to eclipse tomcat? - eclipse

I am trying to understand whether it is possible to have an eclipse tomcat runtime configuration that will publish the IVY resolved war files when tomcat is started?
I have created a tomcat server instance in eclipse and pointed it at a catalina configuration which includes a server.xml that specifies the contexts. For example.
<Context docBase="Module1" path="/Module1"/>
Module1 is a resolved war file and I have added the corresponding ivy.xml file to the eclipse tomcat classpath. I can see the war file has been resolved, but I assume I must have to do something extra to get the war files auto deployed on server startup?

Related

WAR file build in tomcat project

I have a traditional tomcat project configured in eclipse. I could run it successfully through eclipse by providing the tomcat configuration like below,
Window->Preferences->Tomcat
Provided the Tomcat home and configuration file tomcat server.xml file.
In server.xml file i have provided the context declaration details to access the application.
Now, i would like to build the WAR file for this project using eclipse or ANT. When i try to export the WAR file using eclipse, the module name for the project is not captured.
Could anyone please give me the suggestion to build the tomcat deployable WAR file for Eclipse->Tomcat project.
Thanks in advance..,

Difference between Tomcat war file and eclipse war file

What is the difference and similarity between war file which we are creating in eclipse and which we are creating in tomcat folder ?
war files are not generated by the tomcat. When web project build, war files are generated and it can be automatically deploy to the configured tomcat by in the eclipse.

Issue deploying EAR project from eclipse to EAP 6.2.0 using JBoss Tools Plugin

I have a maven EAR project, which contains a couple of WAR and JAR files. I'm using Spring STS IDE with JBoss Tools 1.6.0 (latest).
When I try to deploy my EAR to JBoss EAP 6.2.0 with JBoss Tools from STS i'm facing the following issues.
My Jars (external jars and project jar) are getting copied into WEB-INF/lib and EAR/lib, where i expected it to be only in EAR/lib.
EAR application.xml is not getting copied into EAR/META-INF/ folder
But when i use terminal to build my project and deploy EAR, i'm not experiencing these issue and JBoss starts without any problem
Here's its solved JBIDE-19047 The main issues are,
jars are getting copied into WEB-INF/lib due to skinnywar not supported by eclipse m2e-wtp plugin and this can be solved by adding <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes> in war plugin configuration.
application.xml not getting copied into ear/META-INF/ folder, if you have any unresolved dependency in any of the pom then this would occur, so make sure all jar dependencies are available.

tomcat7 web servlet wouldn't work

So I'm using eclipse and wrote 2 separate project. My servlet project is using the JAR file from the other project and it runs fine on the tomcat server built in to eclipse. However, if I package the servlet project into a WAR file and deploy it on the tomcat7 directly on my machine (not through eclipse), then it wouldn't run. I'm worried it might be some problem with the classpath. When I ran in eclipse, I had to manually went in RunConfiguration and add those jar files into the tomcat server classpath. How would I do that through command line?
You shouldn't mess with the tomcat classpath. Put the jar in the WEB-INF/lib directory of your war, as all the other libraries that your webapp uses.

Netbeans Maven project to IDEA 12

Short version: I would like to deploy Maven generated WAR to Local Tomcat server and not to build the war with internal IDEA process since the produced WAR file is not the same as the Maven generated one.
Long version: I have been using the Netbeans IDE for my Maven Java project. One of the modules is packaged as a WAR and should be deployed to tomcat server.
In Netbeans when I selected "Run" on the Web Module it asks for application server configuration then it runs the maven 'package' goal and deploys the application(generated WAR) to the Tomcat Server probably via Tomcat manager. So far so good.
We are now in the process of switching to Scala language. Scala classes extend old Java classes and the project is now "Mixed". I have configured Maven to compile the project as a mix of scala and java code. Maven produces a WAR which can then be deployed to Tomcat server without trouble - everything works as it should.
Now I would like to switch to Intellij-idea 12 IDE. But I have a problem: IDEA is refusing to deploy Maven created artifacts and insists of building one by it's own. The war is not the same and can't be used. Is there a way to tell IDEA to use Maven generated WARs and not try to make it's own ?
Just for the record I have already read these articles:
http://riddhimandas.com/blog/111
http://www.jetbrains.com/idea/webhelp/configuring-web-application-deployment.html Manually build WAR by IDEA - Want the maven generated one
IntelliJ IDEA: Maven, project compilation and deployment There is a hint here that IDEA can deploy Maven artifact from the 'target' directory but there is no information on how to do that.
With the help of CrazyCoder I figured it out.
You can make Intellij-Idea to upload your war by selecting External Source
But that's not all, even if you have a context.xml file difining your Context Root inside your WAR file: http://docs.oracle.com/javaee/1.4/tutorial/doc/WebApp3.html
You must specify one for every artifact you deploying (Unless someone will correct me)
The before launch section can be used to tell Idea what to Maven Goal to Run if any