diff options
author | Julien Lepiller <julien@lepiller.eu> | 2020-06-27 23:08:25 +0200 |
---|---|---|
committer | Julien Lepiller <julien@lepiller.eu> | 2020-07-17 04:20:36 +0200 |
commit | dd607254efe1e73fefd1f7593af5f52f6e803c9e (patch) | |
tree | d5b63c2da764d049f05efc9da34ef15465fab410 /gnu/packages/maven.scm | |
parent | c45e7ee688cb48d7742b5093745a9cf811d110bf (diff) | |
download | guix-dd607254efe1e73fefd1f7593af5f52f6e803c9e.tar guix-dd607254efe1e73fefd1f7593af5f52f6e803c9e.tar.gz |
gnu: Add maven-compiler-plugin.
* gnu/packages/maven.scm (maven-compiler-plugin): New variable.
Diffstat (limited to 'gnu/packages/maven.scm')
-rw-r--r-- | gnu/packages/maven.scm | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index f00e29e0e2..cd2213b31f 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -3034,3 +3034,71 @@ unit tests.") (description "This package contains various utility classes and plexus components for supporting incremental build functionality in maven plugins.") (license license:asl2.0))) + +(define-public maven-compiler-plugin + (package + (name "maven-compiler-plugin") + (version "3.8.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/apache/" + "maven-compiler-plugin/archive/" + "maven-compiler-plugin-" version ".tar.gz")) + (sha256 + (base32 + "018d9qwc4cd6k7a8kvhvxjmzbzd2ifdf7m36wqjfq42010js1mv1")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "maven-compiler-plugin.jar" + #:source-dir "src/main/java" + #:test-dir "src/test" + #:tests? #f; test depends on maven-plugin-test-harness + #:phases + (modify-phases %standard-phases + (add-before 'build 'generate-plugin.xml + (generate-plugin.xml "pom.xml" + "compiler" + "src/main/java/org/apache/maven/plugin/compiler" + (list + (list "AbstractCompilerMojo.java" "CompilerMojo.java") + (list "AbstractCompilerMojo.java" "TestCompilerMojo.java")))) + (add-after 'generate-plugin.xml 'fix-plugin.xml + (lambda _ + (substitute* "build/classes/META-INF/maven/plugin.xml" + ;; These are defined in AbstractCompilerMojo.java, but not + ;; parsed correctly in the previous phase + (("DEFAULT_TARGET") "1.6") + (("DEFAULT_SOURCE") "1.6")) + #t)) + (replace 'install + (install-from-pom "pom.xml"))))) + (propagated-inputs + `(("maven-plugin-api" ,maven-plugin-api) + ("maven-artifact" ,maven-artifact) + ("maven-core" ,maven-core) + ("maven-shared-utils" ,maven-shared-utils) + ("maven-shared-incremental" ,maven-shared-incremental) + ("java-plexus-java" ,java-plexus-java) + ("java-plexus-compiler-api" ,java-plexus-compiler-api) + ("java-plexus-compiler-manager" ,java-plexus-compiler-manager) + ("java-plexus-compiler-javac" ,java-plexus-compiler-javac) + ("maven-parent-pom" ,maven-parent-pom-33))) + (inputs + `(("maven-plugin-annotations" ,maven-plugin-annotations) + ("java-commons-io" ,java-commons-io))) + (home-page "https://maven.apache.org/plugins/maven-compiler-plugin") + (synopsis "Compiler plugin for Maven") + (description "The Compiler Plugin is used to compile the sources of your +project. Since 3.0, the default compiler is @code{javax.tools.JavaCompiler} +(if you are using java 1.6) and is used to compile Java sources. If you want +to force the plugin using javac, you must configure the plugin option +@code{forceJavacCompilerUse}. + +Also note that at present the default source setting is 1.6 and the default +target setting is 1.6, independently of the JDK you run Maven with. You are +highly encouraged to change these defaults by setting source and target as +described in Setting the -source and -target of the Java Compiler. + +Other compilers than javac can be used and work has already started on +AspectJ, .NET, and C#.") + (license license:asl2.0))) |