I installed STS 3.9.9 in my eclipse and I made a Simple Spring Maven project, but it is empty. How can I get the proper template? - spring

I installed STS 3.9.9 in the eclipse and made a Simple Spring Maven project in the Spring legacy project folder.
However, it just creates a project with a file called MANIFEST.MF. It is missing the template that includes the src folder, web folder and etc.
How can I properly create a complete Simple Spring Maven project?
Am I missing anything?
Thank you,

Related

Generate mule_export.properties with Maven

I'm trying to set up IntelliJ to deploy Mule project that depends on a domain project, but the result builded by Maven does not have META-INF directory and mule_export.properties in it. However, the same build within AnyPoint Studio does produce these artifacts, which make the deployment successful.
Does anyone know how can I force Maven to create these? Either through Maven plugin or IntelliJ associations, as it seems that associations within IDE are the reason this is being produced by AnyPoint Studio.
I'm not sure why do you need the mule_export.properties. It seems to be only generated by Anypoint Studio when exporting a project. However I don't think it is used at all to deploy an application. Probably you are having a different problem. Usually that happens by differences between Maven dependencies and Studio build path.
What is the exact error you are having at deployment?

Convert dynamic web project in Java to Maven Project

I am using Eclipse Luna. I have a working dynamic web project. I need to convert this to a Maven Project.
However, creating a new Maven Project and copying the source files is not an option. Is there an easy way to do this in Eclipse?
Thanks in advance.
Project context menu -> Configure-> Convert to Maven Project.

Mavenizing Mule project from gradle

I am trying to move my Mule ESB project from gradle to maven due to test case issues. I understand I need to remove the .gradle file from the project and when I click on mavenize , nothing happens in Anypoint studio. Any suggestions ?
To mavenize your project you may use Eclipse because this IDE is best suitable with Maven. You'll need to download eclipse, and then add mule support in it. Follow this tutorial to do the same. After that import your project in eclipse and mavenize it. You make take help from this example by David Dossot, to configure a mule project with maven.
If you have AnyPoint Studio, you can create a Mule application and it will already be set up for use with Maven. I would then bring my application artifacts into the newly created project. This way you start with a fresh project that's set up correctly for Maven. Also, you will learn more about things by bring in your mule config, app properties, deploy properties, java classes, and tests into a correctly formatted project structure. You will leave any Gradle artifacts behind. I don't know what button you are clicking called "Mavenize" but Anypoint Studio will allow you to create a shell project that works with Maven. Just create a Mule Application project and copy/paste in the pieces from your existing application. Don't use Eclipse to set up a Maven Mule application project. That's backing up and not utilizing what's available to you.

Create a Mule deployable archive from a domain project using Maven

When I export my domain project from Anypoint Studio using the "Anypoint Studio Project to Mule Deployable Archive" option, there is a checkbox saying Export project associated with this domain
This will generate a zip file contain the domain project as well an apps folder containing deployable versions of the associated apps. I can then take this file and deploy it to the /domain folder on the server to deploy my entire Mule solution. Is there any way to generate the same thing from Maven?
When I run mvn clean package against the domain project it generates a zip file in the /target folder but this is missing the apps inside.
How can I generate the full archive using Maven?
(I am new to Maven so may just be missing a different goal I should be specifying or maybe there is a plugin I should use?)
here you will find documentation about how to create a Mule domain using Maven. You can also check this GitHub project which aggregates several Maven plugins and archetypes for Mule, in particular, pay attention to the Mule Domain archetype.
Regards.

m2e will not run on server [duplicate]

I'm trying out the next version of Eclipse using the latest milestone build and I'm having an issue getting my Maven project deployed to Tomcat.
Previously in Eclipse 3.6, my project was automatically enabled as a web project when checked out from SVN. I've checked out my project in 3.7 but get nothing indicating it's runnable as a web project (e.g. trying to run the project doesn't give me the usual "Run on Server" option).
What I've installed is Indigo RC4 "Eclipse IDE for Java EE Developers" version. I then added the latest M2E milestone from here. This enabled me to get up and running, check out my project and I seem to be able to build the project fine (which does create my .war file for remote deployment). Still no "Run On Server" options though.
Does anyone have any clues on what I could be missing? I'm guessing it's a Maven & WTP integration plugin but I haven't spotted the right one yet.
Before m2e became an eclipse project the WTP integration shipped with the core module. Now the core module is an eclipse module and the WTP integration is shipped separately. The current Indigo snapshots of m2eclipse-wtp can be found here. I was unable to get any artifacts from this update site however, even though it's listed in the corresponding JIRA issue.
Fortunately, today m2e-wtp was made available through the m2e Marketplace. Just open the eclipse preferences, go to 'Maven' -> 'Discovery' -> 'Open Catalog' and install it. .
It will work with the lastet version, it's just the .project that is not right.
Simply go into the project properties, make the projet faceted.. tick Dynamic Web Module and you'll get run on server as an option after that.
This will enable the "Run on Server" option, however your problems don't finish there as when you then run it, you'll get a 404.
To fix this, go back into project properties, Deployment assembly.
Delete the WebContent entry (and you can delete the folder in the project later too), and make sure you have the src-main-webapp & src-main-resource folders added.
Bingo.. run the app and it should be fine.

Resources