Gradle build.gradle to Maven pom.xml

Since Gradle 7, when using Gradle’s Maven-Publish plugin, publishToMavenLocal and publish are automatically added to your tasks, and calling either will always generate a POM file. So if your build.gradle file looks like this: plugins { id ‘java’ id ‘maven-publish’ } repositories { mavenCentral() } dependencies { implementation group: ‘org.slf4j’, name: ‘slf4j-api’, version: ‘1.7.25’ runtimeOnly … Read more

What is under in pom.xml for?

The <scope> element can take 6 values: compile, provided, runtime, test, system and import. This scope is used to limit the transitivity of a dependency, and also to affect the classpath used for various build tasks. compile This is the default scope, used if none is specified. Compile dependencies are available in all classpaths of … Read more

Missing artifact com.microsoft.sqlserver:sqljdbc4:jar:4.0

UPDATE Microsoft now provide this artifact in maven central. See @nirmal’s answer for further details: https://stackoverflow.com/a/41149866/1570834 ORIGINAL ANSWER The issue is that Maven can’t find this artifact in any of the configured maven repositories. Unfortunately Microsoft doesn’t make this artifact available via any maven repository. You need to download the jar from the Microsoft website, … Read more

What is pluginManagement in Maven’s pom.xml?

You still need to add <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> </plugin> </plugins> in your build, because pluginManagement is only a way to share the same plugin configuration across all your project modules. From Maven documentation: pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except … Read more