Eclipse Jboss Tools - Deploying parent child project - java

I am new to jboss-tools. I am facing some configuration issues. I have configure jboss-tools and added wildfly 8.1 runtime.
I have one web application and many supporting java project. I have configured build path for the web application,added all the child projects in the build path.
Now I want to deploy them.
The problem is that child projects are deployed as "jar" files. They are deployed in web-inf/lib as jar file. I am unable to debug them.
I want to delploy them as exploded archive in the web-inf/classes.
Using the "Deployment Assembly" when ever I add a project, it is added as for example "abc.jar"
Please help.
Thank you,
Rashid

Deploying modules as exploded jars is a new feature in JBoss Tools 4.3.0.Final. From the release notes:
In Wildfly 8.2, support was added for exploded jar deployment inside exploded wars. This has allowed our tooling to support this use case as well. This new functionality will be very useful when creating a modular web application, with different parts implemented in separate projects. Hot deployment of resources such as Facelets' XHTMLs is crucial for rapid development and testing
JBoss Tools 4.3.0.Final is available in the Eclipse MarketPlace

Related

Eclipse JavaEE (Maven)project WAS 7 migration to IntelliJ

I'm trying to migrate a maven project from Eclipse to IntelliJ and would like to start/run/deploy to WebSphere portal.
My problem is that Eclipse IDE allows multiple open projects and one of the projects is an EAR that deploys a war file to WebSphere portal.
Eclipse Project structure:
Websphere Artifact deployed:
So how can I achieve the same thing in IntelliJ IDE using the already installed WebSphere?
I already configured successfully Websphere Portal and I can start the server but I donĀ“t know what type of artifact I'm supposed to configure here because there's no EAR artifact because that was a project back in eclipse:
If I go to artifacts setting for WebSphere I can add the war file, but it is not deployed.
I have googled a lot about this in IntelliJ documentation, IBM documentation but there are no concrete solutions, at least that I have the knowledge to implement. I'm a bit new to IntelliJ. Can someone share a light on this please, thx.
If it is a Maven-based project - just open and import it from the main pom.xml in IntelliJ IDEA - IDE will automatically configure project structure.
If Maven project has corresponding configuration for ear artifact - IDE will automatically create the artifact of the same ear type which then you will deploy to an application server.
If you do not configure ear in Maven, you can create one manually, see examples in documentation.
The name of your artifact is important, even if deployed as an exploded-archive. The file (archive) or directory (exploded) must end with .ear, .war or .jar. The default name set by Intellij may not work.
myProject_ear/ is wrong
myProject.ear/ is correct
The deployment system of your application server is likely configured to only deploy files or directories ending with the correct file-type. This is especially true if the server is using the file scanner to detect modules to deploy or un-deploy.

Is there a way to deploy a Maven project with "jar" packaging into Tomcat7?

My project generates a Jar as the output package and uses an external War file, available on our Artifactory, as the Web Application to be deployed on Tomcat (currently using version 7). This War file contains all libs and modules required for the application to run.
I have already packaged and ran those projects outside eclipse on a "vanilla" Tomcat installation. In this scenario, the Jar my project generates is loaded on the context.xml file this way:
<Loader className="org.apache.catalina.loader.VirtualWebappLoader" virtualClasspath="/home/igor/workspace/myapp/myapp-2.4.3.jar"/>
Is there a way I can deploy this project on Tomcat using Eclipse and still be able to debug it? Can I use the Jar generated for this purpose or do I have to deploy the workspace project?
As for the War file, do (or can) I have to add it as an dependency?
Thanks in advance!
EDIT
We actually provide an Web Framework, which is packaged as a war. Other applications that use that framework are exported as jars and loaded into the framework through the context file as cited above.
Your question is confusing probably because of your custom plugin/classloader and deployment which is sort of orthogonal to debugging.
What I recommend is you keep whatever system you have to build/package/deploy and use JVM remote debugging. That is do not use the Eclipse WTP since you seem to have custom steps for deployment but rather build your code deploy & run a separate Tomcat instance and then run the remote debugger in Eclipse.
You will get some hotcode swapping with this method but not as much as something like JRebel.. (which you could use also) it will certainly be better than constantly redeploying.

