You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Aaron Evans <aa...@gmail.com> on 2007/03/19 20:51:00 UTC

2.1 customized binary build

Hey guys,
I did a binary build today for 2.1 using maven 1. Worked perfectly.

However, when trying to integrate my custom ATN and ATZ SPI components
I am running into a problem.

What I have done to date to work my custom components into the project is this:

1. I build a few custom jars and put them in
${project.home}/target/jetspeed/WEB-INF/lib
2. I delete security-spi-atz.xml and security-spi-atn.xml from
${project.home}/target/jetspeedWEB-INF/assembly/
3. I add two files in their place: security-spi-atz-custom.xml and
security-spi-atn-custom.xml.
4. I create a file called ldap.properties in
${project.home}/target/jetspeed/WEB-INF/conf and include it from
jetspeed.properties. This file contains some properties that are
referenced in my custom assembly files.

The problem is when I am running maven j2:minStart:

[java] org.springframework.beans.factory.BeanDefinitionStoreException:
Error registering bean with name
'net.aaronevans.dataaccess.ldap.ContextProvider' defined in file
[C:\dev\workspace\jetspeed\target\portal-sql\assembly\security-spi-atn-custom.xml]:
Could not resolve placeholder 'org.apache.jetspeed.ldap.rootPassword'
    [java]      at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:242)
    [java]      at
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
    [java]      at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:316)
    [java]      at
org.apache.jetspeed.components.SpringComponentManager.<init>(SpringComponentManager.java:118)
    [java]      at
org.apache.jetspeed.components.jndi.SpringJNDIStarter.setUp(SpringJNDIStarter.java:90)
    [java]      at
org.apache.jetspeed.serializer.JetspeedSerializerApplication.main(JetspeedSerializerApplication.java:362)
    [java] [ERROR] Java Result: 1

I guess some files are pulled into
${project.home}/target/portal-sql/assembly for some purpose (I gather
to generate SQL files) and my custom files are being pulled in (though
they shouldn't be necessary).  Anyhow, the properties aren't resolving
and leads to the error above.

By the way, after this, the build still tells me it was successful but
really was not.

As a workaround, I should be able to do a default min build and then
just hot deploy my config changes, but I kind of preferred this other
way.  I could also just hard-code the settings, but I definitely don't
want to do that.

Is there some way I can either have my files excluded from
portal-sql/assembly or have the properties sucked in so they resolve?

thx,
aaron

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


Re: 2.1 customized binary build

Posted by Ate Douma <at...@douma.nu>.
David Jencks wrote:
> 
> On Mar 20, 2007, at 2:36 PM, David Sean Taylor wrote:
> 
>>
>> On Mar 20, 2007, at 11:19 AM, Aaron Evans wrote:
>>
>>> On 3/20/07, David Sean Taylor <da...@bluesunrise.com> wrote:
>>>>
>>>> The build isn't going to pick it up unless you put the dependencies
>>>> in your project.xml (maven-1)
>>>> Are you doing a building with a custom Maven-1 build? (btw I will be
>>>> proposing deprecating Maven-1 build soon...)
>>>
>>> I am using the standard maven-1 binary  build using the plugin. I do
>>> realize you guys want to standardize on 2 and I understand why.
>>> Unfortunate though because it works so well. ;-)
>>
>> Just a proposal ... we can all vote on where we want to go from here
>> Im happy to continue with Maven-1 if thats what people want
>> However Im not happy to continue with two builds
>>
>>
> 
> Please no more maven 1!  I have enough trouble finding any time to keep 
> up with jetspeed and having to deal with m1 will keep me from even trying.
David, rest assured :)

We do plan to move to maven-2 very soon now, and with a complete new build setup (probably more along the lines you draw some months ago).
I've already started a new branch for working out all the changes required for that:
   https://svn.apache.org/repos/asf/portals/jetspeed-2/branches/J2-M2-REDUX

Note: I have done no more yet than delete all maven-1 *and* maven-2 build configurations, I plan to start moving the folders around in conformance to the 
maven-2 guidelines shortly.
My current plans:
- no more quirky archetype/ant scripting code, but (first of all) just plain maven-2 artifact creations.
- as less as possible profiles usage, preference to use just a set of simple "assembly" style portal/deployment projects
- additionally some set of ant build scripts for custom portal development, probably going to use maven-ant tasks for that

Now, when that has all be done and verified to be working fine and allows a proper upgrade/migration path for our current (both maven-1 and maven-2) users,
I see no reason to stick to maven-1 anymore.

> 
> What reasons do you have for even considering staying with maven 1?  
Well, we *do* have quite a large group of users who still very much depend on this, and I think we should not brutally cut them off just like that, do you?
> When I've looked at the build in the past it looked to me that the only 
> things maven scripting were being used for were dreadful hacks due to 
> bad project structure and big limitations of maven 1.  
Well, that might be true, that doesn't mean we can just throw it away just like that.

