readme.md 1.42 KB
Newer Older
Tommy Olofsson's avatar
Tommy Olofsson committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# labcomm-compiler-plugin

Compiles labcomm files during the maven build lifecycle.


## Example

To use the plugin to compile the file `my_types.lc` put the following
in your maven build file (pom.xml). You can then use the types as
`import labcomm_gen.sample` where `sample` is the name of the
sample(s) in the my_types.lc.

```xml
<project>
	<!-- ...  -->
	<dependencies>
		<!-- ...  -->
		<!-- labcomm lib -->
		<dependency>
			<groupId>se.lth.control</groupId>
			<artifactId>labcomm</artifactId>
			<version>2014.3.0-SNAPSHOT</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- ...  -->
			<plugin>
				<!-- labcomm compiler -->
				<groupId>se.lth.control</groupId>
				<artifactId>labcomm-compiler-plugin</artifactId>
				<version>2014.3.0-SNAPSHOT</version>
				<configuration>
					<lc>path/to/my_types.lc</lc>
				</configuration>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>genjava</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		<build>
	<plugins>

	<repositories>
		<repository>
			<!-- source of dep/plugin -->
			<id>CSLTH</id>
			<name>CS LTH maven repo</name>
			<url>http://maven.cs.lth.se/content/repositories/public/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>always</updatePolicy>
			</snapshots>
		</repository>
	</repositories>

</project>
```