Matt Raible wrote:
<snip>
From: David Sean Taylor <[EMAIL PROTECTED]>
Date: April 13, 2006 2:08:36 AM MDT
To: Jetspeed Users List <[email protected]>
Subject: Re: WebLogic 9.1 - no worko
Reply-To: "Jetspeed Users List" <[email protected]>


Bryan Noll wrote:
Hello all... Mr. Watler told me that two gentlemen that frequent this
list, Ate Douma & David Taylor, may be able to provide some insight on
getting Jetspeed 2 up and going on Weblogic 9.1.  I'm about 3 hours
into it, and still haven't made it happen.  We seem to have gotten as
far as getting jetspeed itself deployed OK... but when attempting to
deploy any portlet war's to the jetspeed.war/WEB-INF/deploy, we
continually see the following:

I don't recommend Jetspeed's live deployment mechanism on Weblogic,
although it might work, I've never tried it recently.
Instead use our command line deploy tool to infuse the necessary
startup registration code into your webapp, and then package your
portlet applications specifically for Weblogic as you would any other
webapp, and deploy the app the same way you would deploy any other
webapp.

With this approach, the portlet application will register with
Jetspeed at runtime, during servlet init. Thus, you need to have
Jetspeed installed on Websphere prior to installing any other portlet
apps.

To Run the command line tool to infuse automatic registration of
portlet app at app server startup:

java -jar target/jetspeed-deploy-tools-2.0-M4-SNAPSHOT-uber.jar [-s]
source.war destination.war

-s: stripLoggers - remove commons-logging[version].jar and/or
log4j[version].jar from war
                   required when targetting application servers like JBoss
</snip>

It looks like this tool is broken in 2.0:

java -jar jetspeed-deploy-tools-2.0.jar ../deploy/rss.war
/opt/dev/tools/jonas-4.6.6/webapps/autoload/rss.war
Failed to load Main-Class manifest attribute from
jetspeed-deploy-tools-2.0.jar

The example David gave was with using the -uber.jar version of the deploy tool.
That one has a (uberjar specific) Main-Class defined, so you can simply run it with 
java -jar <jarfile>.

The -uber.jar isn't build automatically anymore (?) and not bundled with 
Jetspeed though.
You *can* build it yourself if you build Jetspeed from source though (using 
maven-1).
Then go to components/deploy-tool and invoke
  maven uberjar

I just tested that (against 2.1-dev trunk) and it still works, although the 
resulting -uber.jar is now 15Mb
and takes ages starting up :(

After you run your war through the DeployTool, you'll end up with an "infused" 
war as we call it.
That infused war then can be deployed to the application server the same way 
you would with any other war.
But you need to do so yourself (manually), no JSR-88 kind of features here.

I myself use the "normal" deploy-tools jar (the one you tested) and invoke it 
from a custom Maven goal.
You do need to setup the required dependencies yourself in the project.xml, and 
then invoke
the Main-Class org.apache.jetspeed.tools.deploy.JetspeedDeploy.

For clients which need offline "infusion", I created a skeleton (maven-1) 
portlet application project
already configured to "infuse" the project war using the JetspeedDeploy tool.

This skeleton can be used out of the box, just run:
  maven build

and you'll end up with a pa-template.war in the target folder which you then 
can deploy to your application server.

The custom maven build and infuse goals as defined in maven.xml look like this:

  <goal name='build'>
    <attainGoal name='clean'/>
    <attainGoal name='war'/>
    <attainGoal name='infuse'/>
  </goal>

  <goal name="infuse">
    <move file="${maven.build.dir}/${pom.artifactId}.war"
          tofile="${maven.build.dir}/_${pom.artifactId}.war"
          overwrite="true"/>
    <java classname="org.apache.jetspeed.tools.deploy.JetspeedDeploy" 
fork="true">
      <arg value='${maven.build.dir}/_${pom.artifactId}.war'/>
      <arg value='${maven.build.dir}/${pom.artifactId}.war'/>
      <classpath>
        <path refid="maven.dependency.classpath"/>
      </classpath>
    </java>
    <delete file="${maven.build.dir}/_${pom.artifactId}.war"/>
  </goal>

As you can see, its easy :)

I've attached the source of my skeleton pa-template project so you can test and 
use it as you like.

An additional nice feature of the skeleton is that it uses the new Jetspeed 
webapp-logging component
for easy and proper setup of Log4J and commons-logging based logging, 
independent of application server.
This component I've provided just recently to Jetspeed: 
http://issues.us.apache.org/jira/browse/JS2-508
So, you'll notice you need version 2.1-dev for it, as configured in the 
provided project.properties.
But, as it doesn't use any jetspeed specific features, you can use it with 2.0 
just as well, or any other
web application or portal for that matter.

Hope this might help all of you trying to set up and test Jetspeed on different 
application servers.

If you need more help just let me know!

Regards, Ate


I'm guessing this tool is something a JSR-88 compliant deployer?  It
allows you to deploy to a running Jetspeed application?  If so, how do
you decide where the output WAR is?  In your app server?

I did manage to get Jetspeed 2 running on WebLogic 9.1, but it's kinda
ugly.  I had to put an expanded "jetspeed" directory in the autodeploy
directory.  Then after deploying each portlet WAR in
jetspeed/WEB-INF/deploy, I had to shut down the server, create a
portletName directory in the autodeploy directory (where jetspeed
deploys the portlet WAR to) and unjar the WAR into this directory. After restarting WebLogic, the portlet shows up. Without this,
there's a "can't find real path" error or something like that.

I'd much rather use a deploy tool than dragging and dropping files.

Thanks,

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Attachment: pa-template.tar.gz
Description: application/crossover-gz

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to