Genuitec :: Driving Development for Leading Organizations › Support Forums › MyEclipse IDE › Maven for MyEclipse (Maven4MyEclipse) › Continuous Build with Maven
April 5, 2021 at 1:55 pm #672563
We currently have a project to use Maven to perform a continuous build of our codes maintained on Myeclipse/bitbucket.
The idea is to automatically create a EAR file on a MAVEN. Since Myeclipse IDE is able to generate this EAR file (but manually by our developer), is there a way that we can export the artefacts from Myeclipse to a standalone Maven (e.g. POI)?
In fact any guidance to help us set up the standalone Maven server from what we have in Myeclipse will be much appreciated.
CSApril 6, 2021 at 3:11 pm #672594
Do you already have the maven-ear-plugin in your pom.xml file (assuming your project is already a Maven project)? If that plugin is correctly configured, and your project is structured using Maven standards/best practices, executing the ear:ear goal for that plugin should generate the EAR for you.
MyEclipse creates the EAR using the Deployment Assembly you will find in the project properties, which can be quite different from what will happen with Maven, but that depends on both your project and deployment assembly changes you have made. We do not have a way to convert the deployment assembly settings into equivalent Maven configurations. We do have the reverse, where some parts of the deployment assembly will be updated based on your project’s pom.xml file – this is used when importing Maven projects into MyEclipse.
I would add the plugin to the project’s pom.xml, run the goal to generate the EAR, and gradually make changes to the plugin configuration and project structure until the EAR generated matches what MyEclipse generates / deploys.
I hope this helps, please let us know if we can provide further assistance.April 8, 2021 at 4:19 am #672618
We are totally new to this. Our project is not a Maven project. We like to take the creation of the EAR to a separate standalone server for CI purposes.
How complicated is it to move to a Maven project. We have a WEB and EJB module.
CSApril 8, 2021 at 3:04 pm #672632
It would depend on the complexity of your project; while it wouldn’t normally be difficult to move to a Maven based project, some Maven knowledge and fundamentals will be required. I would recommend that you start learning Maven basics if you do not already have experience with it. You can learn more advanced topics as you progress with the migration.
1) Moving all your projects (EAR, EJB, Web) to Maven would be the right way to achieve what you desire.
2) The best way to do this would be to create new projects using Maven (our Wizards will allow you to choose Maven when creating new project). Make sure you choose the correct version of Java EE and the Standard Maven JEE project structure (not the MyEclipse structure).
3) I would then copy your classes and resources into these projects, make sure they compile, and then run Maven goals that would create the EAR (or the WAR / JAR for the Web and EJB projects respectively). Move to the actual deployment stage after you find that the EAR being created matches the EAR that is currently being generated by MyEclipse.
Hope this helps.