How to convert a gradle based java app to maven app? - gradle

I have a gradle based java application designed based out of Netflix OSS. I want to convert the app to maven based.
Can anyone please help me to convert the app ?

It should fairly easy to achieve the same.
Maven and Gradle have a similar concept of dependency management.
The compilation and other stuff is similar.
Only thing which varies is customizability which gradle provides.
Following link should get you started:
http://www.gradle.org/docs/current/userguide/maven_plugin.html#sec:maven_pom_generation

Related

Gradle equivalent for Maven Java formatter that uses com.googlecode.maven-java-formatter-plugin

I'm switching a large project from Maven to Gradle. Existing Maven project uses com.googlecode.maven-java-formatter-plugin to format the Java code. Looked for the equivalent in Gradle. Found https://plugins.gradle.org/plugin/com.github.sherter.google-java-format, but it spewed a bunch of errors out, was really slow, and didn't generate the same output as the Maven plugin.
Also looked here: https://github.com/google/google-java-format - no help.
Is there a Gradle plugin which will give me same result as the Maven plugin?
There is this other Gradle plugin, which uses the Eclipse formatter. Maybe you can tweak it to achieve the same results as with the maven plugin you mentioned (I'm not using this plugin myself).
Note that it is an explicit non-goal of google-java-format and the corresponding Gradle plugin to be configurable. If you are not happy with the formatting style then this tool is probably not appropriate for you.
(if you have technical problems with my Gradle plugin, feel free to provide more details or open a ticket on Github)

Maven Support to web Application

I have a web Application ( its a .war file to be specific) to be deployed in run time.
The requirement is provide a Maven support.
My questions
1. What maven support means here?
2. Also how to achieve this in current web Application project
Thanks,
Faraz
P.S. I am totally new to Maven
Maven is project management tool, Maven provides developers ways to manage following:
Builds
Documentation
Reporting
Dependencies
Releases
It can do wonders in your project. You have to do a lot of reading in order to understand the features provided my maven. Maven's official site is the key for u.

Downloading Spring Jars without using Maven

How do you download Spring Framework jars if you can't stand Maven or any of the other build management tools. From what I can tell it seems you have to spend many frustrating hours on Google to find out how to do this. I thought Spring was supposed to be easy. All I'm trying to do is to write a simple Hello World application using Eclipse and Tomcat. Why is it so difficult with Spring 3?
go there
http://repo.spring.io/release/org/springframework/spring/
you can see all versions, like old school
Why can't you stand Maven? I like Maven, but I really like Gradle.
Either way, if you only build with your IDE, you can't automate your build (so no chance at continuous integration/delivery), and it's tough to integrate new members of your team. Specifically with this question about Spring dependencies, it is a lot easier to automate management of transitive dependencies rather than download them all yourself--and figuring out which new jars to download by tracing through one NoClassDefFoundError after another.
I think the Spring guys can't imagine why anyone would want to endure all these downsides. But it's your project and you should do what you think is right.
So if you must, grab the jars starting with this one from Maven Central yourself and have some fun.
That's funny. It seems everyone wants you to use a dependency management tool. You can always browse a maven repository and download the parts you need:
http://mvnrepository.com/artifact/org.springframework

Is Maven a framework that provides mainly an archetype like domain.controller-view in grails?

I´ve been reading lot about, but since there are several web frameworks that uses Maven for the project, I got confused, so I´m not entirely sure if Maven is an archetype that defines an schema to start developing apps by following good practices, or is just some piece of sdk that converts my code to bytecode. Thanks in advance to anyone who can drag me out of my confusion and gave me the required info. BTW is that rigth to say an archetype is a directory structure?
I am not sure if you are reading enough about maven, Maven is a build system which can help you build your application, manage your dependencies, run your tests, create reports and many other things.
First link in google result is http://maven.apache.org/
Apache Maven is a software project management and comprehension tool.
Based on the concept of a project object model (POM), Maven can manage
a project's build, reporting and documentation from a central piece of
information.
Each application has many dependencies and many small tasks that needs to be done before you can run your application, developers define them in a file called POM and that will be a instruction for Maven to build the application. Maven can do pretty much everything other than writing your code. In that sense it is like Genie in the story of Aladdin, you wish for something it will bring it for you.
There is a Grails maven plugin that can populate Grails project with the same convention that Grails uses. It can work with Grails to execute your commands and many other. More importantly it will manage your dependencies.

Noticeable projects in build tools ( ant , maven and gradle )?

I'm comparing ant, maven and gradle to suggest one tool to my project. I have found projects like hiberante, grails, groovy and spring uses gradle. But could not found any noticeable projects in ant and maven. Does anybody knows such projects ?
Also i would like read your comments on these build tools so I can choose the best one.
Thanks in advance
One prominent Open source project that uses Ant is Apache Tomcat. You can find their build script here.
Apache Wicket and Apache Camel come to mind as popular projects that use Maven.
As for Ant, I don't really know. Spring used to, but as you said it now uses Gradle.
Take a look at https://builds.apache.org there you will find many examples for all tools

Resources