- Gradle
- Maven
- SBT
- Make
- CMake
- Bazel
Last active
October 4, 2019 21:30
-
-
Save vkroz/874872f8153eec918673d149af349d31 to your computer and use it in GitHub Desktop.
Build Tools
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<outputDirectory>
${project.build.directory}/lib
</outputDirectory>
</configuration>
</plugin>
mvn dependency:build-classpath
mvn dependency:copy-dependencies
mvn dependency:resolve -Dclassifier=javadoc
mvn dependency:resolve -Dclassifier=sources
or
mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc
mvn source:jar
mvn javadoc:jar
To include in build process (package phase): http://maven.apache.org/plugins/maven-javadoc-plugin/usage.html
mvn dependency:tree -Dverbose
mvn dependency:tree -Dverbose -Dincludes=org.slf4j
To see what POM is actually executed by maven
mvn help:effective-pom
http://blog.brickcitylabs.com/2012/02/hosting-maven-repository-on-amazons-s3.html https://github.com/spring-projects/aws-maven
mvn install -DskipTests
mvn install -Dmaven.test.skip=true
- Get gradle:
brew install gradle
- Get gradle wrapper helper:
brew install gdub
(Use thisgw
tool instead of./gradlew
. See https://github.com/dougborg/gdub)
- New project
gradle init
- List available tasks
gradlew tasks
- Build skipping tests
gradlew build -x test
- Transitive dependencies
# View all of them
./gradlew :dependencies
# Analyze dependency 'commons-codec'
gradle -q dependencyInsight --dependency commons-codec
gradle -q dependencyInsight --dependency commons-codec --configuration compile # other configurations: runtime, compileTest etc
- Exclude transitive dependency from build
For example, here we exclude 'org.slf4j:slf4j-log4j12' from classpath to enable log4j2
dependencies {
compile('org.apache.spark:spark-core_2.12:2.4.1') {
exclude group: "org.slf4j", module: "slf4j-log4j12"
}
compile('org.apache.spark:spark-sql_2.12:2.4.1') {
exclude group: "org.slf4j", module: "slf4j-log4j12"
}
...
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment