Can maven create a project from a war file? - maven

I want to create a adobe flex blazeds project. How can I create the project using the blazeds.war as the project template ?

war -> maven
you can't do that, there's no way maven can guess how the war was produced only by analyzing the result
generating a project stub for blazeds
that you can do. You can used a defined archetype like this one: http://code.google.com/p/maven-blazeds-spring-archetype/
it will force you to stick to the technology (spring) chosen by the archetype developer, however.

Related

How to convert spring based java project into maven projects?

I am planning to convert my spring based java project into maven project, so in this conversation what kind of project structure and configuration I should follow
You need to figure out the dependencies of your project and it would be better to unify them through either ready made BOM or you create your own
Maven BOM
To facilitate code organization, it is advisable to use multi-module projects
Maven multi-modules tutorial

how to add jar creation to J2EE web project

I am a newbie with maven, I created a dynamic web project in eclipse and then converted into maven project.
Instead of deploying the project in a standard container I would use embedded jetty.
How can I create in maven the appropriate jar executable with all dependencies included?
Thanks
Roberto
Found solution by myself at
http://blog.anvard.org/articles/2013/10/09/embedded-jetty-executable-maven.html
Basically we can add as many maven plugin as we want, adding dependencies and then packaging all togheter.

How can I create web fragment project in Intellij Idea

I'm looking for creating a small web framework on top of the standard servlet-3.x specifications. Main motive is to reduce the boiler plate codes and abstractions. After I read the servlet specifications it looks without using JAX-RS or SparkJava I can create small web framework for API developments.
I'm planning to use the web-fragments method to create my framework level filters, and other beans and package it as jar. So application developer create the war project with web.xml with the metadata-complete option set to false.
I can see the web-fragment project template in eclipse but I want to develop this project using maven. With Intellij I can't see any such options for web fragment projects alone. I want to create simple maven project which ship the jar with web-fragment.xml in it, so other war projects can make use of it.
So is there any plugins or other options available to develop web fragment projects in Intellij ?
Any jar file added to the WEB-INF/lib directory of a web application is technically a "web fragment", whether it has a META-INF/web-fragment.xml file or not.
Therefore, you just need to create a maven project with "jar" packaging and import it into Intellij Idea.
Create a maven project for the fragment. Set the packaging to jar. There is no need to create a war project.
Configure an empty Artifact in the Project Structure dialog:
Using the toolbar buttons, add the WEB-INF/lib folders. Then create an Archive and add the compile output:
Add a Tomcat run configuration, and in the Deployment tab, add the Artifact you just created:
I created an example project that includes all that: https://github.com/ThomasR/web-fragment-idea. Please note that it requires TomEE+.

how to generate .exe file using maven for RCP plugin project

I have created one RCP Plugin project and converted it into maven project.
I have to generate .exe file for this project using maven.
The problem is that this RCP project not have main method.
Please share how to to do this.
See the tutorials at the Code & Me blog. They take you from the basics of building a single plugin with Maven Tycho to building more complex artifacts such as products (which include the .exe), update sites and the like.

How come my spring mvc web app works without pom.xml?

I have removed pom.xml from my eclipse project folder.
And I choose run on server option and everything works fine.
I am new to Spring MVC and have been given this project as an interview round.
Spring version 4.0.6, Tomcat 7, Eclipse Juno
Any help here is appreciated.
pom.xml is the build configuration file for the Maven building tool, Using Maven is optional as you can use any building tool of choice, for example Ant, Maven, Gradle ... etc
The idea behind this build configuration file is that you can define all your dependencies of your project (Spring, Struts, Hibernate, ... etc), source code repository, test cases classes, war file generation info, any other configuration for your project. and If you want to give me your project, you could only give me that pom.xml, and I would simply run maven on this file, and it will download your source code and dependencies, run test cases, build war file and deploy it on application server.
For more information, check the POM reference here
pom.xml is a maven configuration file. You don't need it to run a Spring MVC application.
Having said this, sin maven is what you usually use to build a project, you are not going to be able to build it again if you removed the pom.xml file.
Possible reasons:
You did not reference any Spring MVC class in your Web Appliction
Your Tomcat already has the Spring MVC in its libraries
Spring MVC libraries are copied in your Lib folder of your Web project, so they are carried along within the war (or exploded by the Tomcat plug-in for Eclipse).
As Pablo pointed out, you do not need Maven to add dependencies to your projects.

Resources