Jboss tools doesn't publish my jar project - eclipse

I have a problem with my eclipse (3.6, Helios) and my jboss tools plugin (3.2).
When I publish my war project with JbossTools in a jboss server, all jars in build path are publish in WEB-INF/lib directory on the server. It's ok for that.
But, I have several jar projects in eclipse linked to my war project. In the build path of my war project, these jars appear in the "Projects" tab, no in the "Libraries" tab. This works is normal but all projects in "Projects" tab are not publish in the server.
Someone can help me about that ?
Thanks.

For jar/wars you use the deployment/module assembly page in project properties.

Related

How to make M2E (Maven for eclipse) include required eclipse projects in WAR

I'm starting to use Maven (M2E) on Eclipse.
I have two projects
->Tools
->Main
The Main project requires the Tools project. I add "Tools" under the "Main"->"Deployment assembly" option, and when exporting to WAR, the WAR will automatically contain also Tools.jar. This is correct.
Now I installed M2E on the Main Project, to manage some spring dependencies. When I edit the pom.xml, Maven starts, and correctly downloads the Spring jars, but it removes the Tools project from the "Deployment assembly" option (it disappear from the org.eclipse.wst.common.component eclipse configuration file)
As a result, when I export the WAR from Eclipse->Export, the war will not contain Tools.jar, so the webapp will not work.
How do I configure pom.xml to do what Eclipse does with the "deployment assembly"?
That is, package all classes and resources and jar dependencies of the Tools project?
I think that I'm missing some understanding of Maven, but I've not been able to google about it?
thank you

Eclipse glassfish plugin not publishing maven dependency jars to ear lib folder

I'm using the Eclipse "Internal Glassfish 3.1.2.2" server with the Eclipse Glassfish plugin (http://download.java.net/glassfish/eclipse/juno). I'm also using Maven with the m2e Eclipse plugin. The Glassfish plugin correctly deploys my EAR modules to the Internal Glassfish, but it does not deploy my dependency jars, which I believe should end up in a folder called "lib".
I found a partial solution here, which is to add my maven target lib folder to the EAR Deployment Assembly (double-click in the Deploy Path box to edit). This works, but m2e (or m2e-wtp) undoes the config change when I do Maven > Update Project.
There ought to be a cleaner solution. The Eclipse Ear Module Assembly dialog has a field to name the "EAR library directory", so it's aware of the lib folder. Where does Eclipse EAR assembly (without Maven) look for jars to put in the lib folder? I assume the Glassfish plugin is looking in the same place.
You can use the following steps to find the source of the problem:
Take Eclipse out of the equation and build EAR on command line using Maven, does it turn out ok? If not, look for a solution in your pom.xml.
If ok so far, open Eclipse and perform Maven -> Update Project. Then export EAR using Eclipse (look for EAR export wizard under File -> Export). Did the exported EAR turn out ok? If not, file a bug report for m2e-wtp plugin. It is still pretty raw, so it wouldn't be surprising if it doesn't setup Eclipse metadata correctly in some cases.
If ok so far, then it is time to look for a problem in Glassfish plugin. I doubt that you will get this far, but if you do I will help you to follow up.

Automatically publishing maven project from eclipse doens't publish maven dependencies

These are the steps I followed:
Created a maven project in eclipse.
Converted the project into faceted form.
Added the project to the server.
Now whenever I make any changes to my project resources, it gets reflected in server. But my WEB-INF/lib directory doesn't contain any maven dependency jar files.
How to fix this?
If you use Eclipse WTP, Maven dependencies are provided by WTP to the application server using some kind of special classpath container (as you see it in your project in Eclipse). So they are not copied to WEB-INF/lib directory but rather somehow "injected" by the WTP extension. But if you build Maven artifact (mvn package) everything should be OK.
I installed m2e integration for WTP and now it is copying the maven dependecies jars into WEB-INF/lib of the server installed apps directory.

can not run webapp with skinny war dependency in eclipse

I have a maven web app project which has a dependency on a maven skinny war project.
Both projects, the main webapp and the skinny war project are in my eclipse.
Now when I run the main webapp in my original eclipse, where I built the projects, I can use my controllers from the skinny war project etc.
Now I installed the same projects on a different eclipse on a different computer. I can run the main webapp but the controllers from the skinny war are not available.
There is a difference in the target folder of the project between my original eclipse and the other eclipse instance.
folders in target folder in original eclipse:
m2e-wtp
war
...
folder in target folder in new eclipse:
m2e-wtp
Maybe it has something to do with this ?
Funny thing I found out.
When I close the project in eclipse, the controllers are available.
I somebody has the same problem. I installed the following eclipse plugin. Even though I did not install this one on my original eclipse. But it works now.
http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/

Can not run maven project in eclipse

We have existing maven project. I have imported it with m2eclipse plugin.But
I can not run the project. Tomcat can not see resources(WAR files under target folder).
What am I missing? BTW we have multi-module project(2 WAR files).
Thanks in advance!
You need to add the tomcat server in your eclipse.
The maven project should be a web based project
You need to add the web project to the tomcat server.
You need to add J2EE Module Dependencies - Eclipse 3.3 ( To enable all library dependencies to be available at runtime to tomcat). Paths that point to your m2 repo & the lib files.
It may be Java EE Dependencies in earlier versions.
Both your projects needed to be added similarly.