When I try building pom.xml it only includes the dependencies in it. I want to generate a pom.xml automatically which can execute all these tasks when i do mvn install. These tasks are already defined by maven as it goals.
Corresponding to my gradle project, I need to generate target folder (that depends on pom.xml). So I need to generate pom.xml automatically so that it can perform all the tasks build.gradle is asked to do How can I achieve this?
I’ve just re-read your question and I think you want to generate a maven pom.xml not just for publishing (eg artifactory) but also so that you can build by maven command line?
Why do you want to build the same project with maven and gradle? Auto converting from gradle to maven is not trivial (often impossible). Gradle has many tools which aren’t available to maven.
The normal way for maven and gradle to interact is for a gradle build to publish artifacts which can be consumed by a maven build as dependencies (or vice versa)
At my workplace, in order to maintain same architecture all the project needs to be build using maven. If not possible to automate whole process, to what level can I convert my Gradle project to Maven project?
This seems like an odd situation… If you’re not allowed to use gradle, how come your project has a gradle build in the first place? Switching from gradle to maven is a step backwards IMHO. Or are you actually considering maintaining two builds for one project? This seems like lots of overhead for little gain.
If you really want to do this, you’ll need to do this manually, you can use the publishing pom.xml as a starting point. I highly doubt anyone will go to the trouble of automating this madness
Perhaps your looking for this maven plugin which simply invokes a gradle build?
I am a newbie to the project which is in middle of its completion. And I have been asked to disable its gradle properties and convert it to maven project only. I guess I will have to go through all the trouble of gradle to maven conversion manually.
You are probably best to ask these questions on the maven users list.
My guess is that you search for an equivalent maven markdown plugin, failing that you probably use the maven antrun plugin to fire off an ant task (assuming a markdown ant task exists)