This repository has been archived by the owner on Aug 27, 2023. It is now read-only.
forked from liferay/liferay-maven-support
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nicolas Herbaut
committed
Aug 31, 2012
1 parent
fea108d
commit 46d17a1
Showing
18 changed files
with
430 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<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>com.intellinium.maven.archetypes</groupId> | ||
<artifactId>liferay-portlet-spring-mvc-archetype</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>liferay-portlet-spring-mvc-archetype</name> | ||
<organization> | ||
<name>Intellinium</name> | ||
<url>http://www.intellinium.com</url> | ||
</organization> | ||
<issueManagement> | ||
<system>jira</system> | ||
<url>https://intellinium.atlassian.net</url> | ||
</issueManagement> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
archetypes/liferay-portlet-spring-mvc-archetype/src/main/resources/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Manifest-Version: 1.0 | ||
Archiver-Version: Plexus Archiver | ||
Created-By: Apache Maven | ||
Built-By: nherbaut | ||
Build-Jdk: 1.6.0_26 | ||
|
65 changes: 65 additions & 0 deletions
65
...ray-portlet-spring-mvc-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<archetype-descriptor | ||
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" | ||
name="Intellinium spring mvc portlet archetype" partial="false"> | ||
<requiredProperties> | ||
<requiredProperty key="portletName"> | ||
<defaultValue>MyPortlet</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="groupId"> | ||
<defaultValue>groupId</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="artifactId"> | ||
<defaultValue>myportlet</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="version"> | ||
<defaultValue>1.0-SNAPSHOT</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="package"> | ||
<defaultValue>com.mycompany.portlet</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="organization"> | ||
<defaultValue>My Company</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="fullTextDescription"> | ||
<defaultValue>this is my portlet</defaultValue> | ||
</requiredProperty> | ||
|
||
|
||
|
||
|
||
|
||
</requiredProperties> | ||
|
||
<fileSets> | ||
<fileSet filtered="true" packaged="true"> | ||
<directory>src/main/java</directory> | ||
</fileSet> | ||
<fileSet filtered="true" packaged="true"> | ||
<directory>src/test/java</directory> | ||
</fileSet> | ||
<fileSet filtered="true" packaged="false"> | ||
<directory>src/main/webapp</directory> | ||
<excludes> | ||
<exclude>**/*.jsp</exclude> | ||
</excludes> | ||
|
||
</fileSet> | ||
|
||
<fileSet filtered="false" packaged="false"> | ||
<directory>src/main/webapp/</directory> | ||
<includes> | ||
<include>**/*.jsp</include> | ||
</includes> | ||
|
||
</fileSet> | ||
|
||
<fileSet filtered="true" packaged="false"> | ||
<directory>src/main/resources</directory> | ||
</fileSet> | ||
</fileSets> | ||
|
||
|
||
|
||
</archetype-descriptor> |
180 changes: 180 additions & 0 deletions
180
...types/liferay-portlet-spring-mvc-archetype/src/main/resources/archetype-resources/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
<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>${groupId}</groupId> | ||
<artifactId>${artifactId}</artifactId> | ||
<version>${version}</version> | ||
<packaging>war</packaging> | ||
|
||
<name>${fullTextDescription}</name> | ||
|
||
<properties> | ||
<spring.version>3.0.7.RELEASE</spring.version> | ||
<logback.version>1.0.6</logback.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.liferay.portal</groupId> | ||
<artifactId>portal-service</artifactId> | ||
<version>${liferay.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
|
||
|
||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>jstl</artifactId> | ||
<version>1.2</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.liferay.portal</groupId> | ||
<artifactId>util-bridges</artifactId> | ||
<version>${liferay.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay.portal</groupId> | ||
<artifactId>util-taglib</artifactId> | ||
<version>${liferay.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay.portal</groupId> | ||
<artifactId>util-java</artifactId> | ||
<version>${liferay.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.portlet</groupId> | ||
<artifactId>portlet-api</artifactId> | ||
<version>2.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>servlet-api</artifactId> | ||
<version>2.4</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet.jsp</groupId> | ||
<artifactId>jsp-api</artifactId> | ||
<version>2.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-jdbc</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-orm</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
|
||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-webmvc-portlet</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.webflow</groupId> | ||
<artifactId>spring-webflow</artifactId> | ||
<version>2.3.1.RELEASE</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-web</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-config</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-taglibs</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.inject</groupId> | ||
<artifactId>javax.inject</artifactId> | ||
<version>1</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>1.6.6</version> | ||
</dependency> | ||
|
||
|
||
|
||
|
||
|
||
</dependencies> | ||
|
||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.liferay.maven.plugins</groupId> | ||
<artifactId>liferay-maven-plugin</artifactId> | ||
<version>${liferay.version}</version> | ||
<configuration> | ||
<autoDeployDir>${liferay.auto.deploy.dir}</autoDeployDir> | ||
<appServerDeployDir>${liferay.app.server.deploy.dir}</appServerDeployDir> | ||
<appServerLibGlobalDir>${liferay.app.server.lib.global.dir}</appServerLibGlobalDir> | ||
<appServerPortalDir>${liferay.app.server.portal.dir}</appServerPortalDir> | ||
<liferayVersion>${liferay.version}</liferayVersion> | ||
<pluginType>portlet</pluginType> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.5</version> | ||
<configuration> | ||
<encoding>UTF-8</encoding> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>2.5</version> | ||
<configuration> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
||
<organization> | ||
<name>${organization}</name> | ||
</organization> | ||
|
||
|
||
|
||
</project> |
34 changes: 34 additions & 0 deletions
34
...etype/src/main/resources/archetype-resources/src/main/java/__portletName__Controller.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package ${package}; | ||
|
||
|
||
import java.util.List; | ||
|
||
|
||
import javax.portlet.RenderRequest; | ||
|
||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.ModelAttribute; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.portlet.ModelAndView; | ||
import org.springframework.web.portlet.bind.annotation.RenderMapping; | ||
|
||
|
||
|
||
@Controller("${portletName}Controller") | ||
@RequestMapping("VIEW") | ||
public class ${portletName}Controller { | ||
|
||
|
||
|
||
@RenderMapping | ||
public ModelAndView onPortletRender(RenderRequest request) { | ||
|
||
ModelAndView res = new ModelAndView(); | ||
res.setViewName("view"); | ||
|
||
|
||
return res; | ||
} | ||
|
||
|
||
} |
1 change: 1 addition & 0 deletions
1
...chetype/src/main/resources/archetype-resources/src/main/resources/Language-ext.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
javax.portlet.title=${portletName} Title |
3 changes: 3 additions & 0 deletions
3
...mvc-archetype/src/main/resources/archetype-resources/src/main/webapp/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
35 changes: 35 additions & 0 deletions
35
...rc/main/resources/archetype-resources/src/main/webapp/WEB-INF/__portletName__-portlet.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" | ||
xmlns:context="http://www.springframework.org/schema/context" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/context | ||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
|
||
<context:component-scan | ||
base-package="${package}" /> | ||
|
||
|
||
|
||
<bean id="viewResolver" | ||
class="org.springframework.web.servlet.view.InternalResourceViewResolver"> | ||
<property name="viewClass" | ||
value="org.springframework.web.servlet.view.InternalResourceView" /> | ||
<property name="prefix" value="/WEB-INF/jsp/" /> | ||
<property name="suffix" value=".jsp" /> | ||
</bean> | ||
|
||
<bean | ||
class="org.springframework.web.portlet.mvc.annotation.DefaultAnnotationHandlerMapping" /> | ||
|
||
<bean | ||
class="org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter" /> | ||
|
||
|
||
|
||
|
||
|
||
</beans> |
13 changes: 13 additions & 0 deletions
13
...ype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" | ||
xmlns:context="http://www.springframework.org/schema/context" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/context | ||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
|
||
|
||
</beans> |
5 changes: 5 additions & 0 deletions
5
...mvc-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/init.jsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> | ||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | ||
<%@ taglib prefix="liferay-ui" uri="http://liferay.com/tld/ui" %> | ||
<portlet:defineObjects /> |
7 changes: 7 additions & 0 deletions
7
...mvc-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/view.jsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<%@ page contentType="text/html" isELIgnored="false"%> | ||
<%@ include file="init.jsp"%> | ||
|
||
|
||
hello from | ||
<c:out value="${portletConfig.getPortletName()}" /> | ||
Portlet! |
9 changes: 9 additions & 0 deletions
9
...hetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/liferay-display.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.1.0//EN" "http://www.liferay.com/dtd/liferay-display_6_1_0.dtd"> | ||
|
||
<display> | ||
<category name="${organization}"> | ||
<portlet id="${portletName}"></portlet> | ||
</category> | ||
|
||
</display> |
Oops, something went wrong.