-
Notifications
You must be signed in to change notification settings - Fork 6
/
pom.xml
163 lines (152 loc) · 4.79 KB
/
pom.xml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!--
Deployment pom for powertac server.
Two profiles are included:
-Pcli runs a "headless" command-line version. See the README for
command-line options.
-Pweb runs the server with the visualizer, inside an instance of
jetty. Sim options can be controlled through the competition-control
interface in the visualizer at localhost:8080/visualizer
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.powertac</groupId>
<artifactId>server-distribution</artifactId>
<version>1.2.3</version>
<packaging>pom</packaging>
<name>Power TAC distribution</name>
<description>Support for download and execution of the Power TAC server</description>
<url>http://www.powertac.org</url>
<parent>
<groupId>org.powertac</groupId>
<artifactId>server-master</artifactId>
<version>1.2.2</version>
<relativePath/>
</parent>
<!-- Sonatype OSS repo for resolving snapshot dependencies -->
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>mvnrepo</id>
<url>http://mvnrepository.com/artifact/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.powertac</groupId>
<artifactId>server-main</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies>
<profiles>
<!-- Command-line setup -->
<profile>
<id>cli</id>
<build>
<finalName>run-cli</finalName>
<defaultGoal>exec:exec</defaultGoal>
<plugins>
<!-- ... headless server execution ...
mvn -Pcli -Dexec.args="args"
... should turn into
mvn exec:exec -Dexec.executable="java" -Dexec.args="-server -Xmx1024m -classpath %classpath org.powertac.server.PowerTacServer cmd-line-args"
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<commandlineArgs>-server -Xmx1024m -classpath %classpath org.powertac.server.PowerTacServer ${exec.args}</commandlineArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Web visualizer setup -->
<profile>
<id>web</id>
<dependencies>
<dependency>
<groupId>org.powertac</groupId>
<artifactId>visualizer</artifactId>
<version>1.2.3</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.powertac</groupId>
<artifactId>webapp-dependencies</artifactId>
<version>1.2.2</version>
<type>pom</type>
</dependency>
<!-- <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jettyVersion}</version>
</dependency> -->
</dependencies>
<build>
<finalName>run-web</finalName>
<defaultGoal>package jetty:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>unpack-war</id>
<phase>package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/visualizer
</outputDirectory>
<overWriteSnapshots>true</overWriteSnapshots>
<artifactItems>
<artifactItem>
<groupId>org.powertac</groupId>
<artifactId>visualizer</artifactId>
<version>1.2.3</version>
<type>war</type>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- jetty-maven-plugin -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.8.v20121106</version>
<configuration>
<webApp>
<contextPath>/visualizer</contextPath>
</webApp>
<classesDirectory>
${project.build.directory}/visualizer/WEB-INF/classes
</classesDirectory>
<webAppSourceDirectory>
${project.build.directory}/visualizer
</webAppSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>