Commit 5296f24d authored by Matija Obreza's avatar Matija Obreza

Replaced jetty profile with jetty-maven-plugin

parent 2a1f7983
......@@ -40,7 +40,7 @@
<aspectj.version>1.7.2</aspectj.version>
<spring.framework.version>3.2.5.RELEASE</spring.framework.version>
<spring.security.version>3.1.4.RELEASE</spring.security.version>
<spring.security.oauth2.version>1.0.5.RELEASE</spring.security.oauth2.version>
<spring.security.oauth2.version>1.0.5.RELEASE</spring.security.oauth2.version>
<spring.data.core.version>1.5.1.RELEASE</spring.data.core.version>
<spring.data.jpa.version>1.3.2.RELEASE</spring.data.jpa.version>
......@@ -50,7 +50,7 @@
<jackson.version>2.2.1</jackson.version>
<!--Container -->
<jetty.version>9.0.5.v20130815</jetty.version>
<jetty.version>9.0.6.v20130930</jetty.version>
<maven.test.skip>false</maven.test.skip>
......@@ -151,21 +151,19 @@
</dependency>
<!--Servlet and portal dependencies -->
<!--
<dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>${jsp-api.version}</version>
<scope>provided</scope>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api.version}</version>
<scope>provided</scope>
</dependency>
-->
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
......@@ -300,17 +298,7 @@
</dependency>
<!--Jetty -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-deploy</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jsp</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>net.tanesha.recaptcha4j</groupId>
......@@ -323,7 +311,7 @@
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
......@@ -350,9 +338,9 @@
<version>r209</version>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>${spring.security.oauth2.version}</version>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>${spring.security.oauth2.version}</version>
</dependency>
</dependencies>
......@@ -379,38 +367,15 @@
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>start-jetty</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>org.genesys2.JettyMain</mainClass>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<version>0.9.0</version>
<version>0.9.1</version>
<url>http://genesys-pgr.org</url>
<description>Genesys 2 Server</description>
<organization>
......
/**
* Copyright 2013 Global Crop Diversity Trust
*
* 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.
**/
package org.genesys2;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.webapp.WebAppContext;
public class JettyMain {
public static final Log _logger = LogFactory.getLog(JettyMain.class);
public static void main(String[] args) throws Exception {
_logger.info("Starting Jetty");
Server server = new Server();
ServerConnector connector = new ServerConnector(server);
connector.setPort(8080);
server.addConnector(connector);
WebAppContext root = new WebAppContext("src/main/webapp", "/");
server.setHandler(root);
_logger.info("Starting...");
server.start();
server.join();
}
}
......@@ -25,7 +25,6 @@ import java.util.Locale;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.eclipse.jetty.util.StringUtil;
import org.genesys2.server.model.genesys.Taxonomy;
import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.model.impl.CropRule;
......@@ -225,7 +224,7 @@ public class CropServiceImpl implements CropService {
@PreAuthorize("hasRole('ADMINISTRATOR')")
@Transactional(readOnly = false)
public CropRule addCropRule(Crop crop, String genus, String species, boolean included) {
if (crop == null || StringUtil.isBlank(genus)) {
if (crop == null || StringUtils.isBlank(genus)) {
LOG.debug("Ignoring blank rule");
return null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment