You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Grzegorz Kossakowski <gr...@tuffmail.com> on 2007/07/04 23:53:42 UTC

Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Hi,

I created the bridge that was discussed in thread[1] and first impression is that it will work. I have successfully run Avalon component 
with database connection defined that way:

   <bean name="personnel" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
     <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
     <property name="url" value="jdbc:hsql://localhost:9002/cocoondb"/>
   </bean>

so the result is quite encouraging. My solution is totally transparent for users and very unobtrusive for Cocoon itself.

I tried to check it with Forms SQL samples also but I have not managed to run it because we depend on JDBI that is not on Maven repository. 
The question is: what's now? Should I contact with developer and ask him politely to upload his work to Maven repository?

As temporary solution, can we upload it to our Maven repository and introduce dependency on uploaded artifact? Does it demands a lot of 
work? Since my primary focus in on my GSoC project I will not be able to be able to spend much time on it.

On the other hand, if we want upcoming Cocoon release usable we really need to provide decent and *working* database access solution.
Jeroen, you have offered your help. Would you be interested in helping with issue?

Thanks for your reading.

[1] http://thread.gmane.org/gmane.text.xml.cocoon.devel/73925

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Grzegorz Kossakowski pisze:
> 
> I tried to check it with Forms SQL samples also but I have not managed 
> to run it because we depend on JDBI that is not on Maven repository. The 
> question is: what's now? Should I contact with developer and ask him 
> politely to upload his work to Maven repository?