> IIRC I pointed 
> some of these out on my last visit a few months back and was told they 
> couldn't be changed because of the m1 build.  If you really need fancy 
> scripting you can still use ant and groovy.
Its not because we "fancy" scripting, but because of the limitations of maven-1 (and still maven-2 as well I suspect) which makes it not so easy to provide a 
acceptable customizable build environment for *end users*.
We developers usually are more flexible in how we manage our environments, or have a very limited set of use-cases to handle.
But our community is much more divers than that, and we do our best to help them out.
I agree we probably made some big mistakes in the past how we setup our maven-1 (and maven-2) build environment, and I'm willing to spend quite a lot of time to 
"fix" that soon. And your input has been quite valuable for that, and I hope to get more too ;)

Regards,

Ate
> 
> thanks
> david jencks
> 
> 
> PS Congratulations on the 2.1 release!
Thanks!


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


Re: 2.1 customized binary build

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Mar 24, 2007, at 7:27 AM, David Jencks wrote:

>
> On Mar 20, 2007, at 2:36 PM, David Sean Taylor wrote:
>
>>
>> On Mar 20, 2007, at 11:19 AM, Aaron Evans wrote:
>>
>>> On 3/20/07, David Sean Taylor <da...@bluesunrise.com> wrote:
>>>>
>>>> The build isn't going to pick it up unless you put the dependencies
>>>> in your project.xml (maven-1)
>>>> Are you doing a building with a custom Maven-1 build? (btw I  
>>>> will be
>>>> proposing deprecating Maven-1 build soon...)
>>>
>>> I am using the standard maven-1 binary  build using the plugin. I do
>>> realize you guys want to standardize on 2 and I understand why.
>>> Unfortunate though because it works so well. ;-)
>>
>> Just a proposal ... we can all vote on where we want to go from here
>> Im happy to continue with Maven-1 if thats what people want
>> However Im not happy to continue with two builds
>>
>>
>
> Please no more maven 1!  I have enough trouble finding any time to  
> keep up with jetspeed and having to deal with m1 will keep me from  
> even trying.
>

I hear you

> What reasons do you have for even considering staying with maven 1?

I am not so much saying "lets stay with Maven-1" as I am saying "it  
is now time to rework the build and I can't stand to go on with two  
builds and two custom builds, lets do one build really well from  
scratch"
Where as Ate and I prefer to continue with Maven-2, and remove the  
Maven-1 build,  we have to vote on the decision
So Ate is working on a branch for a new Maven-2 build
Once its ready we can review it, improve it, vote ....

>   When I've looked at the build in the past it looked to me that  
> the only things maven scripting were being used for were dreadful  
> hacks due to bad project structure and big limitations of maven 1.   
> IIRC I pointed some of these out on my last visit a few months back  
> and was told they couldn't be changed because of the m1 build.  If  
> you really need fancy scripting you can still use ant and groovy.

> thanks
> david jencks
>
>
> PS Congratulations on the 2.1 release!
>
>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>



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


Re: 2.1 customized binary build

Posted by David Jencks <da...@yahoo.com>.
On Mar 20, 2007, at 2:36 PM, David Sean Taylor wrote:

>
> On Mar 20, 2007, at 11:19 AM, Aaron Evans wrote:
>
>> On 3/20/07, David Sean Taylor <da...@bluesunrise.com> wrote:
>>>
>>> The build isn't going to pick it up unless you put the dependencies
>>> in your project.xml (maven-1)
>>> Are you doing a building with a custom Maven-1 build? (btw I will be
>>> proposing deprecating Maven-1 build soon...)
>>
>> I am using the standard maven-1 binary  build using the plugin. I do
>> realize you guys want to standardize on 2 and I understand why.
>> Unfortunate though because it works so well. ;-)
>
> Just a proposal ... we can all vote on where we want to go from here
> Im happy to continue with Maven-1 if thats what people want
> However Im not happy to continue with two builds
>
>

Please no more maven 1!  I have enough trouble finding any time to  
keep up with jetspeed and having to deal with m1 will keep me from  
even trying.

What reasons do you have for even considering staying with maven 1?   
When I've looked at the build in the past it looked to me that the  
only things maven scripting were being used for were dreadful hacks  
due to bad project structure and big limitations of maven 1.  IIRC I  
pointed some of these out on my last visit a few months back and was  
told they couldn't be changed because of the m1 build.  If you really  
need fancy scripting you can still use ant and groovy.

thanks
david jencks


PS Congratulations on the 2.1 release!


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


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


RE: 2.1 customized binary build

Posted by "Timony, Michael" <Mi...@FMR.COM>.
Maven 1 may be easier, but the Maven people appear to be recommending
that people move to Maven 2 and get off Maven 1. I would worry that
Maven 1 is not being updated and maintained as well as Maven 2 is?

Also, we're creating our builds with Maven2 and have to go back to
Maven1 could cause us (and our developers) a lot of pain.

Mick Timony

-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com] 
Sent: Tuesday, March 20, 2007 2:37 PM
To: Jetspeed Developers List
Subject: Re: 2.1 customized binary build


On Mar 20, 2007, at 11:19 AM, Aaron Evans wrote:

