This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Some small quality of live improvements #23
Open
fzakaria
wants to merge
4
commits into
NixOS:master
Choose a base branch
from
fzakaria:faridzakaria/small-improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A few small improvements for quality of life; might be worth upstreaming as I was looking into this plugin. 1. create a friendly Nix wrapper that includes maven and some sane defaults such as setting the maven repository to a temporary directory. This causes the build to take longer since nothing is cached, unfortunately however the likelyhood of using some local dependency is less. 2. change the default to emit to STDOUT just to follow unix philosophy a bit more. I changed the logging that maven emits to STDERR instead in similar vein. 3. updated the README accordingly
fzakaria
commented
Oct 15, 2020
|
||
System properties | ||
------------------ | ||
|
||
* `mvn2nixOutputFile`: Change the name of the file generated by mvn2nix | ||
* `outputFile`: Set the name of the file generated by mvn2nix, otherwise it is output to STDOUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This system property remains useful if you want to embed this plugin within a pom.xml of a project.
fzakaria
commented
Oct 15, 2020
Comment on lines
+1
to
+4
{ pkgs ? import <nixpkgs> {}, writeShellScriptBin ? pkgs.writeShellScriptBin, maven ? pkgs.maven }: | ||
writeShellScriptBin "mvn2nix" '' | ||
MAVEN_OPTS=-Dorg.slf4j.simpleLogger.logFile=System.err ${maven}/bin/mvn -Dmaven.repo.local=$(mktemp -d -t mavenXXX) org.nixos.mvn2nix:mvn2nix-maven-plugin:mvn2nix "$@" | ||
'' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is merely step 1; next round will be to get the plugin to build itself using the package-info.json it has produced.
Then setting the maven.repo.local to that value.
In this world, the version identifier will be frozen to something like 0.0-NIX
(I'll use set-version during the build process to change the version in the nix derivation)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A few small improvements for quality of life; might be worth
upstreaming as I was looking into this plugin.
defaults such as setting the maven repository to a temporary directory.
This causes the build to take longer since nothing is cached,
unfortunately however the likelyhood of using some local dependency is
less.
change the default to emit to STDOUT just to follow unix philosophy a
bit more. I changed the logging that maven emits to STDERR instead in
similar vein.
updated the README accordingly