You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Brice Lambi <la...@gmail.com> on 2007/03/27 21:10:31 UTC

maven2 plugin

Hello,

I have a few questions about the maven2 plugin for jetspeed.  I created
a new portlet app using the portal-application archetype.  The directory
structure created is not standard for maven2.  I get src/java instead of
src/main/java as the source directory.  Why is this?  This makes it
difficult to use this project outside of the jetspeed build.  If I move
everything to src/main, it complains about not being a web app.  It does
the same with the component-archetype.

Also, I added my new app to the app-server pom and the tomcat-build.xml
so that it will be deployed with the portal.  All I get is a failed to
retrieve portlet definition/access denied error(the only security
constraint I have is user).  Looking at the logs, I never see the
"JetspeedContainerServlet: starting initialization of Portlet
Application" notification.  Also manually deploying my app to
WEB-INF/deploy does nothing.  If I remove my app from the app-server pom
and tomcat-build.xml and then redeploy the portal and manually deploy my
app, it works fine.

Also, after deploying my portal I try to log in as manager and I all the
admin portlets I get access denied.  The admin account works just fine.

The plugin looks great, if I can get these things worked out it will
greatly simplify my deployment process.

Thanks,
Brice


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


Re: maven2 plugin

Posted by Mikko Wuokko <mi...@evtek.fi>.
Hi.

I'we used my own portlet app modules for a long time now. One thing I 
struggled was that for the infused-hot-deployment you have to add these 
lines to the web.xml of the portlet:

...

<!--
	This servlet is needed for hot deployment
	e.g. without putting it into jetspeeds deploy folder
-->

   <servlet>
     <servlet-name>JetspeedContainer</servlet-name>
 
<servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
     <init-param>
       <param-name>contextName</param-name>
       <param-value>YOUPORTLETAPPCONTEXTNAME</param-value>
     </init-param>
     <load-on-startup>100</load-on-startup>
   </servlet>

   <servlet-mapping>
      <servlet-name>
         JetspeedContainer
      </servlet-name>
      <url-pattern>
        /container/*
      </url-pattern>
   </servlet-mapping>

....

Other option would be to use the "plain" hot-deployment, which will copy 
the wars into jetspeed/WEB-INF/deploy. Anyway some mods to 
tomcat-build.xml is needed and of course the new module to the 
applications pom. Maybe these lines are needed also to your portlet 
webapps pom:

...
     <parent>
         <groupId>org.apache.portals.jetspeed-2</groupId>
         <artifactId>applications</artifactId>
         <version>2.2-dev</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
...

Hope this will help.

-Mikko

Brice Lambi wrote:
> On Tue, 2007-04-03 at 08:54 -0700, David Sean Taylor wrote:
>> On Mar 27, 2007, at 12:10 PM, Brice Lambi wrote:
>>
>>> Hello,
>>>
>>> I have a few questions about the maven2 plugin for jetspeed.  I  
>>> created
>>> a new portlet app using the portal-application archetype.  The  
>>> directory
>>> structure created is not standard for maven2.  I get src/java  
>>> instead of
>>> src/main/java as the source directory.  Why is this?
>> This is because we are trying to keep with the Maven-1 standard
>> With 2.1 we are stuck between two builds (Maven-1 and Maven-2)
>> 2.2 will drop the Maven-1 build support, and move to a true Maven-2  
>> build and directory structure
>>
>> Anyway for a portlet-app I think many folks may prefer the directory  
>> layout of an Eclipse web project
>>
>>> This makes it
>>> difficult to use this project outside of the jetspeed build.  If I  
>>> move
>>> everything to src/main, it complains about not being a web app.  It  
>>> does
>>> the same with the component-archetype.
>>>
>> Understood.
>> We will consider this in the new build refactoring, thanks
>>
>>> Also, I added my new app to the app-server pom and the tomcat- 
>>> build.xml
>>> so that it will be deployed with the portal.  All I get is a failed to
>>> retrieve portlet definition/access denied error(the only security
>>> constraint I have is user).  Looking at the logs, I never see the
>>> "JetspeedContainerServlet: starting initialization of Portlet
>>> Application" notification.  Also manually deploying my app to
>>> WEB-INF/deploy does nothing.  If I remove my app from the app- 
>>> server pom
>>> and tomcat-build.xml and then redeploy the portal and manually  
>>> deploy my
>>> app, it works fine.
>>>
>> I don't remember ever having to modify the tomcat-build.xml
>> Just make sure the applications/pom.xml includes your new module:
>>
>>   <modules>
>>          <module>myPA</module>
>>
> 
> The new docs don't mention editing tomcat-build.xml or any poms other
> than adding the module to applications/pom.xml, but my portlet-app
> wasn't being deployed.  So I followed the instructions on the wiki to
> add my app to the poms and tomcat-build.xml and then it was being
> deployed.  I still had the earlier problem.  I'll keep messing with it,
> maybe I'm still using the 2.1-dev plugin.
> 
>>> Also, after deploying my portal I try to log in as manager and I  
>>> all the
>>> admin portlets I get access denied.  The admin account works just  
>>> fine.
>>>
>>> The plugin looks great, if I can get these things worked out it will
>>> greatly simplify my deployment process.
>> Not sure what is going on... did you configure your Maven-2  
>> settings.xml?
>>
> 
> You're right, I didn't have the j2deployer account created on tomcat,
> this might be the problem.
> 
> Thanks!
> Brice
> 
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 

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


Re: maven2 plugin

Posted by Brice Lambi <la...@gmail.com>.
On Tue, 2007-04-03 at 08:54 -0700, David Sean Taylor wrote:
> On Mar 27, 2007, at 12:10 PM, Brice Lambi wrote:
> 
> > Hello,
> >
> > I have a few questions about the maven2 plugin for jetspeed.  I  
> > created
> > a new portlet app using the portal-application archetype.  The  
> > directory
> > structure created is not standard for maven2.  I get src/java  
> > instead of
> > src/main/java as the source directory.  Why is this?
> 
> This is because we are trying to keep with the Maven-1 standard
> With 2.1 we are stuck between two builds (Maven-1 and Maven-2)
> 2.2 will drop the Maven-1 build support, and move to a true Maven-2  
> build and directory structure
> 
> Anyway for a portlet-app I think many folks may prefer the directory  
> layout of an Eclipse web project
> 
> > This makes it
> > difficult to use this project outside of the jetspeed build.  If I  
> > move
> > everything to src/main, it complains about not being a web app.  It  
> > does
> > the same with the component-archetype.
> >
> 
> Understood.
> We will consider this in the new build refactoring, thanks
> 
> > Also, I added my new app to the app-server pom and the tomcat- 
> > build.xml
> > so that it will be deployed with the portal.  All I get is a failed to
> > retrieve portlet definition/access denied error(the only security
> > constraint I have is user).  Looking at the logs, I never see the
> > "JetspeedContainerServlet: starting initialization of Portlet
> > Application" notification.  Also manually deploying my app to
> > WEB-INF/deploy does nothing.  If I remove my app from the app- 
> > server pom
> > and tomcat-build.xml and then redeploy the portal and manually  
> > deploy my
> > app, it works fine.
> >
> 
> I don't remember ever having to modify the tomcat-build.xml
> Just make sure the applications/pom.xml includes your new module:
> 
>   <modules>
>          <module>myPA</module>
> 

The new docs don't mention editing tomcat-build.xml or any poms other
than adding the module to applications/pom.xml, but my portlet-app
wasn't being deployed.  So I followed the instructions on the wiki to
add my app to the poms and tomcat-build.xml and then it was being
deployed.  I still had the earlier problem.  I'll keep messing with it,
maybe I'm still using the 2.1-dev plugin.

> > Also, after deploying my portal I try to log in as manager and I  
> > all the
> > admin portlets I get access denied.  The admin account works just  
> > fine.
> >
> > The plugin looks great, if I can get these things worked out it will
> > greatly simplify my deployment process.
> 
> Not sure what is going on... did you configure your Maven-2  
> settings.xml?
> 

You're right, I didn't have the j2deployer account created on tomcat,
this might be the problem.

Thanks!
Brice

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


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


Re: maven2 plugin

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Mar 27, 2007, at 12:10 PM, Brice Lambi wrote:

> Hello,
>
> I have a few questions about the maven2 plugin for jetspeed.  I  
> created
> a new portlet app using the portal-application archetype.  The  
> directory
> structure created is not standard for maven2.  I get src/java  
> instead of
> src/main/java as the source directory.  Why is this?

This is because we are trying to keep with the Maven-1 standard
With 2.1 we are stuck between two builds (Maven-1 and Maven-2)
2.2 will drop the Maven-1 build support, and move to a true Maven-2  
build and directory structure

Anyway for a portlet-app I think many folks may prefer the directory  
layout of an Eclipse web project

> This makes it
> difficult to use this project outside of the jetspeed build.  If I  
> move
> everything to src/main, it complains about not being a web app.  It  
> does
> the same with the component-archetype.
>

Understood.
We will consider this in the new build refactoring, thanks

> Also, I added my new app to the app-server pom and the tomcat- 
> build.xml
> so that it will be deployed with the portal.  All I get is a failed to
> retrieve portlet definition/access denied error(the only security
> constraint I have is user).  Looking at the logs, I never see the
> "JetspeedContainerServlet: starting initialization of Portlet
> Application" notification.  Also manually deploying my app to
> WEB-INF/deploy does nothing.  If I remove my app from the app- 
> server pom
> and tomcat-build.xml and then redeploy the portal and manually  
> deploy my
> app, it works fine.
>

I don't remember ever having to modify the tomcat-build.xml
Just make sure the applications/pom.xml includes your new module:

  <modules>
         <module>myPA</module>

> Also, after deploying my portal I try to log in as manager and I  
> all the
> admin portlets I get access denied.  The admin account works just  
> fine.
>
> The plugin looks great, if I can get these things worked out it will
> greatly simplify my deployment process.

Not sure what is going on... did you configure your Maven-2  
settings.xml?




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