Home
Name Modified Size InfoDownloads / Week
css4j 2024-10-05
OldFiles 2008-08-02
README.md 2024-03-20 3.1 kB
Totals: 3 Items   3.1 kB 0

NOTE: Carte has no releases to download, only the css4j subproject has.

This file focuses on building Carte from source. You can find more information about Carte in the Wiki.


Building the main modules from source

After cloning the main repository:

git clone https://github.com/css4j/carte.git

run the gradlew wrapper to build (requires Java 11 or later):

cd carte
./gradlew build

A variety of Gradle tasks can be executed:

  • ./gradlew build (normal build).

  • ./gradlew build publishToMavenLocal (to install in local Maven repository).

  • ./gradlew uberjar (to create a fat jar with all dependencies).

  • ./gradlew publish (to deploy to a Maven repository, as described in the publishing block of io.sf.carte.java-conventions.gradle).


Usage from a Gradle project

If your Gradle project depends on Carte, you can use this project's own Maven repository in a repositories section of your build file, for easy access to dependencies:

repositories {
    maven {
        url "https://css4j.github.io/maven/"
        mavenContent {
            releasesOnly()
        }
        content {
            includeGroup 'io.sf.carte'
            includeGroup 'io.sf.jclf'
            includeGroup 'com.github.css4j'
       }
    }
}

please use this repository only for the artifact groups listed in the includeGroup statements.

Then, to use the core Carte module put the following in your build.gradle file:

dependencies {
    implementation "io.sf.carte:carte:${carteVersion}"
}

where carteVersion could be defined in a gradle.properties file. Similarly, to use carte-jmh:

dependencies {
    implementation "io.sf.carte:carte-jmh:${carteVersion}"
}


Running the JMH report application

To run the benchmark report app on JMH-produced JSON files, you have to prepare a configuration file and execute:

1) ./gradlew build uberjar

2) java -jar carte-jmh/build/libs/carte-jmh-<version>-all.jar --config=<path-to-config-file> *.json

You could use the example files as a starting point, and run the benchmark-charts.sh script that produces the graphs in https://css4j.github.io/dom-mark.html.

Look inside the dom-benchmark.xml file:

  • In the element with documentStore id of that file, it is configured that the file ~/www/css4j.github.io/dom-mark.html is a DocumentStore where the SVG graphs will be put.

  • And the element with a fileStore id tells that the directory ~/www/css4j.github.io/benchmark would be a FileStore containing the fallback images.

All that you have to do is to download your copy of the dom-mark.html file and modify the paths in dom-benchmark.xml as necessary. Then:

cd carte-jmh/examples
./benchmark-charts.sh dom-*.json html-build.json iterator*.json xml*.json ele*.json

And you will reproduce the JMH charts.

Source: README.md, updated 2024-03-20