> On 3/20/07, David Sean Taylor <da...@bluesunrise.com> wrote:
>>
>> The build isn't going to pick it up unless you put the dependencies 
>> in your project.xml (maven-1) Are you doing a building with a custom 
>> Maven-1 build? (btw I will be proposing deprecating Maven-1 build 
>> soon...)
>
> I am using the standard maven-1 binary  build using the plugin. I do 
> realize you guys want to standardize on 2 and I understand why.
> Unfortunate though because it works so well. ;-)

Just a proposal ... we can all vote on where we want to go from here Im
happy to continue with Maven-1 if thats what people want However Im not
happy to continue with two builds




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


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


Re: 2.1 customized binary build

Posted by Aaron Evans <aa...@gmail.com>.
On 3/20/07, David Sean Taylor <da...@bluesunrise.com> wrote:
>
> Just a proposal ... we can all vote on where we want to go from here
> Im happy to continue with Maven-1 if thats what people want
> However Im not happy to continue with two builds
>

I don't think I'm qualified to have a vote since I've never tried the
maven 2 build and I only use maven to get my binary build done.
Otherwise I know nothing about it.  I guess what I'm getting at is I'm
just lazy and fear change. :-D

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


Re: 2.1 customized binary build

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Mar 20, 2007, at 11:19 AM, Aaron Evans wrote:

> On 3/20/07, David Sean Taylor <da...@bluesunrise.com> wrote:
>>
>> The build isn't going to pick it up unless you put the dependencies
>> in your project.xml (maven-1)
>> Are you doing a building with a custom Maven-1 build? (btw I will be
>> proposing deprecating Maven-1 build soon...)
>
> I am using the standard maven-1 binary  build using the plugin. I do
> realize you guys want to standardize on 2 and I understand why.
> Unfortunate though because it works so well. ;-)

Just a proposal ... we can all vote on where we want to go from here
Im happy to continue with Maven-1 if thats what people want
However Im not happy to continue with two builds




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


Re: 2.1 customized binary build

Posted by Aaron Evans <aa...@gmail.com>.
On 3/20/07, David Sean Taylor <da...@bluesunrise.com> wrote:
>
> The build isn't going to pick it up unless you put the dependencies
> in your project.xml (maven-1)
> Are you doing a building with a custom Maven-1 build? (btw I will be
> proposing deprecating Maven-1 build soon...)

I am using the standard maven-1 binary  build using the plugin. I do
realize you guys want to standardize on 2 and I understand why.
Unfortunate though because it works so well. ;-)

> If yes, then I think you can add your dependencies in the root
> project.xml of your custom portal project
>

Ok, I'll try that.

thx,
aaron

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


Re: 2.1 customized binary build

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Mar 20, 2007, at 10:38 AM, Aaron Evans wrote:

> On 3/20/07, David Sean Taylor <da...@bluesunrise.com> wrote:
>>
>> As for your jar files, are you saying that they are not in the
>> classpath during the build or at application startup?
>>
>
> It is during the build.  At application startup they are there because
> I have copied them into ${project.home}/target/jetspeed/WEB-INF/lib.
>
The build isn't going to pick it up unless you put the dependencies  
in your project.xml (maven-1)
Are you doing a building with a custom Maven-1 build? (btw I will be  
proposing deprecating Maven-1 build soon...)
If yes, then I think you can add your dependencies in the root  
project.xml of your custom portal project




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


Re: 2.1 customized binary build

Posted by Aaron Evans <aa...@gmail.com>.
On 3/20/07, David Sean Taylor <da...@bluesunrise.com> wrote:
>
> As for your jar files, are you saying that they are not in the
> classpath during the build or at application startup?
>

It is during the build.  At application startup they are there because
I have copied them into ${project.home}/target/jetspeed/WEB-INF/lib.

thx,
aaron

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


Re: 2.1 customized binary build

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Mar 19, 2007, at 1:10 PM, Aaron Evans wrote:

> On 3/19/07, Aaron Evans <aa...@gmail.com> wrote:
>>
>> As a workaround, I should be able to do a default min build and then
>> just hot deploy my config changes, but I kind of preferred this other
>> way.  I could also just hard-code the settings, but I definitely  
>> don't
>> want to do that.
>>
>
> Actually, I tried hard-coding my settings and that didn't help because
> my custom jars are not included in whatever classpath is used for this
> assembly...
>

Here is an example of how you could get properties in a Spring  
configuration file:

     <bean id="placeholderConfig"  
class="org.springframework.beans.factory.config.PropertyPlaceholderConfi 
gurer">
         <property name="locations">
             <list>
                 <value>file:///${applicationRoot}/WEB-INF/assembly/ 
ldap.properties</value>
             </list>
         </property>
     </bean>


As for your jar files, are you saying that they are not in the  
classpath during the build or at application startup?





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


Re: 2.1 customized binary build

Posted by Aaron Evans <aa...@gmail.com>.
On 3/19/07, Aaron Evans <aa...@gmail.com> wrote:
>
> As a workaround, I should be able to do a default min build and then
> just hot deploy my config changes, but I kind of preferred this other
> way.  I could also just hard-code the settings, but I definitely don't
> want to do that.
>

Actually, I tried hard-coding my settings and that didn't help because
my custom jars are not included in whatever classpath is used for this
assembly...

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