Commit 932c5155 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

* updated readme for maven

parent 4b039bfa
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -49,3 +49,27 @@ TODO: Migrate and update
    * extend and adapt the `UsageAnalyzer` class in a new branch
        * see the example analyses with loops and streams, immediate output and collected/synchronised output
        * push the changes to the branch regularly 

## Build Management and Automation

* Tested with Maven 3.9.9
* Use `mvn clean install`
    * for individual sub-projects, add `-pl [PROJECTS SEPARATED BY COMMA]`, e.g. `-pl de.ugoe.cs.swe.TTCN3Configuration, de.ugoe.cs.swe.T3Q`, etc.
    * the `-am` parameter should also build required projects where needed
    * consider using the `package`goal when testing builds for individual projects
* Requires `-Djava-21` argument for the time being (see [Xtext/Xtend compatibility notes](https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2024/05/28/version-2-35-0))
* Uses `shade` plugin to create a self-contained runnable "uber-jar"
    * dependencies are not fully resolved with the `shade` plugin alone at the moment (TODO: adjust manifests to get all dependencies in place without workarounds)
    * the `copy-dependencies` and `addjars` complement that for now by providing the missing dependencies for integration in the uber-jar
    * the "slim-jar" is build as well but requires all dependencies to be available as well
* Start with `java -jar de.ugoe.cs.swe.T3Q/target/de.de.ugoe.cs.swe.T3Q-1.0.0-SNAPSHOT-shadow.jar` (TODO: move to more convenient location/name after build)
    * provide necessary parameters to make sure the build was successful (TODO: integrate self-tests)
    * the slim-jar can be tested with `java -cp "de.ugoe.cs.swe.T3Q/target/de.ugoe.cs.swe.T3Q-1.0.0-SNAPSHOT.jar:de.ugoe.cs.swe.T3Q/target/libs/*" de.ugoe.cs.swe.T3Q.T3Q`
        * currently this is not supported as the `libs` folder only contains missing dependencies for the uber-jar (TODO: add a variant where all dependencies are provided as well)
* Building entire (parent) project at once results in a larger uber-jar
* Building the `de.ugoe.cs.swe.T3Q` project only results in an adequate uber-jar, although it can be slimmed down further
* The Eclipse plugins are built under `de.ugoe.cs.swe.TTCN3.repository/target/repository` and can be installed from there for testing (TODO: publish as a page)
* The Web-editor can be started with `mvn jetty:run -Djava-21` under `de.ugoe.cs.swe.TTCN3.web` 
    * a specific port can be provided by `-Djetty.port=[PORT]`, e.g. `-Djetty.port=3001`
    * the Web-editor can also be started with `ServerLauncher` directly in Eclipse for testing
    * there are lots of warnings for redundancies at the moment (TODO: clean up and slim-down dependencies)