Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 98712 invoked from network); 8 Feb 2010 18:49:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2010 18:49:50 -0000 Received: (qmail 60179 invoked by uid 500); 8 Feb 2010 18:49:49 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 60137 invoked by uid 500); 8 Feb 2010 18:49:49 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 60127 invoked by uid 99); 8 Feb 2010 18:49:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 18:49:49 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.17.95.70] (HELO mx1.dvsAnalytics.com) (66.17.95.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 18:49:39 +0000 Received: from m2.TDILAN.com ([172.20.3.16]) by m2.TDILAN.com ([172.20.3.16]) with mapi; Mon, 8 Feb 2010 11:49:18 -0700 From: "Dahl, Sandra" To: Jetspeed Developers List Date: Mon, 8 Feb 2010 11:49:16 -0700 Subject: RE: login portlet extension Thread-Topic: login portlet extension Thread-Index: AcqlJTXCVDHiG48eQMS55lrqz18JCQDw33dw Message-ID: <85471C1B26954D4D9622A450644A969001825814C2B8@m2.TDILAN.com> References: <85471C1B26954D4D9622A450644A969001825814BAFE@m2.TDILAN.com> <4a35d831002021553r50a2b4e9n416e259edc3a9eea@mail.gmail.com> <85471C1B26954D4D9622A450644A969001825814BBDB@m2.TDILAN.com> <4a35d831002031503r629012e0re6f3651c0b9034e1@mail.gmail.com> In-Reply-To: <4a35d831002031503r629012e0re6f3651c0b9034e1@mail.gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi, David. Thank you for the example. I am trying the maven solution you ha= ve below and get the error below when running org.apache.maven.plugins:mave= n-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:wa= r] [INFO] --------------------------------------------------------------------= ---- [INFO] [war:war {execution: default-cli}] [INFO] Exploding webapp... [INFO] Assembling webapp extended-j2admin in W:\eclipseWorkspace\extended-j= 2admin\target\extended-j2admin [INFO] Copy webapp webResources to W:\eclipseWorkspace\extended-j2admin\tar= get\extended-j2admin [INFO] --------------------------------------------------------------------= ---- [ERROR] BUILD ERROR [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 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 yourself 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, let= s 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. 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 ar= e 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: http://maven.apache.org/plugins/maven-war-plugin/overlays.html Here is a complete pom.xml example: 4.0.0 org.apache.portals.jetspeed-2 extended-j2admin war 0.0.1-SNAPSHOT extended-j2admin Maven Webapp http://maven.apache.org junit junit 3.8.1 test org.apache.portals.jetspeed-2 j2-admin war 2.2.1-SNAPSHOT extended-j2admin org.apache.maven.plugins maven-war-plugin j2-admin org.apache.portals.jetspeed-2 j2-admin I have zipped up the entire project for you to play around with and put it on my retired server here: http://www.bluesunrise.com/jetspeed-2/2.2/extended-j2admin.zip 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: Sandra's Jetspeed-2 Portal Administration Portlets Sandra's Administration Portlets for the Jetspeed-2 Enterprise Portal 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 employe= e, or the agent responsible for delivering it to the intended recipient, yo= u are hereby notified that any dissemination, distribution or copying of th= is communication is strictly prohibited. If you have received this communi= cation 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