Skip to content

Maven plugin that outputs dependency information suitable for bash script to download

License

Notifications You must be signed in to change notification settings

dernasherbrezon/deps-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deps-maven-plugin .github/workflows/build.yml Quality Gate Status

Maven plugin that outputs dependency information suitable for bash script to download. This is reasonable tradeoff between creating fat jar and installing full jdk, maven with ton of dependencies.

configuration

Parameter Default value Description
repositories ${project.build.directory}/repositories.txt file with repositories used by project. Every repository on separate line.
dependencies ${project.build.directory}/dependencies.txt file with dependencies and transitive dependencies. Every dependency on separate line. Format suitable for download. I.e. ```/com/example/artifact/1.0/artifact-1.0.jar```
script ${project.build.directory}/download-dependencies.sh script that could download dependencies from repositories. no maven required.
excludes List of artifacts to exclude. This is very useful to exclude artifacts from the private repositories. The pattern follows maven assembly plugin

sample configuraiton

<plugin>
	<groupId>com.aerse.maven</groupId>
	<artifactId>deps-maven-plugin</artifactId>
	<configuration>
		<repositories>${project.build.directory}/deps/repositories.txt</repositories>
		<dependencies>${project.build.directory}/deps/dependencies.txt</dependencies>
		<script>${project.build.directory}/deps/script.sh</script>
		<excludes>
			<exclude>com.examples:*:*<exclude>
		</excludes>
	</configuration>
</plugin

The directory ${project.build.directory}/deps will contain everything required for .jar download. For example this directory could be used by assembly plugin to generate result binary.

After unpacking on target machine, execute script: ./script.sh . /usr/share/java/applicaiton/. Script supports the following arguments:

  • Directory with repositories.txt and dependencies.txt files
  • Directory where to output downloaded dependencies

About

Maven plugin that outputs dependency information suitable for bash script to download

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published