http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/java/actions/data/ProjectsAction.java ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/java/actions/data/ProjectsAction.java b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/java/actions/data/ProjectsAction.java deleted file mode 100644 index 996d089..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/java/actions/data/ProjectsAction.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 ${package}.actions.data; - -import com.opensymphony.xwork2.ActionSupport; -import org.apache.struts2.convention.annotation.Result; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import java.util.ArrayList; -import java.util.List; - -/** - * <code>List Apache projects.</code> - */ -@Result(type = "json") -public class ProjectsAction extends ActionSupport { - - private static final long serialVersionUID = 9037336532369476225L; - private static final Logger log = LogManager.getLogger(ProjectsAction.class); - - private List<String> projectNames; - - public String execute() throws Exception { - - projectNames = new ArrayList<String>(); - projectNames.add("Apache Struts"); - projectNames.add("Apache Log4j"); - projectNames.add("Apache Tomcat"); - projectNames.add("Apache Maven"); - projectNames.add("Apache Ant"); - projectNames.add("Apache Log4Net"); - projectNames.add("Apache Log4Cxx"); - projectNames.add("Apache Chainsaw"); - projectNames.add("Apache Incubator"); - projectNames.add("Apache Hadoop"); - projectNames.add("Apache OpenOffice"); - projectNames.add("Apache Mahout"); - projectNames.add("Apache Tapestry"); - projectNames.add("Apache Jena"); - projectNames.add("Apache Solr"); - projectNames.add("Apache Cayenne"); - projectNames.add("Apache OpenEJB"); - projectNames.add("Apache Deltaspike"); - projectNames.add("Apache Cordova"); - - log.debug("Return {} Apache projects", projectNames.size()); - - return SUCCESS; - } - - public List<String> getProjectNames() { - return projectNames; - } -}
http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/java/actions/data/package-info.java ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/java/actions/data/package-info.java b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/java/actions/data/package-info.java deleted file mode 100644 index 3e4af32..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/java/actions/data/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ -@ParentPackage("data") -@Namespace("/data") -package ${package}.actions.data; - -import org.apache.struts2.convention.annotation.Namespace; -import org.apache.struts2.convention.annotation.ParentPackage; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/jshint.conf.js ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/jshint.conf.js b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/jshint.conf.js deleted file mode 100644 index 91d3bb3..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/jshint.conf.js +++ /dev/null @@ -1,13 +0,0 @@ -{ - "maxparams": 3, - "indent": true, - "camelcase": true, - "eqeqeq": true, - "forin": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "globals": {} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/log4j2.xml b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/log4j2.xml deleted file mode 100644 index 6d27d12..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/log4j2.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Configuration> - <Appenders> - <Console name="STDOUT" target="SYSTEM_OUT"> - <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> - </Console> - </Appenders> - <Loggers> - <Logger name="com.opensymphony.xwork2" level="info"/> - <Logger name="org.apache.struts2" level="info"/> - <Logger name="\${groupId}" level="debug"/> - <Root level="warn"> - <AppenderRef ref="STDOUT"/> - </Root> - </Loggers> -</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/package.properties ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/package.properties b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/package.properties deleted file mode 100644 index b8ee61f..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/package.properties +++ /dev/null @@ -1 +0,0 @@ -hello.message = Struts is up and running... http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/package_es.properties ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/package_es.properties b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/package_es.properties deleted file mode 100644 index 9f3bc40..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/package_es.properties +++ /dev/null @@ -1 +0,0 @@ -hello.message = \u00A1Struts est\u00E1 bien\!... http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/struts.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/struts.xml b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/struts.xml deleted file mode 100644 index d11f2d8..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/struts.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE struts PUBLIC - "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" - "http://struts.apache.org/dtds/struts-2.5.dtd"> -<struts> - - <constant name="struts.enable.DynamicMethodInvocation" value="false"/> - <constant name="struts.devMode" value="true"/> - - <constant name="struts.convention.default.parent.package" value="angularstruts"/> - <package name="angularstruts" extends="json-default"> - <default-action-ref name="index" /> - </package> - <package name="data" extends="angularstruts" namespace="/data"></package> - -</struts> http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/content/index.jsp ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/content/index.jsp b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/content/index.jsp deleted file mode 100644 index 3f6c374..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/content/index.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<!DOCTYPE html> -<%@ page contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<html lang="en" ng-app="app"> -<head> - <meta charset="utf-8"> - <title>My AngularJS Struts2 App</title> - - <base href="<s:url forceAddSchemeHostAndPort="true" includeContext="true" value="/" namespace="/" />"> -</head> -<body> - -<h2><s:property value="message"/></h2> - -<div> - <a href="/home">Home</a> - <a href="/projects">Projects</a> -</div> - -<div ng-controller="AppController as app"> - <div ng-view></div> -</div> - -<s:if test="useMinifiedResources"> - <script src="<s:url value="js/external.js" />"></script> - <script src="<s:url value="js/application.js" />"></script> -</s:if> -<s:else> - <script src="<s:url value="js/lib/angular/angular.min.js" />"></script> - <script src="<s:url value="js/lib/angular/angular-route.min.js" />"></script> - <script src="<s:url value="js/app.js" />"></script> - <script src="<s:url value="js/config.js" />"></script> - <script src="<s:url value="js/services/DataService.js" />"></script> - <script src="<s:url value="js/controllers/AppController.js" />"></script> - <script src="<s:url value="js/controllers/HomeController.js" />"></script> - <script src="<s:url value="js/controllers/ApacheProjectsController.js" />"></script> -</s:else> -</body> -</html> http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 8d08c0b..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<web-app id="struts_angularjs" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> - <display-name>Struts Blank AngularJS App</display-name> - - <filter> - <filter-name>struts2</filter-name> - <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> - </filter> - - <filter-mapping> - <filter-name>struts2</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <welcome-file-list> - <welcome-file>index.jsp</welcome-file> - </welcome-file-list> -</web-app> http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/index.jsp ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/index.jsp b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/index.jsp deleted file mode 100644 index a81b87f..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/index.jsp +++ /dev/null @@ -1 +0,0 @@ -<% response.sendRedirect("index"); %> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/app.js ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/app.js b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/app.js deleted file mode 100644 index 6d2da17..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/app.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ -(function() { - 'use strict'; - - angular - .module('app', ['ngRoute']); -})(); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/config.js ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/config.js b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/config.js deleted file mode 100644 index 9b93aab..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/config.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ -(function() { - 'use strict'; - - angular - .module('app') - .config(['$routeProvider', '$locationProvider', - function($routeProvider, $locationProvider) { - - $locationProvider.html5Mode(true).hashPrefix('!'); - - $routeProvider.when('/projects', { - templateUrl: 'partials/projects.html', - controller: 'ApacheProjectsController as vm' - }).when('/home', { - templateUrl: 'partials/home.html', - controller: 'HomeController as vm' - }).otherwise({ redirectTo: '/home' }); - } - ]); -})(); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/ApacheProjectsController.js ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/ApacheProjectsController.js b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/ApacheProjectsController.js deleted file mode 100644 index 1fb0ca9..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/ApacheProjectsController.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ -(function() { - 'use strict'; - - angular - .module('app') - .controller('ApacheProjectsController', ApacheProjectsController); - - function ApacheProjectsController($log, DataService) { - var vm = this; - - init(); - - function init() { - return DataService.getProjects().then(function(data) { - vm.projects = data.projectNames; - return vm.projects; - }, function() { - $log.error('Could not receive project names.'); - }); - } - } -})(); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/AppController.js ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/AppController.js b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/AppController.js deleted file mode 100644 index d6de31a..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/AppController.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ -(function() { - 'use strict'; - - angular - .module('app') - .controller('AppController', AppController); - - function AppController() { - - } -})(); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts/blob/7a350b02/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/HomeController.js ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/HomeController.js b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/HomeController.js deleted file mode 100644 index 44c7cf9..0000000 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/controllers/HomeController.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ -(function() { - 'use strict'; - - angular - .module('app') - .controller('HomeController', HomeController); - - function HomeController() { - var vm = this; - vm.name = "Sunshine"; - } -})(); \ No newline at end of file