Using Jboss with maven eclipse project - eclipse

I have create a maven project in eclipse .
I want to build my maven project using jboss and also debug it while running
Can any one share there code please on hot to use jboss with maven project.

Related

Want to run maven project in eclipse without WEB-INF\lib folder...how?

Working on Maven, spring project in Eclipse Mars using Hibernate on Tomcat 8. My project is running fine. I need to remove the WEB-INF/lib folder and make the project run? What are the steps to acheive it ?

How can I create a Java EE 7 application using eclipse and gradle?

I want to setup a simple Java EE 7 application in eclipse that gets built with gradle. My current tool stack is:
Eclipse Java EE 4.5 with Buildship
Gradle 2.5
Websphere Liberty Profile
Using Maven and Wildfly before, I did basically following steps:
mvn archetype:generate -DarchetypeGroupId=com.airhacks -DarchetypeArtifactId=javaee7-essentials-archetype -DarchetypeVersion=1.2
Create index.xhtml (facelet) in src/main/webapp
Add faces-config.xml to src/main/webapp/WEB-INF
In eclipse: Configure application server (wildfly)
In eclipse: Import existing Maven project into workspace
In eclipse: Deploy new application to server
How can I do the same using gradle?
Following steps allow to create a Java EE application in eclipse with buildship that can be build with gradle and that can be locally deployed to Websphere Liberty Profile (WLP).
Prerequisites:
Gradle properly installed and GRADLE_HOME is set.
Eclipse Java EE with buildship and WebSphere Developer Tools installed.
WebSphere Liberty Application Server properly configured (Server view)
Steps:
Create gradle project with the Gradle project wizard.
In build.gradle apply plugins war and eclipse-wtp.
<s>apply plugin: 'eclipse-wtp'</s>
apply plugin: 'war'
In build.gradle add dependency to Java EE 7.
compile 'javax:javaee-api:7.0'
Create file beans.xml in src/main/webapp/WEB-INF
Add src/main/webapp as source folder in projects 'Java Build Path' settings.
In Gradle task view: Refresh the view and run eclipseWtp and war task
Open properties of project and open Project Facets preference page: Set Version of Dynamic Web Module to 3.1.
Deploy locally to WLP and have fun.
If you want eclipse integration, download WebSphere Developer Tools (WDT) from wasdev. This will allow you to achieve steps 2,3,4, and 6.
If you haven't already, check out the wasdev github repository for gradle integration here: https://github.com/WASdev/ci.gradle . You'll want to clone this repo and then run gradlew build from the root directory of the repository.

maven and eclipse builds differently the same project

I have a java ear maven project.
When I publish the ear to jboss7 via eclipse it generates an ear and deploys it to jboss.
But when I manually run a maven build of the same project I get a different ear in size and also the name is different.
When eclise builds the project when executing "publish to server", doesnt it use the same build as maven?
I use eclipse juno and maven3. I'm new to maven.
Eclipse uses the .classpath to package the ear that gets deployed to jboss. When you do a manual maven build it is using the pom.xml file to package the ear. If those aren't in sync you could get differences in your ears.

missing jars when publishing a web app to glassfish with eclipse juno and maven integration

I use eclipse juno with GlassFish Server Open Source Edition 3(java EE6), m2e and maven 3.0.4.
When I create a war file by 'mvn package' command and deploy it to a glassfish,
the war file works just fine.
However, when I publish a web app to a glassfish from the server view of eclipse,
the web app fails.
I guess the reason of this failure is that publishing from eclipse is not configured correctly
to get jars from my maven repository and then jar files in eclipseApps//WEB-INF/lib directory are missing.
Can I configure eclipse to use a maven configuration when publishing a web app to a glassfish?
Thanks.
I found the answer
"anyway I solved the issue by adding following row Properties > Deployment Assembly: /target/myapp/WEB-INF/lib -> WEB-INF/lib"
in
Glassfish Deployment out of Eclipse Helios SR2 fails
Thanks.

Maven/Jetty to Maven/Tomcat Project

I have a project that I created with the Maven Archetype plugin and I added the Maven Jetty plugin so I can run the jetty server with "mvn jetty:run-war".
Now I have to change my project so that it integrates with Eclipse and Tomcat. I remember working on some projects which when I clicked the Tomcat button from the Sysdeo Eclipse Tomcat Launcher plugin, it would automatically compile the new code, deploy it to the Tomcat's webapp folder, and start the Tomcat server for you. Using tomcat also allows us to use the integrated Eclipse debugger.
How do I get that effect with my current Maven/Jetty setup without re-creating the entire project over again and starting it as a Tomcat project?
You can try using Tomcat Maven Plugin. It has similar goals to the jetty plugin. You just need to add the plugin configuration to your existing pom and make no additional changes.