add gradle subprojects
more/packages/gradle.scm
31 | 31 | #:use-module (gnu packages web) | |
32 | 32 | #:use-module (gnu packages version-control) | |
33 | 33 | #:use-module (gnu packages xml) | |
34 | - | #:use-module (more packages java)) | |
34 | + | #:use-module (more packages java) | |
35 | + | #:use-module (more packages maven)) | |
35 | 36 | ||
36 | 37 | ;; Gradle requires guava@17. | |
37 | 38 | ;; TODO: patch gradle to support at least guava@20 and send it upstream. | |
… | |||
1804 | 1805 | ("java-javax-inject" ,java-javax-inject) | |
1805 | 1806 | ("java-jsr305" ,java-jsr305)))))) | |
1806 | 1807 | ||
1808 | + | (define-public gradle-maven | |
1809 | + | (let ((base (gradle-subproject | |
1810 | + | "maven" | |
1811 | + | '("gradle-core" "gradle-dependency-management" "gradle-plugins" | |
1812 | + | "gradle-plugin-use" "gradle-publish") | |
1813 | + | ; aether-connector-wagon-1.13.1.jar,commons-codec-1.10.jar,jcl-over-slf4j-1.7.16.jar,xbean-reflect-3.4.jar,log4j-over-slf4j-1.7.16.jar | |
1814 | + | '("groovy" "java-apache-ivy" "java-hamcrest-all" | |
1815 | + | "java-httpcomponents-httpclient" "java-httpcomponents-httpcore" | |
1816 | + | "java-junit" "java-slf4j-api" | |
1817 | + | "java-guava-for-gradle" "java-commons-io" | |
1818 | + | "java-plexus-utils" "java-plexus-classworlds" | |
1819 | + | "java-plexus-container-default" "java-plexus-sec-dispatcher" | |
1820 | + | "java-plexus-cipher" "java-plexus-component-annotations" | |
1821 | + | "java-plexus-interpolation" "maven-core" "maven-artifact" | |
1822 | + | "maven-settings-builder" "maven-settings" "maven-model" | |
1823 | + | "maven-model-builder" "maven-repository-metadata" | |
1824 | + | "maven-polyglot-common" "maven-polyglot-groovy" | |
1825 | + | "maven-resolver-provider" | |
1826 | + | "maven-resolver-api" "maven-resolver-impl" "maven-resolver-spi" | |
1827 | + | "maven-resolver-util" | |
1828 | + | "maven-wagon-provider-api" "maven-wagon-file" "maven-wagon-http" | |
1829 | + | "maven-wagon-http-shared")))) | |
1830 | + | (package | |
1831 | + | (inherit base) | |
1832 | + | (arguments | |
1833 | + | (substitute-keyword-arguments (package-arguments base) | |
1834 | + | ((#:phases phases) | |
1835 | + | `(modify-phases ,phases | |
1836 | + | (add-before 'build 'fix-aether | |
1837 | + | (lambda _ | |
1838 | + | ;; We use maven-resolver, instead of aether-resolver, so fix it: | |
1839 | + | (substitute* (find-files "subprojects/maven" ".*.java") | |
1840 | + | (("org.sonatype.aether") "org.eclipse.aether") | |
1841 | + | (("org.eclipse.aether.util.artifact") | |
1842 | + | "org.eclipse.aether.artifact") | |
1843 | + | (("org.eclipse.aether.impl.internal") | |
1844 | + | "org.eclipse.aether.internal.impl") | |
1845 | + | (("org.eclipse.aether.util.DefaultRepositorySystemSession") | |
1846 | + | "org.eclipse.aether.DefaultRepositorySystemSession")) | |
1847 | + | #t)) | |
1848 | + | (add-before 'build 'fix-newer-maven | |
1849 | + | (lambda _ | |
1850 | + | (substitute* "subprojects/maven/src/main/java/org/gradle/api/publication/maven/internal/action/AbstractMavenPublishAction.java" | |
1851 | + | (("internal.MavenRepositorySystemSession") | |
1852 | + | "internal.MavenRepositorySystemUtils") | |
1853 | + | (("new MavenRepositorySystemSession") | |
1854 | + | "MavenRepositorySystemUtils.newSession") | |
1855 | + | (("\\.SimpleLocalRepositoryManager") | |
1856 | + | ".SimpleLocalRepositoryManagerFactory; | |
1857 | + | import org.eclipse.aether.repository.NoLocalRepositoryManagerException; | |
1858 | + | import org.eclipse.aether.repository.LocalRepository") | |
1859 | + | (("session.setLocalRepositoryManager\\(new SimpleLocalRepositoryManager\\(localMavenRepository\\)\\);") | |
1860 | + | "try { | |
1861 | + | session.setLocalRepositoryManager( | |
1862 | + | new SimpleLocalRepositoryManagerFactory().newInstance( | |
1863 | + | session, new LocalRepository(localMavenRepository))); | |
1864 | + | } catch(NoLocalRepositoryManagerException e) { | |
1865 | + | throw UncheckedException.throwAsUncheckedException(e); | |
1866 | + | }") | |
1867 | + | (("deployer.setMetadataFactories\\(null\\);") | |
1868 | + | "")) | |
1869 | + | (substitute* "subprojects/maven/src/main/java/org/gradle/api/publication/maven/internal/action/SnapshotVersionManager.java" | |
1870 | + | (("public int getPriority") "public float getPriority")) | |
1871 | + | (substitute* "subprojects/maven/src/main/java/org/gradle/api/publication/maven/internal/action/MavenDeployAction.java" | |
1872 | + | (("Authentication;") "Authentication;\nimport org.eclipse.aether.util.repository.AuthenticationBuilder;") | |
1873 | + | (("org.eclipse.aether.repository.RemoteRepository repo") | |
1874 | + | "org.eclipse.aether.repository.RemoteRepository.Builder repoBuilder") | |
1875 | + | (("org.eclipse.aether.repository.RemoteRepository\\(") | |
1876 | + | "org.eclipse.aether.repository.RemoteRepository.Builder(") | |
1877 | + | (("org.sonatype.aether.repository.RemoteRepository") | |
1878 | + | "org.eclipse.aether.repository.RemoteRepository") | |
1879 | + | (("Authentication proxyAuth = new Authentication.*") | |
1880 | + | "Authentication proxyAuth = new AuthenticationBuilder().addUsername(proxy.getUserName()).addPassword(proxy.getPassword()).build();") | |
1881 | + | (("\\(repo\\)") "(repoBuilder.build())") | |
1882 | + | (("repo\\.set") "repoBuilder.set") | |
1883 | + | (("return repo") "return repoBuilder.build()") | |
1884 | + | (("repo.*Authentication\\(auth.getUserName.*") | |
1885 | + | "repoBuilder.setAuthentication(new AuthenticationBuilder() | |
1886 | + | .addUsername(auth.getUserName()) | |
1887 | + | .addPassword(auth.getPassword()) | |
1888 | + | .addPrivateKey(auth.getPrivateKey(), auth.getPassphrase()).build());")) | |
1889 | + | (substitute* "subprojects/maven/src/main/java/org/gradle/api/publication/maven/internal/pom/CustomModelBuilder.java" | |
1890 | + | (("initialize\\(\\);") "registerFactories();") | |
1891 | + | (("import org.codehaus.plexus.personality.plexus.lifecycle.phase.*") "") | |
1892 | + | (("InitializationException") "Exception")) | |
1893 | + | #t)))))) | |
1894 | + | (inputs | |
1895 | + | `(("gradle-base-services" ,gradle-base-services) | |
1896 | + | ("gradle-base-services-groovy" ,gradle-base-services-groovy) | |
1897 | + | ("gradle-core" ,gradle-core) | |
1898 | + | ("gradle-core-api" ,gradle-core-api) | |
1899 | + | ("gradle-dependency-management" ,gradle-dependency-management) | |
1900 | + | ("gradle-logging" ,gradle-logging) | |
1901 | + | ("gradle-model-core" ,gradle-model-core) | |
1902 | + | ("gradle-plugins" ,gradle-plugins) | |
1903 | + | ("gradle-publish" ,gradle-publish) | |
1904 | + | ("gradle-resources" ,gradle-resources) | |
1905 | + | ("groovy" ,groovy) | |
1906 | + | ("java-apache-ivy" ,java-apache-ivy) | |
1907 | + | ("java-commons-io" ,java-commons-io) | |
1908 | + | ("java-commons-lang" ,java-commons-lang) | |
1909 | + | ("java-guava-for-gradle" ,java-guava-for-gradle) | |
1910 | + | ("java-hamcrest-all" ,java-hamcrest-all) | |
1911 | + | ("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) | |
1912 | + | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
1913 | + | ("java-javax-inject" ,java-javax-inject) | |
1914 | + | ("java-jsr305" ,java-jsr305) | |
1915 | + | ("java-junit" ,java-junit) | |
1916 | + | ("java-plexus-cipher" ,java-plexus-cipher) | |
1917 | + | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
1918 | + | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
1919 | + | ("java-plexus-container-default" ,java-plexus-container-default) | |
1920 | + | ("java-plexus-interpolation" ,java-plexus-interpolation) | |
1921 | + | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) | |
1922 | + | ("java-plexus-utils" ,java-plexus-utils) | |
1923 | + | ("java-slf4j-api" ,java-slf4j-api) | |
1924 | + | ("maven-artifact" ,maven-artifact) | |
1925 | + | ("maven-core" ,maven-core) | |
1926 | + | ("maven-model" ,maven-model) | |
1927 | + | ("maven-model-builder" ,maven-model-builder) | |
1928 | + | ("maven-polyglot-common" ,maven-polyglot-common) | |
1929 | + | ("maven-polyglot-groovy" ,maven-polyglot-groovy) | |
1930 | + | ("maven-repository-metadata" ,maven-repository-metadata) | |
1931 | + | ("maven-resolver-api" ,maven-resolver-api) | |
1932 | + | ("maven-resolver-impl" ,maven-resolver-impl) | |
1933 | + | ("maven-resolver-provider" ,maven-resolver-provider) | |
1934 | + | ("maven-resolver-spi" ,maven-resolver-spi) | |
1935 | + | ("maven-resolver-util" ,maven-resolver-util) | |
1936 | + | ("maven-settings" ,maven-settings) | |
1937 | + | ("maven-settings-builder" ,maven-settings-builder) | |
1938 | + | ("maven-wagon-file" ,maven-wagon-file) | |
1939 | + | ("maven-wagon-http" ,maven-wagon-http) | |
1940 | + | ("maven-wagon-http-shared" ,maven-wagon-http-shared) | |
1941 | + | ("maven-wagon-provider-api" ,maven-wagon-provider-api)))))) | |
1942 | + | ||
1807 | 1943 | ;; This package doesn't work. I need to understand how api-mapping.txt and | |
1808 | 1944 | ;; default-imports.txt are generated. Currently they are generated by a custom | |
1809 | 1945 | ;; task defined in buildsrc that is run by gradle, but we don't have enough of | |
… | |||
3044 | 3180 | "gradle-platform-jvm" | |
3045 | 3181 | "gradle-platform-base" | |
3046 | 3182 | "gradle-plugin-use" | |
3183 | + | "gradle-maven" | |
3047 | 3184 | "gradle-language-jvm" | |
3048 | 3185 | "gradle-language-java" | |
3049 | 3186 | "gradle-language-groovy" | |
… | |||
3075 | 3212 | "java-junit" | |
3076 | 3213 | "java-nekohtml" | |
3077 | 3214 | "java-plexus-classworlds" | |
3215 | + | "java-plexus-cipher" | |
3216 | + | "java-plexus-component-annotations" | |
3078 | 3217 | "java-plexus-container-default" | |
3079 | 3218 | "java-plexus-interpolation" | |
3219 | + | "java-plexus-sec-dispatcher" | |
3080 | 3220 | "java-plexus-utils" | |
3081 | 3221 | "java-xerces" | |
3082 | 3222 | "maven-artifact" | |
… | |||
3086 | 3226 | "maven-model-builder" | |
3087 | 3227 | "maven-repository-metadata" | |
3088 | 3228 | "maven-plugin-api" | |
3229 | + | "maven-polyglot-common" | |
3230 | + | "maven-polyglot-groovy" | |
3089 | 3231 | "maven-resolver-api" | |
3090 | 3232 | "maven-resolver-impl" | |
3233 | + | "maven-resolver-provider" | |
3091 | 3234 | "maven-resolver-spi" | |
3092 | 3235 | "maven-resolver-util" | |
3093 | 3236 | "maven-settings" | |
3094 | - | "maven-settings-builder")) | |
3237 | + | "maven-settings-builder" | |
3238 | + | "maven-wagon-provider-api" | |
3239 | + | "maven-wagon-file" | |
3240 | + | "maven-wagon-http" | |
3241 | + | "maven-wagon-http-shared")) | |
3095 | 3242 | ;; java-asm-6 and java-jansi are already present in groovy. | |
3096 | 3243 | (dependencies | |
3097 | 3244 | '("gradle-wrapper" | |
… | |||
3197 | 3344 | ("gradle-model-groovy" ,gradle-model-groovy) | |
3198 | 3345 | ("gradle-model-core" ,gradle-model-core) | |
3199 | 3346 | ("gradle-messaging" ,gradle-messaging) | |
3347 | + | ("gradle-maven" ,gradle-maven) | |
3200 | 3348 | ("gradle-logging" ,gradle-logging) | |
3201 | 3349 | ("gradle-launcher" ,gradle-launcher) | |
3202 | 3350 | ("gradle-language-jvm" ,gradle-language-jvm) | |
… | |||
3258 | 3406 | ("java-nekohtml" ,java-nekohtml) | |
3259 | 3407 | ("java-objenesis" ,java-objenesis) | |
3260 | 3408 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
3409 | + | ("java-plexus-cipher" ,java-plexus-cipher) | |
3410 | + | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
3261 | 3411 | ("java-plexus-container-default" ,java-plexus-container-default) | |
3262 | 3412 | ("java-plexus-interpolation" ,java-plexus-interpolation) | |
3413 | + | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) | |
3263 | 3414 | ("java-plexus-utils" ,java-plexus-utils) | |
3264 | 3415 | ("java-reflectasm" ,java-reflectasm) | |
3265 | 3416 | ("java-slf4j-api" ,java-slf4j-api) | |
… | |||
3273 | 3424 | ("maven-model-builder" ,maven-model-builder) | |
3274 | 3425 | ("maven-repository-metadata" ,maven-repository-metadata) | |
3275 | 3426 | ("maven-plugin-api" ,maven-plugin-api) | |
3427 | + | ("maven-polyglot-common" ,maven-polyglot-common) | |
3428 | + | ("maven-polyglot-groovy" ,maven-polyglot-groovy) | |
3276 | 3429 | ("maven-resolver-api" ,maven-resolver-api) | |
3277 | 3430 | ("maven-resolver-impl" ,maven-resolver-impl) | |
3431 | + | ("maven-resolver-provider" ,maven-resolver-provider) | |
3278 | 3432 | ("maven-resolver-spi" ,maven-resolver-spi) | |
3279 | 3433 | ("maven-resolver-util" ,maven-resolver-util) | |
3280 | 3434 | ("maven-settings" ,maven-settings) | |
3281 | 3435 | ("maven-settings-builder" ,maven-settings-builder) | |
3436 | + | ("maven-wagon-provider-api" ,maven-wagon-provider-api) | |
3437 | + | ("maven-wagon-file" ,maven-wagon-file) | |
3438 | + | ("maven-wagon-http" ,maven-wagon-http) | |
3439 | + | ("maven-wagon-http-shared" ,maven-wagon-http-shared) | |
3282 | 3440 | ("ant" ,ant) | |
3283 | 3441 | ("bash" ,bash))) | |
3284 | 3442 | (native-inputs '()))) |
more/packages/maven.scm unknown status 1
1 | + | ;;; GNU Guix --- Functional package management for GNU | |
2 | + | ;;; Copyright ?? 2017 Julien Lepiller <julien@lepiller.eu> | |
3 | + | ;;; | |
4 | + | ;;; This file is part of GNU Guix. | |
5 | + | ;;; | |
6 | + | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
7 | + | ;;; under the terms of the GNU General Public License as published by | |
8 | + | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | + | ;;; your option) any later version. | |
10 | + | ;;; | |
11 | + | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
12 | + | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + | ;;; GNU General Public License for more details. | |
15 | + | ;;; | |
16 | + | ;;; You should have received a copy of the GNU General Public License | |
17 | + | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | + | ||
19 | + | (define-module (more packages maven) | |
20 | + | #:use-module ((guix licenses) #:prefix license:) | |
21 | + | #:use-module (gnu packages) | |
22 | + | #:use-module (guix packages) | |
23 | + | #:use-module (guix download) | |
24 | + | #:use-module (guix utils) | |
25 | + | #:use-module (guix build-system ant) | |
26 | + | #:use-module (guix build-system trivial) | |
27 | + | #:use-module (gnu packages bash) | |
28 | + | #:use-module (gnu packages groovy) | |
29 | + | #:use-module (gnu packages java) | |
30 | + | #:use-module (gnu packages maven) | |
31 | + | #:use-module (gnu packages web) | |
32 | + | #:use-module (gnu packages version-control) | |
33 | + | #:use-module (gnu packages xml) | |
34 | + | #:use-module (more packages java)) | |
35 | + | ||
36 | + | (define-public maven-polyglot-common | |
37 | + | (package | |
38 | + | (name "maven-polyglot-common") | |
39 | + | (version "0.3.0") | |
40 | + | (source (origin | |
41 | + | (method url-fetch) | |
42 | + | (uri (string-append "https://github.com/takari/polyglot-maven/" | |
43 | + | "archive/polyglot-" version ".tar.gz")) | |
44 | + | (sha256 | |
45 | + | (base32 | |
46 | + | "0v8j2gj0s4vrddyk0ll38rbl69vm6rv2wnn0c8nlsz2824vhvzca")))) | |
47 | + | (build-system ant-build-system) | |
48 | + | (arguments | |
49 | + | `(#:jar-name "maven-polyglot-common.jar" | |
50 | + | #:source-dir "polyglot-common/src/main/java" | |
51 | + | #:tests? #f; No test | |
52 | + | #:jdk ,icedtea-8 | |
53 | + | #:phases | |
54 | + | (modify-phases %standard-phases | |
55 | + | (add-before 'build 'copy-resources | |
56 | + | (lambda _ | |
57 | + | (install-file "polyglot-common/src/main/resources-filtered/maven-polyglot.properties" | |
58 | + | "build/classes") | |
59 | + | #t)) | |
60 | + | (add-after 'build 'generate-metadata | |
61 | + | (lambda _ | |
62 | + | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
63 | + | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
64 | + | "--source" "polyglot-common/src/main/java" | |
65 | + | "--output" "build/classes/META-INF/plexus/components.xml" | |
66 | + | "--classes" "build/classes" | |
67 | + | "--descriptors" "build/classes/META-INF") | |
68 | + | #t)) | |
69 | + | (add-after 'generate-metadata 'rebuild | |
70 | + | (lambda _ | |
71 | + | (invoke "ant" "jar") | |
72 | + | #t))))) | |
73 | + | (inputs | |
74 | + | `(("java-plexus-classworlds" ,java-plexus-classworlds) | |
75 | + | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
76 | + | ("java-plexus-container-default" ,java-plexus-container-default) | |
77 | + | ("java-plexus-utils" ,java-plexus-utils) | |
78 | + | ("maven-builder-support" ,maven-builder-support) | |
79 | + | ("maven-core" ,maven-core) | |
80 | + | ("maven-model" ,maven-model) | |
81 | + | ("maven-model-builder" ,maven-model-builder) | |
82 | + | ("maven-plugin-api" ,maven-plugin-api))) | |
83 | + | (native-inputs | |
84 | + | `(("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
85 | + | ("java-plexus-cli" ,java-plexus-cli) | |
86 | + | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
87 | + | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
88 | + | ("java-commons-cli" ,java-commons-cli) | |
89 | + | ("java-asm" ,java-asm) | |
90 | + | ("java-guice" ,java-guice) | |
91 | + | ("java-guava" ,java-guava) | |
92 | + | ("java-cglib" ,java-cglib) | |
93 | + | ("java-jdom2" ,java-jdom2) | |
94 | + | ("java-qdox" ,java-qdox) | |
95 | + | ("java-javax-inject" ,java-javax-inject))) | |
96 | + | (home-page "https://github.com/takari/polyglot-maven") | |
97 | + | (synopsis "") | |
98 | + | (description "") | |
99 | + | (license license:epl1.0))) | |
100 | + | ||
101 | + | (define-public maven-polyglot-java | |
102 | + | (package | |
103 | + | (inherit maven-polyglot-common) | |
104 | + | (name "maven-polyglot-java") | |
105 | + | (arguments | |
106 | + | `(#:jar-name "maven-polyglot-java.jar" | |
107 | + | #:source-dir "polyglot-java/src/main/java" | |
108 | + | #:tests? #f; No test | |
109 | + | #:jdk ,icedtea-8 | |
110 | + | #:phases | |
111 | + | (modify-phases %standard-phases | |
112 | + | (add-before 'build 'copy-resources | |
113 | + | (lambda _ | |
114 | + | (install-file "polyglot-java/src/main/resources/META-INF/maven/extension.xml" | |
115 | + | "build/classes/META-INF/maven") | |
116 | + | #t)) | |
117 | + | (add-after 'build 'generate-metadata | |
118 | + | (lambda _ | |
119 | + | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
120 | + | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
121 | + | "--source" "polyglot-java/src/main/java" | |
122 | + | "--output" "build/classes/META-INF/plexus/components.xml" | |
123 | + | "--classes" "build/classes" | |
124 | + | "--descriptors" "build/classes/META-INF") | |
125 | + | #t)) | |
126 | + | (add-after 'generate-metadata 'rebuild | |
127 | + | (lambda _ | |
128 | + | (invoke "ant" "jar") | |
129 | + | #t))))) | |
130 | + | (inputs | |
131 | + | `(("maven-polyglot-common" ,maven-polyglot-common) | |
132 | + | ("java-commons-beanutils" ,java-commons-beanutils) | |
133 | + | ("java-commons-io" ,java-commons-io) | |
134 | + | ("java-guava" ,java-guava) | |
135 | + | ,@(package-inputs maven-polyglot-common))))) | |
136 | + | ||
137 | + | (define-public maven-polyglot-groovy | |
138 | + | (package | |
139 | + | (inherit maven-polyglot-common) | |
140 | + | (name "maven-polyglot-groovy") | |
141 | + | (arguments | |
142 | + | `(#:jar-name "maven-polyglot-groovy.jar" | |
143 | + | #:source-dir "polyglot-groovy/src/main/java:polyglot-groovy/src/main/groovy" | |
144 | + | #:tests? #f; No test | |
145 | + | #:jdk ,icedtea-8 | |
146 | + | #:phases | |
147 | + | (modify-phases %standard-phases | |
148 | + | (add-before 'build 'use-groovy | |
149 | + | (lambda _ | |
150 | + | (substitute* "build.xml" | |
151 | + | ;; Change the compiler to groovyc | |
152 | + | (("javac") "groovyc") | |
153 | + | ;; Make it fork | |
154 | + | (("includeantruntime=\"false\"") | |
155 | + | "includeantruntime=\"false\" fork=\"yes\"") | |
156 | + | ;; groovyc doesn't understand the --classpath argument (bug?) | |
157 | + | (("classpath=\"@refidclasspath\"") | |
158 | + | "classpathref=\"classpath\"") | |
159 | + | ;; To enable joint compilation | |
160 | + | (("classpathref=\"classpath\" />") | |
161 | + | "classpathref=\"classpath\"><javac source=\"1.5\" target=\"1.5\" /></groovyc>") | |
162 | + | ;; Actually create a definition of the groovyc task. | |
163 | + | ;; FIXME: Can't we use groovy-ant for that? | |
164 | + | (("<project basedir=\".\">") | |
165 | + | "<project basedir=\".\"><taskdef name=\"groovyc\" | |
166 | + | classname=\"org.codehaus.groovy.ant.Groovyc\" />")) | |
167 | + | #t)) | |
168 | + | (add-before 'build 'copy-resources | |
169 | + | (lambda _ | |
170 | + | (install-file "polyglot-groovy/src/main/resources/META-INF/maven/extension.xml" | |
171 | + | "build/classes/META-INF/maven") | |
172 | + | #t)) | |
173 | + | (add-after 'build 'generate-metadata | |
174 | + | (lambda _ | |
175 | + | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
176 | + | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
177 | + | "--source" "polyglot-groovy/src/main/java" | |
178 | + | "--output" "build/classes/META-INF/plexus/components.xml" | |
179 | + | "--classes" "build/classes" | |
180 | + | "--descriptors" "build/classes/META-INF") | |
181 | + | #t)) | |
182 | + | (add-after 'generate-metadata 'rebuild | |
183 | + | (lambda _ | |
184 | + | (invoke "ant" "jar") | |
185 | + | #t))))) | |
186 | + | (inputs | |
187 | + | `(("maven-polyglot-common" ,maven-polyglot-common) | |
188 | + | ("groovy" ,groovy) | |
189 | + | ("java-slf4j-api" ,java-slf4j-api) | |
190 | + | ,@(package-inputs maven-polyglot-common))))) |