It's great to be able to use Quarkus on maven and gradle -based Java/JVM projects but what about projects that are built using other build systems like sbt or bazel or buck or anything else that's not a maven or gradle -based Java/JVM project.
I did hear about the command-line tool to do this, how far is the progress with this? Is there a way to get a sneak-peak!
For now, we don’t have plans to support other build tools. Supporting Gradle and Maven already has its fair share of challenges.
But contributions are always welcome.
Related
I would like to automate few applications. This application consist of web, mobile (Android + IOS) and API. How to organize this project for this situation.
Im automation in selenium using Java. In C#, once can create a project consists of multiple sub projects. How to do it in Java?
Please advise.
A billion thanks for your help.
It depends on which build automation tool you choose to work with.
When you work with C# you probably use MSBuild
In Java Stack the most popular build automation tools are maven and gradle and both support multi-module projects, It is up to you to choose which one suits your project requirements.
See
Gradle vs. Maven
Multi-Module Project with Maven
Introduction to Gradle
Maven Scopes and Gradle Configurations Explained
I am not 100% sure what your goal is, but when it's about setting up Selenium (JAVA) projects and run them automatically, I can recommend you to use Maven & Jenkins to achieve this goal. Find further information in the following link:
https://www.guru99.com/maven-jenkins-with-selenium-complete-tutorial.html
I hope I could help.
I have a legacy java project build with ant, and i need to migrate it to gradle using eclipse.
The thing is that I need to migrate all the project, not only convert the ant targets to gradle tasks.
My question is, where do i start? there's a list of steps to follow?
Have you tried it step by step according to this https://docs.gradle.org/current/userguide/migrating_from_ant.html instruction? There are a lot of examples and it looks pretty clear
So I installed Apache Netbeans. Installed some of the plugins and instead of just seeing the Java folder in the categories when I want to create a new Project, I see this:
What is Gradle, Ant, and Maven? I am not familiar with Java and wanted to study the language, but I have no idea of what these are.
I keep seeing that I need to have certain plug ins installed and active.
Here they are.
Ant, Maven and Gradle are Java build tools. You don't really need to know the exact differences though.
Java with Ant
The "Java with Ant" option uses NetBeans' own internal project format (based on Ant). In older NetBeans versions this category was simply called "Java"
If you don't need to share your project with non-NetBeans users, use that option.
You will have to manage dependent libraries yourself (download, add them to the project) unless you are only using libraries and frameworks that are bundled with NetBeans. The turnaround times (the time it takes between you hit "Run" and the application actually starts) are the shortest with this option, as Maven and Gradle add substantial overhead to that.
Java with Maven
Maven is a standardized dependency and build management tool. A project defined with Maven can be used by everybody else as it automatically manages (and downloads) any dependency.
Use that option if you know you need to share your project with other people (e.g. hand it in your school or university).
Java with Gradle
Gradle is yet another build tool, which also manages dependencies for your and has more flexibility than Maven. However the build scripts are less standardized than in Maven. But that is also a good option if you know that you need to share your project with other people.
Unless you are using NetBeans 11.1 (which is currently in Beta) I would not use this option as Gradle support in older versions is not as good as Ant or Maven support.
You might want to go through the tutorials on the NetBeans homepage:
http://netbeans.apache.org/help/index.html
We have a complex Java Project with many processes/applications. Planning to move from Ant build to Maven or Gradle. Trying to compare the migration process to maven and gradle. Any thoughts and advice? Thanks,
Gradle is your choice. In the future if you want to migrate your app to android, it would be much easier since android studio uses gradle. Also gradle uses groovy, a powerful script language and you can add any java code in your build.gradle.
Disclaimer: This is my personal view, and I am not associated with gradle or maven.
Currently, my built structure for a plugin in is a bit messy: I'm using the normal IDEA project file to build the plugin locally. When I push it to the repo and travis-ci is building it, it uses the maven pom.xml because for travis to work, it always has to download the complete IDEA sources.
Although this works, this has several drawbacks:
I need to keep two built mechanisms up to date. This is
When a new IDEA version is out (every few weeks), I need to change the SDK in maven and in my IDEA settings
When I add a new library, change resources, etc. I need to do this for two the two settings as well
I ran into problems when I kept the IDEA Maven plugin turned on because it saw the pom.xml and interfered with my local built. Turning it off means, I cannot download libraries with Maven which has the feature of tracking dependencies.
I saw that Gradle has an 'idea' plugin and after googling, I got the impression that Gradle is the preferred choice these days. I have seen Best way to add Gradle support to IntelliJ IDEA and I'm sure I can use the answers there to turn my pom.xml into a valid build.gradle.
However, maybe someone else has already done this or can provide a better approach. What I'm looking for is a unified way to build my plugin locally and on Travis-CI.
Some Details
For compiling an IDEA plugin, you need its SDK which you can access through an installation of IDEA or a download of the complete package. Locally, I'm using my installation for the SDK. With Travis, my maven built has the rule to download the tar.gz and extract it.
It turns out that in particular for building an IntelliJ plugin, Gradle seems to have many advantages. This is mainly due to the great IntelliJ plugin for Gradle which makes compiling plugins so much easier. With Gradle, I could turn my >220 lines of Maven build into a few lines of easily readable Gradle code. The main advantages are that
It takes care of downloading and using the correct IDEA SDK while you only have to specify the IDEA version.
It can publish your plugin to your Jetbrains repository and make it instantly available to all users
It fixes items in your plugin.xml, e.g. you can use one central version number in gradle.build and it will keep plugin.xml up-to-date or it can include change-notes
It seamlessly integrates with Travis-CI
How to use Gradle with an existing IDEA plugin
Do it manually. It's much easier.
Create an empty build.gradle file
Look at an example and read through the README (there are many build.gradle of projects at the end) to see what each intellij property does.
Adapt it to your plugin by
Setting the intellij.version you want to build against
Setting your intellij.pluginName
Define where your sources and resources are
Define your plugin version
Define a Gradle wrapper that enables people (and Travis) to build your plugin without having Gradle
Create the gradle wrapper scripts with gradle wrapper
Test and fix your build process locally with ./gradlew assemble
If everything works well, you can push build.gradle, gradlew, gradlew.bat and the gradle-folder to your repo.
Building with Travis-CI
For Travis you want to use the gradlew script for building. To do so, you need to make it executable in the travis run. An example can be found here.