portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dahl, Sandra" <SD...@dvsAnalytics.com>
Subject RE: login portlet extension
Date Mon, 08 Feb 2010 18:49:16 GMT
Hi, David. Thank you for the example. I am trying the maven solution you have below and get
the error below when running org.apache.maven.plugins:maven-war-plugin:2.0.2:war.

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building extended-j2admin Maven Webapp
[INFO]    task-segment: [org.apache.maven.plugins:maven-war-plugin:2.0.2:war]
[INFO] ------------------------------------------------------------------------
[INFO] [war:war {execution: default-cli}]
[INFO] Exploding webapp...
[INFO] Assembling webapp extended-j2admin in W:\eclipseWorkspace\extended-j2admin\target\extended-j2admin
[INFO] Copy webapp webResources to W:\eclipseWorkspace\extended-j2admin\target\extended-j2admin
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Error unpacking file: W:\eclipseWorkspace\j2-admin\target\classesto: W:\eclipseWorkspace\extended-j2admin\target\war\work\cla

Embedded error: The source must not be a directory.

ThankS! Sandi
-----Original Message-----
From: David Sean Taylor [mailto:d.taylor@onehippo.com]
Sent: Wednesday, February 03, 2010 4:04 PM
To: Jetspeed Developers List
Subject: Re: login portlet extension

On Wed, Feb 3, 2010 at 7:44 AM, Dahl, Sandra <SDahl@dvsanalytics.com> wrote:

> Thanks for the information, David. In general, what is the best practice
> for extending an existing Jetspeed portlet so future Jetspeed updates can be
> easily implemented?
> I think there are two approaches you can take:

1. write your own administrative portlet application, and manage all code
2. overlay the j2-admin.war artifact from maven

The first solution doesn't work well for re-use, as much j2-admin's
functionality is hidden down in JSP files. Additionally, we do not
distribute j2-admin as a jar file to reuse java classes. With that in mind,
lets look at how you can approach the second solution.

Many people prefer Ant for this kind of processing. In fairness to Ant, lets
look at how you could do that. I didn't have an example with the j2-admin
war, but here is an similar example using the jetspeed layouts war.

<target name='overlay-layouts'>
<mkdir dir='${installer.target}/unpack/'/>
<copy overwrite='true'
basedir="${installer.target}/unpack/jetspeed-layouts/" update='true'/>

In the target above, the Ant target overlays my customized portlet.xml on
top of the jetspeed-layouts war, and then create the new merged war file.
The downside to this approach, we don't take the jetspeed-layouts.war file
out of a Maven repository.

As a hybrid solution, if you prefer Ant but are required to use Maven, you
can embed ant commands into Maven at the generate-resources phase. There are
examples of this in the jetspeed-installer and enterprise sub-projects

Here is a pure Maven solution, which I would consider a best practice for
Maven builds. In this example I use the Maven War Plugin's overlay feature:


Here is a complete pom.xml example:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
  <name>extended-j2admin Maven Webapp</name>
              <!-- empty groupId/artifactId is detected as the current build

I have zipped up the entire project for you to play around with and put it
on my retired server here:


There are two files in the overlay project's webapp source:

1. the web.xml, to show an example of replacing an existing file, where I
simply changed the display-name and description as an example:

  <display-name>Sandra's Jetspeed-2 Portal Administration
  <description>Sandra's Administration Portlets for the Jetspeed-2
Enterprise Portal</description>

2. the index.jsp, to show an example of adding a new file

Confidentiality Notice:
The information contained in this communication, including attachments, is privileged and
confidential.  It is intended only for the exclusive use of the addressee.  If the reader
is not the intended recipient, or the employee, or the agent responsible for delivering it
to the intended recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have received this communication
in error, please notify us by return email or telephone immediately.  Thank you.

To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org

View raw message