blob: 72f6241b0e9dbb541c3897e77b3057ca6d5cb9b7 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2014 Bosch Software Innovations GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* The Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Bosch Software Innovations GmbH - Please refer to git log
*
*******************************************************************************/
package org.eclipse.vorto.codegen.examples.webdevice.tasks.templates
import org.eclipse.vorto.functionblock.FunctionblockModel
import org.eclipse.vorto.codegen.examples.webdevice.tasks.ModuleUtil
import org.eclipse.vorto.codegen.api.tasks.ITemplate
class PomFileTemplate implements ITemplate {
override getContent(FunctionblockModel model) {
'''<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.vorto.examples</groupId>
<artifactId>«ModuleUtil.getArtifactId(model)»</artifactId>
<version>«model.functionblock.version»</version>
<name>Sample project generated from «model.name»</name>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.18.2</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<version>1.18.2</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.18.2</version>
</dependency>
</dependencies>
<build>
<finalName>«ModuleUtil.getArtifactId(model)»</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.3.v20140905</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webApp>
<contextPath>/«ModuleUtil.getArtifactId(model)»</contextPath>
</webApp>
<stopPort>9966</stopPort>
<stopKey>jettystop</stopKey>
<stopWait>10</stopWait>
</configuration>
</plugin>
</plugins>
</build>
</project>'''
}
}