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 Serge Huber <sh...@jahia.com> on 2004/06/08 17:14:11 UTC

Suggestion for Maven dependencies

Hi all,

Some of you may know, I am integrating my product with J2, and I was 
looking at automating synchronization between the two projects. One thing 
that is a little repetitive work is updating Maven dependencies, as Maven 
doesn't yet manage them in a transitive way (this is planned for Maven 2).

What I was wondering is if we could use entity references for Jetspeed's 
dependencies, much in the way it is done in the MevenIDE project. Basically 
what this means is moving all the dependencies into a separate XML file, 
and then referencing it from the project.xml file.

Here are some examples from the MevenIDE JBuilder plugin project :

Project XML file :
http://cvs.mevenide.codehaus.org/mevenide-ui-jbuilder/project.xml?rev=1.3&view=markup

Example of entity file :
http://cvs.mevenide.codehaus.org/mevenide-ui-jbuilder/pom-fragments/jbuilder-dependencies.xml?rev=1.1&view=markup

Now if we just look at this separately it doesn't seem interesting, but 
this means that people that what to include J2's dependencies no longer 
have to copy them around. So you could just do a &jetspeed2-dependencies in 
your project and automatically include all J2's dependencies.

Again this just a suggestion inspired by the problematic of using J2 as a 
re-usable component, it doesn't serve any direct purpose for J2 as a 
standalone project.

Regards,
   Serge Huber.



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


RE: Suggestion for Maven dependencies

Posted by Tim Reilly <ti...@consultant.com>.
> [Serge Huber wrote:]
> I'm wondering about dependency granularity. Some projects regroup
> multiple
> dependencies in one entity file, while the document you refer to
> does it in
> a much more granular way (seems better on first approach). What are you
> thought on this ?
>

Just my opinion, but a single entities file is one option. Aside from the
initial memory and parsing overhead having more entities defined in the
entities file than are actually used in any single POM's content wouldn't
affect anything. Since its not until the entity is 'de-referenced' in the
POM content that it effects any behavior.
So my thinking is with Serge - coarse grain / more centralized the better.

-TR


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


RE: Suggestion for Maven dependencies

Posted by Serge Huber <sh...@jahia.com>.
At 22:32 08.06.2004, you wrote:

>Wiki post on project consistency with Entities:
>http://wiki.codehaus.org/maven/EnsureProjectConsistencyWithEntities#head-f08
>4de6c54f76773e10827ea8619e139fa4af082
>The wiki has more detailed information, such as when war bundle is true,
>etc.

I'm wondering about dependency granularity. Some projects regroup multiple 
dependencies in one entity file, while the document you refer to does it in 
a much more granular way (seems better on first approach). What are you 
thought on this ?

Anyway, I'm +1 on these kinds of improvements, as I will always be with the 
ones that make our life easier when maintaining J2.



- -- --- -----=[ shuber2 at jahia dot com ]=---- --- -- -
www.jahia.org : A collaborative source CMS and Portal Server 



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


Re: Suggestion for Maven dependencies

Posted by Serge Huber <sh...@jahia.com>.
At 19:42 08.06.2004, you wrote:

>There is now a Jetspeed-2 plugin in development.
>You can create a new project template based.
>You also start the Hypersonic server, and run the SQL scripts via 
>jetspeed2 plugin goals.

Sounds powerful. How do I try this out ?


>However we have not addressed the issue of keep an existing project in 
>sync with J2, keeping up with refactoring.
>Perhaps this will become less of an issue when configuration is encapsulated
>However the assembly scripts will always have differences, with overriding 
>implementations etc
>Maybe we should look into a Groovy class, with methods that can be 
>overridden for example loadAggregator

Yes it would be great if the plugin could sync an existing project. I 
didn't think at first the plugin was targeted towards integrating J2 with 
other projects, I thought it's goal was mostly to help portlet application 
deployment, but I'm glad to see it will probably be very useful for my 
problematic too.

Regards,
   Serge Huber.



- -- --- -----=[ shuber2 at jahia dot com ]=---- --- -- -
www.jahia.org : A collaborative source CMS and Portal Server 



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


Re: [J2] Build Test Failure

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Jun 9, 2004, at 7:55 PM, David Le Strat wrote:

> Guys,
>
> FYI, the build currently fails on
> TestNavigationalState:
>
fixed


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


[J2] Build Test Failure

Posted by David Le Strat <dl...@yahoo.com>.
Guys,

FYI, the build currently fails on
TestNavigationalState:

Testsuite:
org.apache.jetspeed.container.session.TestNavigationalState
Tests run: 1, Failures: 1, Errors: 0, Time elapsed:
0.521 sec
------------- Standard Output ---------------
Starting Navs Mode and State test
URL =
http://www.sporteportal.com/jetspeed/portal/_st_33/minimized/_rp_33_test/1_one/_md_33/edit
------------- ---------------- ---------------