Eclipse build automatically to do maven build?

I have my main web application(has its own POM) that is dependent on module A((has its own POM).
When i make a build using mvn install on web application, it dependent modules
are also built in to jar file and ultimately included under WEB-INF/lib folder of main web app.
But that does not happen in when i make build using eclipse kepler (containing both maven projects i.e main web app and its dependent module A).
When building with eclipse, it just put the modified classes under moduleA/target/classes/ folder but does not make any updated jar file and put it
under WEB-INF/lib folder of main web app.
Is there a setting where i can configure eclipse building the project same way as maven does (which will really save lot of time and help in hot deployment) ?.
It used to work in one of my projects looks like some configuration is required for this.
looks like m2e connector(i have SonarQube) needs some configuration to make eclipse build in the same fashion as maven build
When i do the project > right click > mvn install , i am able to make jar file.
But what i want is eclipse build automatically option do
the build for project/module wherever modification is done , construct the jar and include it in parent WEB-INF/lib folder if it is dependent module ?
Assuming you're using the Java EE flavour of Eclipse, you can easily deploy Maven based web applications to a local server (like Tomcat, Wildfly...) from the server view.
m2e-wtp, included in recent Eclipse Java EE distros, takes care of configuring all Eclipse settings based on your project pom.xml configuration and dependencies.
See this screencast to see how simple it is : https://www.youtube.com/watch?v=TksoKkSP208
For the record, deployment/publishing is performed by each server adapter differently. They're responsible for publishing the proper jars under the WEB-INF/lib folder of the deployed application. Dependent jar projects are automatically zipped and deployed to WEB-INF/lib without user interaction

AppEngine Dynamic WebProject - Ear libraries not copied to War Project Web-INF/lib folder

I have a Ear Project which includes two Appengine Dynamic Web Project and one shared java project (which has common classes).
I have added shared java project to EarContent Folder through Deployment assembly settings in EAR Project and i can see the java project jar file in published folder under EarContent folder.
Now i wanted to use the Ear library in Dynamic Web Project, so i have added this library in MANIFEST.MF setting for both the project and at compile time i can access the class from shared project too.
The problem is when i publish it, i couldn't able to find the java project jar in Both Web Project, i have tried almost every settings but nothing was helpful.
Am using Eclipse Mars, AppEngine SDK version 1.9.10,
Does any one tried this, is there any possible solution for my problem. any thoughts or suggestion is highly appreciated.
Thanks!
It looks like the Google Plugin for Eclipse doesn't recognize anything in EarContent/lib (or whatever your EAR library path is) regardless of settings when packaging the WAR files for each Dynamic Web Project. The JARs need to be physically present in WEB-INF/lib for each Dynamic Web Project in order for the modules to deploy properly.
I would recommend opening a feature request in the official issue tracker here:
https://code.google.com/p/googleappengine/wiki/FilingIssues

Jboss Quickstart using Maven (jboss-as:deploy)

I am new to Maven, I am trying to go through the EAP(JBoss) clusterhasingleton quick start guide.
http://www.jboss.org//quickstarts/eap/cluster-ha-singleton/index.html
I can deploy the jar and everything works fine by running
mvn clean install jboss-as:deploy
I need someone to please explain what does "Deploy" mean in Maven/EAP as i have used JBoss 5 and deployment in that version meant copying the jar in deployments folder(i was using ant) where as i can't find the jar file in the deployments folder in EAP although everything is working.
I can see the jars in the local repository in .m2 folder and target folder in the workspace. How does Jboss know that is deployed? and does it look at the local repository and how?
Kind Regards,
Why does it matter?
In any case the maven repo is not relevant. In JBoss 5/6, placing applications in the "deploy" directory would indicate to JBoss that those applications should be deployed.
You can do the same thing in JBossAS 7.x (aka EAP 6) and WildFly 8.x using the "deployments" directory.
It's important to understand that deployments are not in-situ. The actual deployment is stored in a virtual file system. The deployment is written directly to this VFS when you use the maven tool.
The deployment process is much more than just copying WAR and EAR artifacts into the server. For instance, servlets, EJBS, JPA components, CDI components and other managed objects get wired up, validated and perhaps made available in JNDI.

Categories

Resources