Skip to content

Commit

Permalink
first import
Browse files Browse the repository at this point in the history
  • Loading branch information
feliperazeek committed Feb 4, 2011
1 parent 428bad1 commit b29fffd
Show file tree
Hide file tree
Showing 11 changed files with 598 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README
@@ -0,0 +1,4 @@
To run:
mvn jetty:run

http://localhost:8080/vendor/hello.json or .xml
309 changes: 309 additions & 0 deletions pom.xml
@@ -0,0 +1,309 @@
<!--
Copyright (C) 2009-2010 the original author or authors.
See the notice.md file distributed with this work for additional
information regarding copyright ownership.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<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">
<modelVersion>4.0.0</modelVersion>

<groupId>com.activedatatech</groupId>
<artifactId>vendor</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<name>My Web App</name>
<description>Web Application Using Scalate, Scala and JAXRS/Jersey</description>

<prerequisites>
<maven>2.0.9</maven>
</prerequisites>

<properties>
<!-- environment settings -->
<jetty-port>8080</jetty-port>
<scalateEditor>${env.SCALATE_EDITOR}</scalateEditor>
<scalate.workdir>${basedir}/target/_scalate</scalate.workdir>
<scalate.package.resources>com.activedatatech.vendor.resources</scalate.package.resources>
<scalate.mode>development</scalate.mode>

<!-- version info -->
<jersey-version>1.5-ea05</jersey-version>
<jetty-version>7.2.1.v20101111</jetty-version>
<logback-version>0.9.26</logback-version>
<scala-version>2.8.0</scala-version>
<scalate-version>1.3.2</scalate-version>
<servlet-api-version>2.5</servlet-api-version>

<!-- plugins -->
<jetty-plugin-version>7.2.1.v20101111</jetty-plugin-version>
<scala-plugin-version>2.15.0</scala-plugin-version>
<surefire-plugin-version>2.6</surefire-plugin-version>
<war-plugin-version>2.1.1</war-plugin-version>
</properties>

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.fusesource.scalate</groupId>
<artifactId>scalate-core</artifactId>
<version>${scalate-version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-version}</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>

<!-- testing -->
<dependency>
<groupId>org.fusesource.scalate</groupId>
<artifactId>scalate-test</artifactId>
<version>${scalate-version}</version>
<scope>test</scope>
</dependency>
</dependencies>


<repositories>
<repository>
<id>repo1.maven</id>
<name>Maven Central Repo</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>fusesource.m2</id>
<name>FuseSource Community Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/repositories/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>fusesource.m2-snapshot</id>
<name>FuseSource Community Snapshot Repository</name>
<url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>

<repository>
<id>java.net.m2</id>
<name>java.net Maven 2 Repo</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>openqa-releases</id>
<name>OpenQA Releases</name>
<url>http://archiva.openqa.org/repository/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

<repository>
<id>glassfish-repo-archive</id>
<name>Nexus repository collection for Glassfish</name>
<url>http://maven.glassfish.org/content/groups/glassfish</url>
<snapshots>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>

<repository>
<id>scala</id>
<name>Scala Tools</name>
<url>http://scala-tools.org/repo-releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots.scala-tools.org</id>
<name>Scala-Tools Maven2 Snapshot Repository</name>
<url>http://scala-tools.org/repo-snapshots</url>
<snapshots>
<enabled>true</enabled>
<!--updatePolicy>never</updatePolicy-->
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<!--updatePolicy>never</updatePolicy-->
<checksumPolicy>fail</checksumPolicy>
</releases>
</repository>
<repository>
<id>apache.snapshots</id>
<name>Apache Development Snapshot Repository</name>
<url>https://repository.apache.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>${scala-plugin-version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmArgs>
<jvmArg>-Xmx1024m</jvmArg>
</jvmArgs>
<args>
<!-- arg>-unchecked</arg -->
<arg>-deprecation</arg>
</args>
<scala-version>${scala-version}</scala-version>
</configuration>
</plugin>

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin-version}</version>
<configuration>
<forkMode>once</forkMode>
<!-- these settings are mandatory to avoid SureFire giving a bogus system property to the web container -->
<useSystemClassLoader>false</useSystemClassLoader>
<useManifestOnlyJar>false</useManifestOnlyJar>
<includes>
<include>**/*Test.*</include>
</includes>
<excludes>
<exclude>**/SomeTestThatDoesntWorkYetTest.*</exclude>
</excludes>
</configuration>
</plugin>

<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>${war-plugin-version}</version>
<configuration>
<attachClasses>true</attachClasses>
</configuration>
</plugin>

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-plugin-version}</version>
<configuration>
<!--
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>${jetty.port}</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
-->
<webAppConfig>
<contextPath>/</contextPath>
</webAppConfig>

<systemProperties>
<!-- enable easy JMX connection to JConsole -->
<systemProperty>
<name>com.sun.management.jmxremote</name>
<value/>
</systemProperty>
<systemProperty>
<name>scalate.editor</name>
<value>${scalateEditor}</value>
</systemProperty>
<systemProperty>
<name>scalate.workdir</name>
<value>${scalate.workdir}</value>
</systemProperty>
<systemProperty>
<name>scalate.package.resources</name>
<value>${scalate.package.resources}</value>
</systemProperty>
<systemProperty>
<name>scalate.mode</name>
<value>development</value>
</systemProperty>
</systemProperties>
<scanIntervalSeconds>0</scanIntervalSeconds>
</configuration>
</plugin>

</plugins>
</build>

<profiles>
<profile>
<id>precompile</id>
<build>
<plugins>
<plugin>
<groupId>org.fusesource.scalate</groupId>
<artifactId>maven-scalate-plugin</artifactId>
<version>${scalate-version}</version>
<executions>
<execution>
<goals>
<goal>precompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
28 changes: 28 additions & 0 deletions project/build.properties
@@ -0,0 +1,28 @@
#
# Copyright (C) 2009-2010 the original author or authors.
# See the notice.md file distributed with this work for additional
# information regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

project.organization=myGroupId
project.name=myArtifactId
project.version=1.0-SNAPSHOT

sbt.version=0.7.3
scala.version=2.8.0
def.scala.version=2.7.7
#def.scala.version=2.8.0
build.scala.versions=2.8.0
project.initialize=false
29 changes: 29 additions & 0 deletions project/build/Project.scala
@@ -0,0 +1,29 @@
/**
* Copyright (C) 2009-2010 the original author or authors.
* See the notice.md file distributed with this work for additional
* information regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import sbt._

class ScalateProject(info: ProjectInfo) extends DefaultWebProject(info) {

val mavenLocal = "Local Maven Repository" at "file://" + Path.userHome + "/.m2/repository"

override def testOptions = {
super.testOptions ++
Seq(TestArgument("-Dbasedir=" + ".".absolutePath))
}
}

0 comments on commit b29fffd

Please sign in to comment.