Implementing simple modules or extensions for axis2 as an eclipse project - eclipse

I wish to setup an eclipse project for implementing a simple module but not a service for axis. I wonder if there're any templates I could use?
Secondly, I would like to ask if there are any information sources such as links around on how to build complex Axis2 applications in eclipse mainly focusing on module building as well
I appreciate your hints.
Best regards,
Alex

I could come along with this issue with my own solution:
Using an customized build.xml based on axis2 module builds I am able to build a module project in Eclipse using ant. I trigger this via key shortcut.
The build.xml has an deploy.module target that puts the module back to the axis2 $HOME/repository folder. Running there ant build.xml will deploy axis2 at whole as an war-file (EAR) the module containing there within to be ready to deploy in a container such as jboss.
The eclipse project is based on common java project (no dynamic web project) containing the $AXIS2/lib in CLASSPATH.
Since Jboss supports hot deployment on update, you can run jboss in a terminal or withing eclipse. I customized the latter build.xml to support easy jboss deployment.
This is a good solution for me.

Related

Teaching Eclipse To Deploy an Ant Generated WAR File With JBoss Tools

I've been asked to migrate an older Ant-based web application. I'm building and trying to deploy using Eclipse Luna with JBoss Tools 3.0.1.Final. JBoss instance is EAP 6.3.0 (AS 7.1).
The build tool, like I said, is Ant. And when I run ant package, a valid WAR file is created at /target/foo.war
For some reason I'm having a heck of a time trying to explain to Eclipse and JBoss server that the foo.war file is what I want to deploy.
To this end I've:
Right-clicked on the project root and opened the Properties dialog.
Declared custom Ant builder for the project by going to Builders and adding an Ant builder and disabling the default Java builder.
Now Project -> Clean removes the target/ folder; Project -> Build results in a /target/foo.war file.
So far so good. At this point, I think all I need to do is declare that foo.war file as the Web Deployment Assembly? If I go to Web Deployment Assembly and click Add, then add the target/foo.war file, it tries to add it as a project library (i.e. WEB-INF/lib/foo.war). So clearly that's wrong.
I've also gone to the Server view, and tried numerous settings in the Deployment tab. The closest I've come to what I'm looking for is the Default Settings, but I haven't had any luck there, either.
(When I start JBoss via the JBoss Tools in Eclipse, then pull up the management console on port 9990, I can upload and deploy the WAR that way with no issues.)
I'm sure there's something completely obvious I'm missing. Could anyone help an IntelliJ user out? I have seen https://stackoverflow.com/a/4261178/3223711, but it seems to be missing the "last mile" in that the problem is not generating the WAR but in getting JBoss to actually pick it up and use it.
Thanks!
Since you are not actually not configuring the project to be a war project by Eclipse knowledge you need to tell JBoss Tools that you wish to deploy the specific war file.
To do this right click on the target/foo.war and select 'Mark as Deployable' - this tell JBoss Tools this foo.war can be deployed meaning you can now drag it to a server or add it via Add/Remove on the server.

Maven Eclipse Integration

I have recently started out on Maven. I am trying to integrate Maven+eclipse(Juno)+tomcat7.
I have downloaded m2e-wtp plugin for eclipse and created a Maven project whose structure follows a standard Maven project structure. It is also configured a dynamic web project.
It is a multi module project with two modules of flex(f1 AND f2) and one module of webapp(w).I have configured all the plugins correctly and there is no problem with configuration of POMs.
What I want to achieve is :
When I clean and Build project in Eclipse using Project-->Clean,Eclipse does not build the war in target folder of my web application project (w). I also does not copy any of the flex resources to target folder. However,
When I run the project as maven build by right-clicking the web application project and running it as a "maven install" it creates everything as expected.
My question is that if it is possible to achieve what I mentioned in point (1)? Or the only correct way to do this is the way mentioned in point (2).
I am also not able to deploy the generted files in step 2 automatically in tomcat.
Do I need to use another maven plugin for this?
Please note that this i my first experience with Maven + eclispe. I have followed certain tutorials. So, Please be lenient while voting negatively.
From what I know it is not possible to force Eclipse to use Maven directly (I would gladly be proven wrong).
Eclipse does not use Maven to build (1). Using the m2e plugin, it is possible to run maven to perform the build as you discovered (2).
If you are looking for that kind of tight integration you can look at NetBeans or IntelliJ who are using Maven natively.
EDIT:
About (3) there is a Tomcat-Maven-Plugin that can deploy the WAR file created on a running tomcat instance. Check the Usage page for more details.

slight url mismatch while publishing java 6 maven webapp to tomcat from netbeans