Testcase: testAllComponents took 0.181 sec
	FAILED
Session URL not equal expected:<...ac_33/AC/_...> but
was:<......>
junit.framework.ComparisonFailure: Session URL not
equal expected:<...ac_33/AC/_...> but was:<......>
	at
org.apache.jetspeed.container.session.TestNavigationalState.testAllComponents(TestNavigationalState.java:103)
	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Testcase: testAllComponents

Regards,

David.


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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


RE: Suggestion for Maven dependencies

Posted by Tim Reilly <ti...@consultant.com>.
Here is the thread on users@maven worth reviewing
http://nagoya.apache.org/eyebrowse/BrowseList?listName=users@maven.apache.or
g&by=thread&from=790023
(Ignore the resource filtering subject, I didn't realize these are archived
using some header and not the subject line.)

I can summarize and say that as it stands it will continue to work. A gui
tool is planned for the future that will help the multiple pom management
issue. Probably best to read the thread.

> Serge Huber [wrote]
>
> >##
> >Prior to a vote, let me ask on the maven-user list if using external
> >entities will be forward compatible with Maven 2, unless anyone already
> >knows?
>
> Yes that sounds reasonable. Do you know what the timeline for Maven 2 is ?
>

Not sure I'd get an answer as to when, although someone mentioned "m2 is a
ways off",
but that's in the context of the thread above.


Thanks,
-TR


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


RE: Suggestion for Maven dependencies

Posted by Serge Huber <sh...@jahia.com>.

>##
>Prior to a vote, let me ask on the maven-user list if using external
>entities will be forward compatible with Maven 2, unless anyone already
>knows?

Yes that sounds reasonable. Do you know what the timeline for Maven 2 is ?

Regards,
   Serge Huber.



- -- --- -----=[ shuber2 at jahia dot com ]=---- --- -- -
www.jahia.org : A collaborative source CMS and Portal Server 



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


Re: Suggestion for Maven dependencies

Posted by Scott T Weaver <sc...@binary-designs.net>.
+1 from me for sure.  Managing those deps is areal PITA.

On Tue, 2004-06-08 at 17:26, David Sean Taylor wrote:
> On Jun 8, 2004, at 1:32 PM, Tim Reilly wrote:
> 
> > Hi David & Serge,
> >
> > [David Sean Taylor wrote:]
> >> Another problem Im seeing is that we are not referencing the same
> >> versions of dependencies in components
> >> For example, different components have different dependencies on jars
> >> like commons-lang
> >> I think we need to ensure that we use the same jars in all components
> >
> > Externalizing POM dependencies as entities may help with this.
> > The specifics of the jar + version could be maintained in a central  
> > location
> > (dependency entities file).
> >
> > The pom for each component would have a declaration & dependency  
> > section
> > like this:
> > <?xml version="1.0"?>
> > <!DOCTYPE project [
> >     <!ENTITY % dependencies SYSTEM  
> > "file:../[somepath]/dependencies.ent">
> > %dependencies;
> > ]>
> > ...
> > <dependencies>
> >     &dep-commons-digester;
> >     &dep-commons-lang;
> > </dependencies>
> >
> > Wiki post on project consistency with Entities:
> > http://wiki.codehaus.org/maven/
> > EnsureProjectConsistencyWithEntities#head-f08
> > 4de6c54f76773e10827ea8619e139fa4af082
> > The wiki has more detailed information, such as when war bundle is  
> > true,
> > etc.
> >
> Thanks that was very useful and looks very easy to implement.
> We have to be careful with externalization because, as you pointed out,  
> some projects may need to have war-bundle true, while other's not.
> Should we vote on externalizing POM dependencies as entities?
> My vote is +1 to move all dependencies into a central location like in  
> the examples found on the Wiki link above.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
-- 
******************************************
*           Scott T. Weaver              *
*         <we...@apache.org>            *
*     <http://www.einnovation.com>       *   
* -------------------------------------- *
*   Apache Jetspeed Enterprise Portal    *
*     Apache Pluto Portlet Container     *
*                                        *
* OpenEditPro, Website Content Mangement *
*     <http://www.openeditpro.com>       *
******************************************


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


RE: Suggestion for Maven dependencies

Posted by Tim Reilly <ti...@consultant.com>.
[David Taylor wrote:]
> Thanks that was very useful and looks very easy to implement.
> We have to be careful with externalization because, as you pointed out,
> some projects may need to have war-bundle true, while other's not.
> Should we vote on externalizing POM dependencies as entities?
> My vote is +1 to move all dependencies into a central location like in
> the examples found on the Wiki link above.

