|
1 | 1 | # css4j - dom4j module |
2 | 2 |
|
3 | | -Subclasses several [dom4j](https://dom4j.github.io/) classes and provides CSS functionality to it. Licence is BSD 3-clause. |
| 3 | +Subclasses several [dom4j](https://dom4j.github.io/) classes and provides CSS functionality to it. |
4 | 4 |
|
5 | | -Has an optional dependency on [XMLPull-XPP3](https://github.com/xmlpull-xpp3/xmlpull-xpp3) which is not in Maven Central, but the artifacts can be installed with the [install-xpp3.sh](https://raw.githubusercontent.com/css4j/css4j-dist/master/install-xpp3.sh) script. |
| 5 | +[License](LICENSE.txt) is BSD 3-clause. |
6 | 6 |
|
7 | | -Please refer to the `css4j-dist` repository for build instructions. |
| 7 | +See the [latest Release Notes](RELEASE_NOTES.md). |
| 8 | + |
| 9 | +## Java™ Runtime Environment requirements |
| 10 | +All the classes in the binary package have been compiled with a [Java compiler](https://adoptium.net/) |
| 11 | +set to 1.7 compiler compliance level, except the `module-info.java` file. |
| 12 | + |
| 13 | +Building the library requires JDK 11 or higher. |
| 14 | + |
| 15 | +<br/> |
| 16 | + |
| 17 | +## Build from source |
| 18 | +To build css4j-dom4j from the code that is currently at the Git repository, Java |
| 19 | +11 or later is needed, although the resulting jar files can be run with a 1.7 JRE. |
| 20 | + |
| 21 | +You can run a variety of Gradle tasks with the Gradle wrapper (on Windows shells you can omit the `./`): |
| 22 | + |
| 23 | +- `./gradlew build` (normal build) |
| 24 | +- `./gradlew build publishToMavenLocal` (to install in local Maven repository) |
| 25 | +- `./gradlew copyJars` (to copy jar files into a top-level _jar_ directory) |
| 26 | +- `./gradlew lineEndingConversion` (to convert line endings of top-level text files to CRLF) |
| 27 | +- `./gradlew publish` (to deploy to a Maven repository, as described in the `publishing.repositories.maven` block of |
| 28 | +[build.gradle](https://github.com/css4j/css4j-dom4j/blob/1-stable/build.gradle)) |
| 29 | + |
| 30 | +<br/> |
| 31 | + |
| 32 | +## Usage from a Gradle project |
| 33 | +If your Gradle project depends on css4j-dom4j, you can use this project's own Maven repository in a `repositories` section of |
| 34 | +your build file: |
| 35 | +```groovy |
| 36 | +repositories { |
| 37 | + maven { |
| 38 | + url "https://css4j.github.io/maven/" |
| 39 | + mavenContent { |
| 40 | + releasesOnly() |
| 41 | + } |
| 42 | + content { |
| 43 | + includeGroup 'io.sf.carte' |
| 44 | + includeGroup 'io.sf.jclf' |
| 45 | + includeGroup 'xmlpull' |
| 46 | + includeGroup 'xpp3' |
| 47 | + } |
| 48 | + } |
| 49 | +} |
| 50 | +``` |
| 51 | +please use this repository **only** for the artifact groups listed in the `includeGroup` statements. |
| 52 | + |
| 53 | +Then, in your `build.gradle` file: |
| 54 | +```groovy |
| 55 | +dependencies { |
| 56 | + api "io.sf.carte:css4j-dom4j:${css4jDom4jVersion}" |
| 57 | +} |
| 58 | +``` |
| 59 | +where `css4jDom4jVersion` would be defined in a `gradle.properties` file. |
| 60 | + |
| 61 | +<br/> |
| 62 | + |
| 63 | +## Software dependencies |
| 64 | + |
| 65 | +In case that you do not use a Gradle or Maven build (which would manage the |
| 66 | +dependencies according to the relevant `.module` or `.pom` files), the required |
| 67 | +and optional library packages are the following: |
| 68 | + |
| 69 | +### Compile-time dependencies |
| 70 | + |
| 71 | +- The [css4j](https://github.com/css4j/css4j/releases) library (and its transitive |
| 72 | + dependencies); version 1.3.1 or higher (but below 2.0) is recommended. |
| 73 | + |
| 74 | +- The [css4j-agent](https://github.com/css4j/css4j-agent/releases) library; |
| 75 | + version 1.3.0 or higher (but below 2.0) is recommended. |
| 76 | + **It is optional at runtime.** |
| 77 | + |
| 78 | +- The [dom4j](https://github.com/dom4j/dom4j) JAR package (tested with 2.1.1). |
| 79 | + Requires at least version 2.0 to compile and 2.1.1 to run the tests, but you |
| 80 | + should be able to run the resulting jar file with dom4j 1.6 if you are stuck with it. |
| 81 | + |
| 82 | +- The [XPP3 Pull Parser](https://github.com/xmlpull-xpp3/xmlpull-xpp3) (which |
| 83 | + can be used with this library but beware that it does not support [character |
| 84 | + entities](https://dev.w3.org/html5/html-author/charref)). |
| 85 | + **It is optional at runtime.** |
| 86 | + |
| 87 | +### Test dependencies |
| 88 | + |
| 89 | +- A recent version of [JUnit 4](https://junit.org/junit4/). |
| 90 | + |
| 91 | +- The `batik-css`, `batik-util`and `batik-i18n` artifacts from |
| 92 | + [Apache Batik](https://xmlgraphics.apache.org/batik/). |
| 93 | + |
| 94 | +- [Jaxen](https://github.com/jaxen-xpath/jaxen), this software was tested with |
| 95 | + version 1.2.0. |
| 96 | + |
| 97 | +- [SLF4J](http://www.slf4j.org/), which is a logging package. |
| 98 | + |
| 99 | +<br/> |
| 100 | + |
| 101 | +## Website |
| 102 | +For more information please visit https://css4j.github.io/ |
0 commit comments