Honestly I've started this small maven webapp using eclipse 3.6 (STS) and i found it so complicated that i had to switch to netbeans.I really wanted to use eclipse but these are reality on the ground.So at the end of everything I'll like to have an eclipse version of the same project. thanks
I set up the maven webapp using the embedded archetype, and use cargo plugin to take care of the deployment.basically there is only hello world index.jsp in the project.after picking pom configuration here and there my pom finally is like this .
while it started publishing after i restart the IDE, it's publishing to http://localhost:8080/ but for me I'm expecting it at http://localhost:8080/mvnTestWebap
so here are my questions
Question 1 : How can i correct that?
Question 2 : I believe my pom is tied to netbeans too much, how can i achieve the publishing to tomcat result but having a portable pom?Can anyone suggest a rewrite that can run on eclipse?
Question 3 : what correspond to netbeans "run" in eclipse?
probably by some deployment descriptor editing.
don't really understand the point. by default netbeans uses it's own embedded IDE way of deployment. That's not creating a pom tied to netbeans in any way. You can use that in eclipse or IDE or command line to build the project. The deployment part of the web app is specific to the server being used and the IDE being used.
You can also tell netbeans to execute your cargo plugin on executing the Run/Debug/Profile action (bypassing the netbeans default behaviour)
run basically performs a redeploy of the app on the server of choice. There has to be an equivalent on eclipse.

Integrate War-Plugin for m2eclipse into Eclipse Project

I set up a small web project with JSF and Maven. Now I want to deploy on a Tomcat server. Is there a possibility to automate that like a button in Eclipse that automatically deploys the project to Tomcat?
I read about a the Maven War Plugin but I couldn't find a tutorial how to integrate that into my process (eclipse/m2eclipse).
Can you link me to help or try to explain it. Thanks.
I set up a small web project with JSF and maven. Now I want to deploy on a Tomcat Server.
During development I recommend to use Eclipse Web Tools Platform (WTP). M2Eclipse provides support for it (assuming you have Maven Integration for WTP installed) and your project should be recognized as a Dynamic Web Project runnable on a Server.
So, declare Tomcat as a Server (show the Servers view and right-click in it to add a Server via New > Server). And deploy your project to it (right-click on your project then Run > Run on Server).
There are other options like using the Tomcat Maven Plugin or the generic Cargo Maven Plugin but I wouldn't use them for development and, since you are a Maven beginner, I don't recommend them at all. Use your IDE.
I read about a the Maven War Plugin but I couldn't find a tutorial how to integrate that into my process.
Actually, the Maven War Plugin is only responsible of the packaging of your webapp project (it is bound automatically on the package phase when using a <packaging>war<packaging> for your project). It isn't used for deployment. But as I said, use your IDE to deploy your application during development.
The war plugin is for generating war files, not for deploying them. What you are asking for may be provided by the Cargo Plugin. Another interesting candidate for you could be the jetty-maven-plugin.

What IDE setup and workflow is used for OSGi development?

I made quite a few easy OSGi test projects in Eclipse RCP. My typical workflow would always be:
Make 3 different projects: APIproject, Clientproject and Serverproject
Edit the MANIFEST.MF of APIproject to export the api package
Edit the MANIFEST.MF file of Clientproject and Serverproject to add the required API package
Choose "Run as..." > "Plugin Framework"
OSGi console starts in eclipse and everything seems to work
I also tried wiring things by using Declarative Services, which worked well like this too.
Now recently I wanted to try out iPOJO. The problem is that I get the feeling that I've been doing my OSGi development the wrong way.
Can it be that I should instead make 1 project en make it work like no OSGi is involved. And then afterwards, just export each package to its own bundle by means of (for instance) the BNDL tool? Should development be done in a normal Eclipse (java, not RCP) or any other java IDE for that matter?
So that's why I have these questions:
What IDE setup is normally used to develop OSGi with iPOJO?
And what is the normal workflow to be used when developing OSGi projects (maybe with iPOJO)?
Normally when I develop OSGi bundles (not Eclipse RCP bundles) I use the following tools:
Maven 2 as the build system.
Apache Felix maven-bundle-plugin to generate MANIFEST.MF automatically.
Pax Exam to create integration tests that run inside an OSGi container.
Pax Runner to execute my bundles in any OSGi framework (equinox, felix, etc.).
IntelliJ (or sometimes Eclipse) as a standard IDE without any OSGi extras.
I have not yet developed any Eclipse RPC bundles, but there's a new tool for Maven 6 Eclipse RPC build integration called Tycho (http://tycho.sonatype.org).