It's not true that jDBI is not on Maven repository.
I created a new task in JIRA covering work needed to update do jDBI 2.0.x (the only version available on Maven's repository): 
https://issues.apache.org/jira/browse/COCOON-2087

Anyone is free to assign it to herself and work on it, I do not have time right know.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Sylvain Wallez <sy...@apache.org>.
Giacomo Pati wrote:

<snip/>

> In Maven 2 you can actually do
>
>     <repository>
>       <id>provided.local</id>
>       <name>Locally Provided Repository</name>
>       <url>file:${project.basedir}/repository</url>
>       ...
>     </repository>
>
> to achieve the same

Ah cool. I tried something similar 1.5 year ago but never managed to
have it work. Glad to see it is possible.

Sylvain

-- 
Sylvain Wallez - http://bluxte.net


Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Sylvain Wallez wrote:
> Grzegorz Kossakowski wrote:
>> Sylvain Wallez pisze:
>>> Grzegorz Kossakowski wrote:
>>>
>>> Is it impossible with Maven to use a local library?
>> I must admit I have not thought about this option, I guess I'm too
>> accustomed to the fact that everything is on Maven's repository.
>>
>> There is a bit of information here:
>> http://maven.apache.org/guides/mini/guide-installing-3rd-party-jars.html
>> and here:
>> http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html.
>>
>>
>> However, such a solution helps only if one checkouts sample from svn
>> and does mvn install. We can't release a pom that depend on something
>> that we install manually to local repository. It's quite easy and
>> quick solution but only temporary, IMHO.
>>
>> Sylvain, I know that you use Ivy, how it works there?
> 
> Well, you can do pretty much what you want with Ivy, since it is
> basically used to build an Ant classpath from an ivy.xml file that
> describes the project's dependencies. The dependencies are resolved
> using a chain of repositories.
> 
> In this particular case, we could have a chain consisting in a local
> repository (checked in in SVN), Cocoon's own repository and then the
> main Maven repository.
> 
> And since this is really about building a classpath (the library path in
> this case), we don't actually _need_ a local repository, and can build a
> classpath that is the concatenation of artifacts pulled from a
> repository and jar files in a "local-lib" directory.
> 
> Sylvain
> 

In Maven 2 you can actually do

    <repository>
      <id>provided.local</id>
      <name>Locally Provided Repository</name>
      <url>file:${project.basedir}/repository</url>
      ...
    </repository>

to achieve the same

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (GNU/Linux)

iD8DBQFGlJTsLNdJvZjjVZARAui6AKC6Gsj9mvW49tlADe+/ufmD+peMpACfeis1
gM/SccImNCUdhwOgLP8u/38=
=fQOu
-----END PGP SIGNATURE-----

Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Sylvain Wallez pisze:
> 
> Well, you can do pretty much what you want with Ivy, since it is
> basically used to build an Ant classpath from an ivy.xml file that
> describes the project's dependencies. The dependencies are resolved
> using a chain of repositories.
> 
> In this particular case, we could have a chain consisting in a local
> repository (checked in in SVN), Cocoon's own repository and then the
> main Maven repository.
> 
> And since this is really about building a classpath (the library path in
> this case), we don't actually _need_ a local repository, and can build a
> classpath that is the concatenation of artifacts pulled from a
> repository and jar files in a "local-lib" directory.

Ok. I understand how it helps if one checkouts source code from svn and builds it before running. How about packaging?
Such solution makes it impossible to use module as dependency for other one.

For cocoon-forms-sample it's not a problem at all because it's not likely that it will become a dependency to any other artifact but what 
about generalized situation?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Sylvain Wallez <sy...@apache.org>.
Grzegorz Kossakowski wrote:
> Sylvain Wallez pisze:
>> Grzegorz Kossakowski wrote:
>>
>> Is it impossible with Maven to use a local library?
>
> I must admit I have not thought about this option, I guess I'm too
> accustomed to the fact that everything is on Maven's repository.
>
> There is a bit of information here:
> http://maven.apache.org/guides/mini/guide-installing-3rd-party-jars.html
> and here:
> http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html.
>
>
> However, such a solution helps only if one checkouts sample from svn
> and does mvn install. We can't release a pom that depend on something
> that we install manually to local repository. It's quite easy and
> quick solution but only temporary, IMHO.
>
> Sylvain, I know that you use Ivy, how it works there?

Well, you can do pretty much what you want with Ivy, since it is
basically used to build an Ant classpath from an ivy.xml file that
describes the project's dependencies. The dependencies are resolved
using a chain of repositories.

In this particular case, we could have a chain consisting in a local
repository (checked in in SVN), Cocoon's own repository and then the
main Maven repository.

And since this is really about building a classpath (the library path in
this case), we don't actually _need_ a local repository, and can build a
classpath that is the concatenation of artifacts pulled from a
repository and jar files in a "local-lib" directory.

Sylvain

-- 
Sylvain Wallez - http://bluxte.net



Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Sylvain Wallez pisze:
> Grzegorz Kossakowski wrote:
> 
> Is it impossible with Maven to use a local library?

I must admit I have not thought about this option, I guess I'm too accustomed to the fact that everything is on Maven's repository.

There is a bit of information here: http://maven.apache.org/guides/mini/guide-installing-3rd-party-jars.html and here: 
http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html.

However, such a solution helps only if one checkouts sample from svn and does mvn install. We can't release a pom that depend on something 
that we install manually to local repository. It's quite easy and quick solution but only temporary, IMHO.

Sylvain, I know that you use Ivy, how it works there?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Sylvain Wallez <sy...@apache.org>.
Grzegorz Kossakowski wrote:
> Hi,
>
> I created the bridge that was discussed in thread[1] and first
> impression is that it will work. I have successfully run Avalon
> component with database connection defined that way:
>
>   <bean name="personnel"
> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>     <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
>     <property name="url" value="jdbc:hsql://localhost:9002/cocoondb"/>
>   </bean>
>
> so the result is quite encouraging. My solution is totally transparent
> for users and very unobtrusive for Cocoon itself.
>
> I tried to check it with Forms SQL samples also but I have not managed
> to run it because we depend on JDBI that is not on Maven repository.
> The question is: what's now? Should I contact with developer and ask
> him politely to upload his work to Maven repository?

Is it impossible with Maven to use a local library?

Sylvain

-- 
Sylvain Wallez - http://bluxte.net


Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Reinhard Poetz <re...@apache.org>.
Grzegorz Kossakowski wrote:
> Reinhard Poetz pisze:
>>
>> The database related samples in 2.1 use an embedded hsql instance 
>> which is already filled with the required data.
> 
> The question is how the database is filled with the required data? Isn't 
> a *.sql file applied on startup?

Hsqldb uses sql scripts to store its data. See the 2.1 samples to get the idea.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Reinhard Poetz pisze:
> 
> The database related samples in 2.1 use an embedded hsql instance which 
> is already filled with the required data.

The question is how the database is filled with the required data? Isn't a *.sql file applied on startup?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Reinhard Poetz <re...@apache.org>.
Grzegorz Kossakowski wrote:
> Jeroen Reijn pisze:
>> Hi Grzegorz,
>>
>> I do not have much time during the days, but in the evening I can try 
>> to help you out.
> 
> Ok. Another issue is that we need a mechanism for creating tables and 
> feeding them with initial data for samples so they have something to 
> operate on. I have no idea how it was done in C2.1. Some research is 
> needed.

The database related samples in 2.1 use an embedded hsql instance which is 
already filled with the required data.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Re: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Jeroen Reijn pisze:
> Hi Grzegorz,
> 
> I do not have much time during the days, but in the evening I can try to help you out.

Ok. Another issue is that we need a mechanism for creating tables and feeding them with initial data for samples so they have something to 
operate on. I have no idea how it was done in C2.1. Some research is needed.

To you and others: Do you think that filling issues in JIRA for such things so anyone can pick something up is a good idea? It only makes 
sense if we agree to continuously review the queue in JIRA. What do you think?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

RE: Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Posted by Jeroen Reijn <j....@hippo.nl>.
Hi Grzegorz,

I do not have much time during the days, but in the evening I can try to help you out.

Kind regards,

Jeroen Reijn


-----Original Message-----
From:	Grzegorz Kossakowski [mailto:grek@tuffmail.com]
Sent:	Wed 4-7-2007 23:53
To:	Cocoon's dev mailing list
Cc:	
Subject:	Module cocoon-forms-sample depends on JDBI that is not on Maven repo

Hi,

I created the bridge that was discussed in thread[1] and first impression is that it will work. I have successfully run Avalon component 
with database connection defined that way:

   <bean name="personnel" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
     <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
     <property name="url" value="jdbc:hsql://localhost:9002/cocoondb"/>
   </bean>

so the result is quite encouraging. My solution is totally transparent for users and very unobtrusive for Cocoon itself.

I tried to check it with Forms SQL samples also but I have not managed to run it because we depend on JDBI that is not on Maven repository. 
The question is: what's now? Should I contact with developer and ask him politely to upload his work to Maven repository?

As temporary solution, can we upload it to our Maven repository and introduce dependency on uploaded artifact? Does it demands a lot of 
work? Since my primary focus in on my GSoC project I will not be able to be able to spend much time on it.

On the other hand, if we want upcoming Cocoon release usable we really need to provide decent and *working* database access solution.
Jeroen, you have offered your help. Would you be interested in helping with issue?

Thanks for your reading.

[1] http://thread.gmane.org/gmane.text.xml.cocoon.devel/73925

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/