Skip to content

Commit b76b57e

Browse files
committed
docs: redo readme
1 parent f082ce4 commit b76b57e

1 file changed

Lines changed: 47 additions & 4 deletions

File tree

README.md

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,58 @@ This is a small default library used to manipulate UVL metamodels in JAVA. It us
1111
- convert between different language levels
1212
- direct access to feature model components like features, groups and attributes
1313

14-
## 💡 Usages/Examples
14+
## ⚙️ Setup
1515

16-
To use the Java-fm-metamodel it needs to be built with [Maven](https://maven.apache.org/):
16+
To clone this repository **with all submodules**, use:
17+
18+
```bash
19+
git clone --recurse-submodules https://github.com/Universal-Variability-Language/java-fm-metamodel.git
20+
```
21+
22+
If you have already cloned the repository **without** submodules, you can initialize and update them afterwards with:
23+
24+
```bash
25+
git submodule update --init --recursive
26+
```
27+
28+
This ensures that all required submodules (e.g., test resources) are available and the project will build and test correctly
29+
30+
## 💡 Usage
31+
32+
### 📦 Getting Started
33+
34+
First, **clone this repository** to your local machine as explained in `⚙️ Setup`.
35+
To use the Java-fm-metamodel, make sure you are in the project directory before running any further commands. Build the project with [Maven](https://maven.apache.org/):
1736

1837
```bash
1938
mvn clean compile
2039
```
2140

22-
More usage examples that also show how to use the acquired UVLModel object can be found in [src/main/java/de/vill/main/Example.java](https://github.com/Universal-Variability-Language/java-fm-metamodel/blob/main/src/main/java/de/vill/main/Example.java)
41+
This will compile all sources and ensure all dependencies (including submodules) are available.
42+
Now you can execute code for manipulating UVL feature models as shown in the `Examples` below
43+
44+
### 🧩 Using as a Maven Dependency
45+
46+
You can also use the Java-fm-metamodel as a dependency in your own Maven project.
47+
Add the following to your `pom.xml`:
48+
49+
```xml
50+
<dependency>
51+
<groupId>io.github.universal-variability-language</groupId>
52+
<artifactId>fm-metamodel</artifactId>
53+
<version>1.1</version>
54+
</dependency>
55+
```
56+
57+
Make sure that the version matches the latest release.
58+
59+
---
60+
61+
Now you can use the classes from this library in your own Java code!
62+
63+
## Examples
64+
65+
Some usage examples that show how to use the acquired UVLModel object can be found in [src/main/java/de/vill/main/Example.java](https://github.com/Universal-Variability-Language/java-fm-metamodel/blob/main/src/main/java/de/vill/main/Example.java)
2366

2467
### Parsing
2568

@@ -66,7 +109,7 @@ Files.write(filePath, uvlModel.getBytes());
66109
A model can be printed with the `toString()` method of the `de.vill.model.FeatureModel` object.
67110
The following snippet shows a minimal example to read and write UVL models using the jar.
68111

69-
## ⚙️ Running Tests
112+
## 🧪 Running Tests
70113

71114
The Java-fm-metamodel can be tested by running:
72115

0 commit comments

Comments
 (0)