build jamonapi-jamon
more/packages/java.scm
178 | 178 | (modify-phases %standard-phases | |
179 | 179 | (add-before 'build 'copy-resources | |
180 | 180 | (lambda _ | |
181 | - | (copy-recursively "src/main/resources" "build/classes"))) | |
181 | + | (copy-recursively "src/main/resources" "build/classes") | |
182 | + | #t)) | |
182 | 183 | (add-before 'build 'remove-failing-test | |
183 | 184 | (lambda _ | |
184 | 185 | ;; This file fails to build | |
… | |||
399 | 400 | (modify-phases %standard-phases | |
400 | 401 | (add-before 'build 'copy-resources | |
401 | 402 | (lambda _ | |
402 | - | (copy-recursively "japicmp/src/main/resources" "build/classes")))))) | |
403 | + | (copy-recursively "japicmp/src/main/resources" "build/classes") | |
404 | + | #t))))) | |
403 | 405 | (inputs | |
404 | 406 | `(("java-airline" ,java-airline) | |
405 | 407 | ("java-jboss-javassist" ,java-jboss-javassist) | |
… | |||
1778 | 1780 | (description "") | |
1779 | 1781 | (license license:expat))) | |
1780 | 1782 | ||
1781 | - | (define-public java-aws | |
1782 | - | (package | |
1783 | - | (name "java-aws") | |
1784 | - | (version "1.11.407") | |
1785 | - | (source (origin | |
1786 | - | (method url-fetch) | |
1787 | - | (uri (string-append "https://github.com/aws/aws-sdk-java/archive/" | |
1788 | - | version ".tar.gz")) | |
1789 | - | (sha256 | |
1790 | - | (base32 | |
1791 | - | "0vn6mhblhnbfncz3a8wl1fmivjkzv7hf67a2xqlzb2wzjdhxr6r4")))) | |
1792 | - | (build-system ant-build-system) | |
1793 | - | (home-page "") | |
1794 | - | (synopsis "") | |
1795 | - | (description "") | |
1796 | - | (license license:asl2.0))) | |
1797 | - | ||
1798 | - | (define java-hazelcast-client-protocol-version "1.7.0-3") | |
1799 | 1783 | (define java-hazelcast-version "3.10.4") | |
1784 | + | ;; Required versions are described in pom.xml and hazelcast-client/pom.xml in | |
1785 | + | ;; the hazelcast tarball. | |
1786 | + | (define java-hazelcast-client-protocol-version "1.6.0") | |
1787 | + | (define java-hazelcast-aws-version "2.0.0") | |
1800 | 1788 | ||
1801 | 1789 | (define java-hazelcast-client-protocol-source | |
1802 | 1790 | (origin | |
… | |||
1807 | 1795 | (file-name (string-append "hazelcast-client-protocol-" java-hazelcast-client-protocol-version ".tar.gz")) | |
1808 | 1796 | (sha256 | |
1809 | 1797 | (base32 | |
1810 | - | "091j9as0zsm4rldj4x605hh0rmiwly39y0kg8zi6c2rkabzp2qpb")))) | |
1798 | + | "0snd5cyjgg007nfhhsv2w0n3jybblbcjmpf3qpy4x4m38729gly8")))) | |
1811 | 1799 | ||
1812 | 1800 | (define java-hazelcast-source | |
1813 | 1801 | (origin | |
… | |||
1819 | 1807 | (base32 | |
1820 | 1808 | "0bmhjh15xcqc4k77ncfw60b0gfnh6ndc3rr8am09ys8yga4w59hf")))) | |
1821 | 1809 | ||
1810 | + | (define java-hazelcast-aws-source | |
1811 | + | (origin | |
1812 | + | (method url-fetch) | |
1813 | + | (uri (string-append "https://github.com/hazelcast/hazelcast-aws/" | |
1814 | + | "archive/v" java-hazelcast-aws-version ".tar.gz")) | |
1815 | + | (file-name (string-append "java-hazelcast-aws-" java-hazelcast-aws-version ".tar.gz")) | |
1816 | + | (sha256 | |
1817 | + | (base32 | |
1818 | + | "0hdih6b4rvcflxn2c3wbn8a6aw13bb0nwmifyi118wr6cqrlv02p")))) | |
1819 | + | ||
1822 | 1820 | (define-public java-hazelcast-code-generator | |
1823 | 1821 | (package | |
1824 | 1822 | (name "java-hazelcast-code-generator") | |
… | |||
1871 | 1869 | #:source-dir | |
1872 | 1870 | (string-append "hazelcast-client/src/main/java:hazelcast/src/main/java:" | |
1873 | 1871 | "hazelcast-client-protocol-" ,java-hazelcast-client-protocol-version | |
1874 | - | "/hazelcast/src/main/java") | |
1872 | + | "/hazelcast/src/main/java:hazelcast-aws-" ,java-hazelcast-aws-version | |
1873 | + | "/src/main/java") | |
1875 | 1874 | #:tests? #f | |
1876 | 1875 | #:phases | |
1877 | 1876 | (modify-phases %standard-phases | |
… | |||
1885 | 1884 | </javac>") | |
1886 | 1885 | (("<javac") "<javac source=\"1.6\"")) | |
1887 | 1886 | #t)) | |
1887 | + | (add-before 'build 'unpack-aws | |
1888 | + | (lambda* (#:key inputs #:allow-other-keys) | |
1889 | + | (invoke "tar" "xzf" (assoc-ref inputs "java-hazelcast-aws-source")) | |
1890 | + | #t)) | |
1891 | + | (add-before 'build 'unpack-client-protocol | |
1892 | + | (lambda* (#:key inputs #:allow-other-keys) | |
1893 | + | (invoke "tar" "xzf" (assoc-ref inputs "java-hazelcast-client-protocol-source")) | |
1894 | + | #t)) | |
1888 | 1895 | (add-before 'build 'fix-renamed-dependencies | |
1889 | 1896 | (lambda _ | |
1890 | 1897 | (substitute* '("hazelcast-client/src/main/java/com/hazelcast/client/spi/impl/AwsAddressProvider.java" | |
1891 | - | "hazelcast-client/src/main/java/com/hazelcast/client/spi/impl/discovery/HazelcastCloudDiscovery.java") | |
1898 | + | "hazelcast-client/src/main/java/com/hazelcast/client/spi/impl/discovery/HazelcastCloudDiscovery.java" | |
1899 | + | "hazelcast-aws-2.0.0/src/main/java/com/hazelcast/aws/impl/DescribeInstances.java") | |
1892 | 1900 | (("com.hazelcast.com.eclipsesource.json") "com.eclipsesource.json")) | |
1893 | - | (substitute* "hazelcast-client/src/main/java/com/hazelcast/client/spi/impl/AwsAddressProvider.java" | |
1894 | - | (("com.hazelcast.aws.AWSClient") "aws.AWSClient")) | |
1895 | 1901 | #t)) | |
1896 | - | (add-before 'build 'unpack-client-protocol | |
1897 | - | (lambda* (#:key inputs #:allow-other-keys) | |
1898 | - | (display (assoc-ref inputs "java-hazelcast-client-protocol-source")) | |
1899 | - | (newline) | |
1900 | - | (invoke "tar" "xzf" (assoc-ref inputs "java-hazelcast-client-protocol-source")) | |
1902 | + | (add-before 'build 'copy-template | |
1903 | + | (lambda _ | |
1904 | + | (with-directory-excursion "hazelcast/src/main" | |
1905 | + | (copy-file "template/com/hazelcast/instance/GeneratedBuildProperties.java" | |
1906 | + | "java/com/hazelcast/instance/GeneratedBuildProperties.java") | |
1907 | + | (substitute* "java/com/hazelcast/instance/GeneratedBuildProperties.java" | |
1908 | + | (("\\$\\{project.version\\}") ,version) | |
1909 | + | (("\\$\\{timestamp\\}") "0") | |
1910 | + | (("\\$\\{git.commit.id.abbrev\\}") "0f51fcf") | |
1911 | + | (("\\$\\{hazelcast.distribution\\}") "Hazelcast") | |
1912 | + | (("\\$\\{hazelcast.serialization.version\\}") "1"))) | |
1901 | 1913 | #t)) | |
1902 | 1914 | (add-before 'build 'remove-package-info | |
1903 | 1915 | (lambda _ | |
… | |||
1906 | 1918 | (inputs | |
1907 | 1919 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
1908 | 1920 | ("java-apache-freemarker" ,java-apache-freemarker) | |
1921 | + | ("java-hazelcast-aws-source" ,java-hazelcast-aws-source) | |
1909 | 1922 | ("java-hazelcast-code-generator" ,java-hazelcast-code-generator) | |
1910 | 1923 | ("java-hazelcast-client-protocol-source" ,java-hazelcast-client-protocol-source) | |
1911 | 1924 | ("java-jsr107" ,java-jsr107) | |
1912 | 1925 | ("java-jsr305" ,java-jsr305) | |
1913 | - | ("java-log4j-1.2-api" ,java-log4j-1.2-api) | |
1926 | + | ("java-log4j-1.2" ,java-log4j-1.2) | |
1914 | 1927 | ("java-log4j-api" ,java-log4j-api) | |
1915 | 1928 | ("java-minimal-json" ,java-minimal-json) | |
1916 | 1929 | ("java-osgi-core" ,java-osgi-core) | |
… | |||
1968 | 1981 | (file-name (string-append name "-" version ".tar.gz")) | |
1969 | 1982 | (sha256 | |
1970 | 1983 | (base32 | |
1971 | - | "0kh0p1h546k6myd268jlr681bx15q6ip15an56rmqdw4q87xk23v")))) | |
1984 | + | "0kh0p1h546k6myd268jlr681bx15q6ip15an56rmqdw4q87xk23v")) | |
1985 | + | (patches | |
1986 | + | (search-patches "java-jamonapi-jamon-update-dependencies.patch")))) | |
1972 | 1987 | (build-system ant-build-system) | |
1973 | 1988 | (arguments | |
1974 | 1989 | `(#:jar-name "java-jamonapi-jamon.jar" | |
1975 | 1990 | #:source-dir "jamon/src/main/java" | |
1976 | 1991 | #:test-dir "jamon/src/test" | |
1992 | + | #:test-exclude | |
1993 | + | (list | |
1994 | + | "**/Abstract*.java" | |
1995 | + | ;; Fail to parse hazelcast.xml | |
1996 | + | "**/DistributedJamonHazelcastTest.java" | |
1997 | + | "**/JamonDataPersisterFactoryTest.java" | |
1998 | + | ;; javax.management.InstanceAlreadyExistsException | |
1999 | + | "**/JmxUtilsTest.java" | |
2000 | + | ;; Missing hsqldb as a dependency | |
2001 | + | "**/MonProxyTest.java") | |
1977 | 2002 | #:jdk ,icedtea-8 | |
1978 | 2003 | #:phases | |
1979 | 2004 | (modify-phases %standard-phases | |
… | |||
1982 | 2007 | ;; Classes in this directory depend on spring-framework-context, | |
1983 | 2008 | ;; which depends on spring-framework-aop which depends on jamonapi. | |
1984 | 2009 | (delete-file-recursively "jamon/src/main/java/com/jamonapi/aop") | |
1985 | - | #t)) | |
1986 | - | (add-before 'build 'port-to-jetty9 | |
1987 | - | (lambda _ | |
1988 | - | (substitute* "jamon/src/main/java/com/jamonapi/http/JettyHttpMonItem.java" | |
1989 | - | (("org.mortbay.jetty.Request") | |
1990 | - | "org.eclipse.jetty.server.Request")) | |
1991 | - | (substitute* "jamon/src/main/java/com/jamonapi/http/JAMonJettyHandler.java" | |
1992 | - | (("org.mortbay.jetty.Request") | |
1993 | - | "org.eclipse.jetty.server.Request") | |
1994 | - | (("org.mortbay.jetty.Response") | |
1995 | - | "org.eclipse.jetty.server.Response") | |
1996 | - | (("org.mortbay.jetty.HttpConnection") | |
1997 | - | "org.eclipse.jetty.server.HttpConnection") | |
1998 | - | (("org.mortbay.jetty.handler.HandlerWrapper") | |
1999 | - | "org.eclipse.jetty.server.handler.HandlerWrapper")) | |
2010 | + | (delete-file-recursively "jamon/src/test/java/com/jamonapi/aop") | |
2000 | 2011 | #t))))) | |
2001 | 2012 | (inputs | |
2002 | 2013 | `(("java-aspectj-rt" ,java-aspectj-rt) | |
2014 | + | ("java-eclipse-jetty-io" ,java-eclipse-jetty-io) | |
2003 | 2015 | ("java-eclipse-jetty-server" ,java-eclipse-jetty-server) | |
2016 | + | ("java-eclipse-jetty-util" ,java-eclipse-jetty-util) | |
2017 | + | ("java-hazelcast-bootstrap" ,java-hazelcast-bootstrap) | |
2004 | 2018 | ;("java-javaee-servletapi" ,java-javaee-servletapi) | |
2005 | 2019 | ("java-tomcat" ,java-tomcat) ; for catalina and servletapi | |
2006 | - | ("java-log4j-api" ,java-log4j-api))) | |
2020 | + | ("java-log4j-api" ,java-log4j-api) | |
2021 | + | ("java-log4j-1.2" ,java-log4j-1.2))) | |
2022 | + | (native-inputs | |
2023 | + | `(("java-asm" ,java-asm) | |
2024 | + | ("java-assertj" ,java-assertj) | |
2025 | + | ("java-cglib" ,java-cglib) | |
2026 | + | ("java-hamcrest-core" ,java-hamcrest-core) | |
2027 | + | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec) | |
2028 | + | ("java-junit" ,java-junit) | |
2029 | + | ("java-mockito-1" ,java-mockito-1) | |
2030 | + | ("java-objenesis" ,java-objenesis))) | |
2007 | 2031 | (home-page "") | |
2008 | 2032 | (synopsis "") | |
2009 | 2033 | (description "") | |
… | |||
2216 | 2240 | ("java-snakeyaml" ,java-snakeyaml) | |
2217 | 2241 | ("java-spring-framework-beans" ,java-spring-framework-beans) | |
2218 | 2242 | ("java-spring-framework-core" ,java-spring-framework-core) | |
2243 | + | ("java-jamonapi-jamon-bootstrap" ,java-jamonapi-jamon-bootstrap) | |
2219 | 2244 | ;; Note: for javax-el (el-api) | |
2220 | 2245 | ("java-tomcat" ,java-tomcat))) | |
2221 | 2246 | (description ""))) | |
… | |||
2273 | 2298 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
2274 | 2299 | ("java-javax-inject" ,java-javax-inject) | |
2275 | 2300 | ("java-snakeyaml" ,java-snakeyaml) | |
2301 | + | ("java-spring-framework-aop" ,java-spring-framework-aop) | |
2276 | 2302 | ("java-spring-framework-beans" ,java-spring-framework-beans) | |
2277 | 2303 | ("java-spring-framework-core" ,java-spring-framework-core) | |
2278 | 2304 | ;; Note: for javax-el (el-api) | |
… | |||
4394 | 4420 | (chmod (string-append bin "/antlr4") #o755)))) | |
4395 | 4421 | (add-before 'build 'copy-resources | |
4396 | 4422 | (lambda _ | |
4397 | - | (copy-recursively "tool/resources/" "build/classes"))) | |
4423 | + | (copy-recursively "tool/resources/" "build/classes") | |
4424 | + | #t)) | |
4398 | 4425 | (add-before 'build 'generate-unicode | |
4399 | 4426 | (lambda _ | |
4400 | 4427 | (and |