Right, my example in the last email made the entire dependency node an
external entity,
they recommend only the artifactId, groupId, version, and url in the entity
declaration as in:

  <!ENTITY dep-junit "
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>3.8.1</version>
    <url>http://www.junit.org</url>
  ">

so that this is then possible:

  <dependency>&dep-junit;
     <properties>
        <war.bundle>true</war.bundle>
     </properties>
  </dependency>

##
Prior to a vote, let me ask on the maven-user list if using external
entities will be forward compatible with Maven 2, unless anyone already
knows?




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


Re: Suggestion for Maven dependencies

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Jun 8, 2004, at 1:32 PM, Tim Reilly wrote:

> Hi David & Serge,
>
> [David Sean Taylor wrote:]
>> Another problem Im seeing is that we are not referencing the same
>> versions of dependencies in components
>> For example, different components have different dependencies on jars
>> like commons-lang
>> I think we need to ensure that we use the same jars in all components
>
> Externalizing POM dependencies as entities may help with this.
> The specifics of the jar + version could be maintained in a central  
> location
> (dependency entities file).
>
> The pom for each component would have a declaration & dependency  
> section
> like this:
> <?xml version="1.0"?>
> <!DOCTYPE project [
>     <!ENTITY % dependencies SYSTEM  
> "file:../[somepath]/dependencies.ent">
> %dependencies;
> ]>
> ...
> <dependencies>
>     &dep-commons-digester;
>     &dep-commons-lang;
> </dependencies>
>
> Wiki post on project consistency with Entities:
> http://wiki.codehaus.org/maven/ 
> EnsureProjectConsistencyWithEntities#head-f08
> 4de6c54f76773e10827ea8619e139fa4af082
> The wiki has more detailed information, such as when war bundle is  
> true,
> etc.
>
Thanks that was very useful and looks very easy to implement.
We have to be careful with externalization because, as you pointed out,  
some projects may need to have war-bundle true, while other's not.
Should we vote on externalizing POM dependencies as entities?
My vote is +1 to move all dependencies into a central location like in  
the examples found on the Wiki link above.



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


RE: Suggestion for Maven dependencies

Posted by Tim Reilly <ti...@consultant.com>.
Hi David & Serge,

[David Sean Taylor wrote:]
> Another problem Im seeing is that we are not referencing the same
> versions of dependencies in components
> For example, different components have different dependencies on jars
> like commons-lang
> I think we need to ensure that we use the same jars in all components

Externalizing POM dependencies as entities may help with this.
The specifics of the jar + version could be maintained in a central location
(dependency entities file).

The pom for each component would have a declaration & dependency section
like this:
<?xml version="1.0"?>
<!DOCTYPE project [
    <!ENTITY % dependencies SYSTEM "file:../[somepath]/dependencies.ent">
%dependencies;
]>
...
<dependencies>
    &dep-commons-digester;
    &dep-commons-lang;
</dependencies>

Wiki post on project consistency with Entities:
http://wiki.codehaus.org/maven/EnsureProjectConsistencyWithEntities#head-f08
4de6c54f76773e10827ea8619e139fa4af082
The wiki has more detailed information, such as when war bundle is true,
etc.



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


Re: Suggestion for Maven dependencies

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Jun 8, 2004, at 8:14 AM, Serge Huber wrote:

>
> Hi all,
>
> Some of you may know, I am integrating my product with J2, and I was 
> looking at automating synchronization between the two projects. One 
> thing that is a little repetitive work is updating Maven dependencies, 
> as Maven doesn't yet manage them in a transitive way (this is planned 
> for Maven 2).

There is now a Jetspeed-2 plugin in development.
You can create a new project template based.
You also start the Hypersonic server, and run the SQL scripts via 
jetspeed2 plugin goals.

However we have not addressed the issue of keep an existing project in 
sync with J2, keeping up with refactoring.
Perhaps this will become less of an issue when configuration is 
encapsulated
However the assembly scripts will always have differences, with 
overriding implementations etc
Maybe we should look into a Groovy class, with methods that can be 
overridden for example loadAggregator

>
> What I was wondering is if we could use entity references for 
> Jetspeed's dependencies, much in the way it is done in the MevenIDE 
> project. Basically what this means is moving all the dependencies into 
> a separate XML file, and then referencing it from the project.xml 
> file.
>
I think this is possible. Perhaps the included file would be generated 
by the jetspeed2 plugin.

Another problem Im seeing is that we are not referencing the same 
versions of dependencies in components
For example, different components have different dependencies on jars 
like commons-lang
I think we need to ensure that we use the same jars in all components


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