Author: piergiorgiolucidi
Date: 2009-03-27 15:42:00 -0400 (Fri, 27 Mar 2009)
New Revision: 261
Added:
contrib/wikiPortlet/trunk/wiki-ear/
contrib/wikiPortlet/trunk/wiki-ear/pom.xml
Modified:
contrib/wikiPortlet/trunk/.settings/org.eclipse.jdt.core.prefs
contrib/wikiPortlet/trunk/forge-wiki/pom.xml
contrib/wikiPortlet/trunk/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java
contrib/wikiPortlet/trunk/pom.xml
contrib/wikiPortlet/trunk/wiki-common/pom.xml
contrib/wikiPortlet/trunk/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties
contrib/wikiPortlet/trunk/wiki-management/pom.xml
contrib/wikiPortlet/trunk/wiki-test/pom.xml
Log:
- added JBoss Wiki EAR module: a standard Maven 2 module to create EAR package
- refactoring of POM dependencies
Modified: contrib/wikiPortlet/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- contrib/wikiPortlet/trunk/.settings/org.eclipse.jdt.core.prefs 2009-03-11 14:41:25 UTC
(rev 260)
+++ contrib/wikiPortlet/trunk/.settings/org.eclipse.jdt.core.prefs 2009-03-27 19:42:00 UTC
(rev 261)
@@ -1,12 +1,12 @@
-#Mon Jan 26 16:44:32 CET 2009
+#Tue Mar 24 17:54:54 CET 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.6
Modified: contrib/wikiPortlet/trunk/forge-wiki/pom.xml
===================================================================
--- contrib/wikiPortlet/trunk/forge-wiki/pom.xml 2009-03-11 14:41:25 UTC (rev 260)
+++ contrib/wikiPortlet/trunk/forge-wiki/pom.xml 2009-03-27 19:42:00 UTC (rev 261)
@@ -52,6 +52,12 @@
<outputDirectory>${basedir}/src/web/WEB-INF/classes</outputDirectory>
<resources>
<resource>
+ <excludes>
+ <exclude>**/.svn</exclude>
+ <exclude>**/.svn/**</exclude>
+ <exclude>**/.DS_Store</exclude>
+ <exclude>.svn/**/*</exclude>
+ </excludes>
<directory>src/etc/</directory>
<includes>
<include>**/*.properties</include>
@@ -66,8 +72,7 @@
<configuration>
<webappDirectory>${basedir}/src/web/</webappDirectory>
<warSourceDirectory>${basedir}/src/web/</warSourceDirectory>
- <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
- <excludes>**/.svn/**</excludes>
+ <warSourceExcludes>WEB-INF/lib/*.jar,**/.svn,.svn/**/*,**/.svn/**,**/.DS_Store</warSourceExcludes>
<warName>wiki</warName>
<outputDirectory>target/wiki.ear</outputDirectory>
</configuration>
@@ -89,12 +94,6 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6</version>
@@ -108,27 +107,14 @@
</dependency>
<dependency>
<groupId>jboss</groupId>
- <artifactId>jboss-ejb3x</artifactId>
+ <artifactId>wiki-common</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-ejb3</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>2.0</version>
</dependency>
- <dependency>
- <groupId>javax.portlet</groupId>
- <artifactId>portlet-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>wiki-common</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
</project>
Modified: contrib/wikiPortlet/trunk/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java
===================================================================
---
contrib/wikiPortlet/trunk/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2009-03-11
14:41:25 UTC (rev 260)
+++
contrib/wikiPortlet/trunk/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2009-03-27
19:42:00 UTC (rev 261)
@@ -32,6 +32,7 @@
import javax.portlet.ActionRequest;
import javax.portlet.PortletException;
+import javax.portlet.PortletPreferences;
import javax.portlet.PortletSession;
import org.apache.commons.fileupload.FileItem;
@@ -62,22 +63,16 @@
public class WikiPortlet extends JBossPortlet {
final static String jspPath = "/WEB-INF/jsp/";
-
private static final String WINDOWS_FILE_NAME = "\\w:\\\\.+";
-
private String defaultPage = "Main";
-
private WikiEngine wikiEngine;
-
private Logger log;
+
public void init() {
log = Logger.getLogger(WikiPortlet.class);
-
- WikiCommon wikiCommon = new WikiCommon();
-
try {
- WikiServiceManagement wikiServiceMenagement = wikiCommon
+ WikiServiceManagement wikiServiceMenagement = WikiCommon
.getWikiManagement();
wikiEngine = wikiServiceMenagement.getWikiEngine();
} catch (WikiManagementNotFoundException e1) {
@@ -110,16 +105,11 @@
return convertedParameters;
}
-
+
public void processAction(JBossActionRequest rReq, JBossActionResponse rResp) {
-
Map<String, String> convertedParameters = convertParameters(rReq);
-
Credentials credentials = wikiEngine.getCredentialsInstance(rReq);
-
-
-
// wikiContext is null - to get refernece to actual page
WikiContext wikiContext = null;
@@ -202,10 +192,12 @@
String msg = "File Upload Exception: " + fue.getMessage();
rResp.setRenderParameter("error", msg);
getPortletContext().log(msg, fue);
+ log.error("File Upload Exception", fue);
} catch (Exception e) {
String msg = "Exception: " + e.getMessage();
rResp.setRenderParameter("error", msg);
getPortletContext().log(msg, e);
+ log.error("Exception", e);
}
}
@@ -349,11 +341,14 @@
public void doView(JBossRenderRequest rReq, JBossRenderResponse rRes)
throws PortletException, java.io.IOException {
try {
+ PortletPreferences prefs = rReq.getPreferences();
WikiSession wikiSession = new PortletWikiSession(rReq
.getPortletSession());
-
+
Credentials credentials = wikiEngine.getCredentialsInstance(rReq);
+
+
String langCode = rReq.getParameter("language");
if (langCode == null) {
@@ -640,4 +635,5 @@
portletSession.setAttribute(WikiSession.ACTION_URL, wikiURL);
portletSession.setAttribute(WikiSession.IS_SECURE, isSecure);
}
+
}
\ No newline at end of file
Modified: contrib/wikiPortlet/trunk/pom.xml
===================================================================
--- contrib/wikiPortlet/trunk/pom.xml 2009-03-11 14:41:25 UTC (rev 260)
+++ contrib/wikiPortlet/trunk/pom.xml 2009-03-27 19:42:00 UTC (rev 261)
@@ -23,6 +23,7 @@
<module>wiki-common</module>
<module>wiki-management</module>
<module>wiki-test</module>
+ <module>wiki-ear</module>
</modules>
<groupId>jboss</groupId>
<artifactId>wiki</artifactId>
@@ -170,6 +171,7 @@
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
+ <scope>provided</scope>
</dependency>
</dependencies>
</project>
Modified: contrib/wikiPortlet/trunk/wiki-common/pom.xml
===================================================================
--- contrib/wikiPortlet/trunk/wiki-common/pom.xml 2009-03-11 14:41:25 UTC (rev 260)
+++ contrib/wikiPortlet/trunk/wiki-common/pom.xml 2009-03-27 19:42:00 UTC (rev 261)
@@ -68,6 +68,12 @@
</resource>
<resource>
<directory>src/etc/</directory>
+ <excludes>
+ <exclude>**/.svn</exclude>
+ <exclude>**/.svn/**</exclude>
+ <exclude>**/.DS_Store</exclude>
+ <exclude>.svn/**/*</exclude>
+ </excludes>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
@@ -89,6 +95,12 @@
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
+ <excludes>
+ <exclude>**/.svn</exclude>
+ <exclude>**/.svn/**</exclude>
+ <exclude>**/.DS_Store</exclude>
+ <exclude>.svn/**/*</exclude>
+ </excludes>
<finalName>wiki-common</finalName>
<outputDirectory>../target/wiki.ear/lib</outputDirectory>
<archive>
@@ -107,12 +119,6 @@
</build>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6</version>
@@ -126,51 +132,9 @@
</dependency>
<dependency>
<groupId>jboss</groupId>
- <artifactId>jboss-ejb3x</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-ejb3</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-portlet-api-lib</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>portal-identity-lib</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
<artifactId>jbossall-client</artifactId>
<version>3.2.3</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>portal-portlet-lib</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.portlet</groupId>
- <artifactId>portlet-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>portal-common-lib</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
</project>
Modified:
contrib/wikiPortlet/trunk/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties
===================================================================
---
contrib/wikiPortlet/trunk/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties 2009-03-11
14:41:25 UTC (rev 260)
+++
contrib/wikiPortlet/trunk/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties 2009-03-27
19:42:00 UTC (rev 261)
@@ -5,4 +5,3 @@
# pathToAttachements - points, where JSPWiki attachemets are situated
pathToAttachements = /tmp
-
Added: contrib/wikiPortlet/trunk/wiki-ear/pom.xml
===================================================================
--- contrib/wikiPortlet/trunk/wiki-ear/pom.xml (rev 0)
+++ contrib/wikiPortlet/trunk/wiki-ear/pom.xml 2009-03-27 19:42:00 UTC (rev 261)
@@ -0,0 +1,73 @@
+<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>
+ <parent>
+ <groupId>jboss</groupId>
+ <artifactId>wiki</artifactId>
+ <version>1.0</version>
+ </parent>
+ <groupId>jboss</groupId>
+ <artifactId>wiki-ear</artifactId>
+ <packaging>ear</packaging>
+ <name>JBoss Wiki EAR</name>
+ <description>JBoss Wiki EAR</description>
+ <dependencies>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>wiki-common</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>forge-wiki</artifactId>
+ <version>1.0</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>wiki-management</artifactId>
+ <version>1.0</version>
+ <type>ejb</type>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>wiki-test</artifactId>
+ <version>1.0</version>
+ <type>war</type>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ear-plugin</artifactId>
+ <configuration>
+ <displayName>JBoss Labs - forge infrastructure</displayName>
+ <finalName>wiki</finalName>
+ <modules>
+ <javaModule>
+ <groupId>jboss</groupId>
+ <artifactId>wiki-common</artifactId>
+ <bundleDir>lib</bundleDir>
+ </javaModule>
+ <ejbModule>
+ <groupId>jboss</groupId>
+ <artifactId>wiki-management</artifactId>
+ <uri>wiki-management.jar</uri>
+ </ejbModule>
+ <webModule>
+ <groupId>jboss</groupId>
+ <artifactId>forge-wiki</artifactId>
+ <contextRoot>/wiki</contextRoot>
+ </webModule>
+ <webModule>
+ <groupId>jboss</groupId>
+ <artifactId>wiki-test</artifactId>
+ <contextRoot>/test</contextRoot>
+ </webModule>
+ </modules>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Modified: contrib/wikiPortlet/trunk/wiki-management/pom.xml
===================================================================
--- contrib/wikiPortlet/trunk/wiki-management/pom.xml 2009-03-11 14:41:25 UTC (rev 260)
+++ contrib/wikiPortlet/trunk/wiki-management/pom.xml 2009-03-27 19:42:00 UTC (rev 261)
@@ -49,6 +49,12 @@
<sourceDirectory>src/java</sourceDirectory>
<resources>
<resource>
+ <excludes>
+ <exclude>**/.svn</exclude>
+ <exclude>**/.svn/**</exclude>
+ <exclude>**/.DS_Store</exclude>
+ <exclude>.svn/**/*</exclude>
+ </excludes>
<directory>src/etc/</directory>
<includes>
<include>**/*.properties</include>
@@ -69,6 +75,12 @@
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
+ <excludes>
+ <exclude>**/.svn</exclude>
+ <exclude>**/.svn/**</exclude>
+ <exclude>**/.DS_Store</exclude>
+ <exclude>.svn/**/*</exclude>
+ </excludes>
<finalName>wiki-management</finalName>
<outputDirectory>../target/wiki.ear</outputDirectory>
<archive>
@@ -110,11 +122,5 @@
<version>1.0</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>javax.portlet</groupId>
- <artifactId>portlet-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
</project>
Modified: contrib/wikiPortlet/trunk/wiki-test/pom.xml
===================================================================
--- contrib/wikiPortlet/trunk/wiki-test/pom.xml 2009-03-11 14:41:25 UTC (rev 260)
+++ contrib/wikiPortlet/trunk/wiki-test/pom.xml 2009-03-27 19:42:00 UTC (rev 261)
@@ -46,10 +46,15 @@
</developer>
</developers>
<build>
-
<sourceDirectory>src/java</sourceDirectory>
<resources>
<resource>
+ <excludes>
+ <exclude>**/.svn</exclude>
+ <exclude>**/.svn/**</exclude>
+ <exclude>**/.DS_Store</exclude>
+ <exclude>.svn/**/*</exclude>
+ </excludes>
<directory>src/etc/</directory>
<includes>
<include>**/*.properties</include>
@@ -64,8 +69,7 @@
<configuration>
<webappDirectory>${basedir}/src/web/</webappDirectory>
<warSourceDirectory>${basedir}/src/web/</warSourceDirectory>
- <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
- <excludes>**/.svn/**</excludes>
+ <warSourceExcludes>WEB-INF/lib/*.jar,**/.svn,.svn/**/*,**/.svn/**,**/.DS_Store</warSourceExcludes>
<warName>wiki-test</warName>
<outputDirectory>target/wiki.ear</outputDirectory>
</configuration>