You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Jeremy Boynes <jb...@gluecode.com> on 2004/08/27 19:29:51 UTC

Maven build?

Firstly, welcome to Apache, it's exciting to see the project here.

Looking through the BUILDING file and the tree there seem to be several 
dependencies for the project and a modular structure. This would seem to 
fit a maven model quite well and I would be willing to refactor the 
build to use it. Would this be helpful/of interest?

--
Jeremy
jboynes@apache.org
http://geronimo.apache.org

Re: Maven build?

Posted by Jeremy Boynes <jb...@gluecode.com>.
Samuel Andrew McIntyre wrote:

> Hi Jeremy,
> 
> This means that, unlike 
> most other Java projects, Derby has a specific build order as well: 
> (roughly) build core classes, build JDBC 2.0 classes, build JDBC 3.0 
> classes, build remainder. 

We have a very similar issue in a couple of other projects. What we've 
done there is have a separate module for each artifact (jar) that is 
being produced and use dependencies to ensure that they get built in the 
correct order.

> 
> Maven's dependency system is an excellent idea, but I'm not sure that it 
> is currently able to handle this situation. It seems like the runtime 
> classes for compilation of a project are always assumed to be those of 
> the JDK in which Maven is running. And while it is probably possible to 
> write a plugin for Maven that would handle compiling against the runtime 
> classes for multiple JDK revisions, it is probably not legal to add the 
> Java runtime classes for the JDKs we compile against to Maven's 
> dependency repository. :)
> 

I don't think that will be necessary - I think it should be possible to 
compile code with the appropriate JDK. However, a similar issue applies 
to other classes such as the OSGi library that require licensing. For 
those, the user can install them in their local repository manually or, 
if terms permit, install them in a private repo inside their organization.

> All that said, the rest of the build seems like it might fit into the 
> Maven model. And I like Maven's goal of project cross-pollination and 
> how it integrates with the other Apache projects. I for one would be 
> very interested to see how well Maven is able to handle our build, so if 
> you are willing to try it out, feel free to do so, and post your 
> findings here.
> 

Will do.

--
Jeremy

Re: Maven build?

Posted by Samuel Andrew McIntyre <fu...@nonintuitive.com>.
Hi Jeremy,

Maven is certainly an interesting tool, and I would be interested in 
seeing how it could be applied to the Derby build, but there is one 
problem that I'm not sure Maven handles well: we require the runtime 
classes from multiple JDKs in order to build.

Derby currently supports both JDBC 2.0 and JDBC 3.0, and instantiates 
the proper driver at runtime based on which version of the JDK in which 
Derby is running. This means that we need to compile the driver classes 
against the proper interfaces for the java.sql classes from both JDK 
1.3.x and JDK 1.4.x. This introduces a peculiar complexity into the 
build: when building the JDBC 2.0 driver, we need to make sure that the 
compilation classpath only includes the JDK 1.3.x classes, and when 
building the JDBC 3.0 driver, we need to make sure that the compilation 
classpath only includes the JDK 1.4.x classes. This means that, unlike 
most other Java projects, Derby has a specific build order as well: 
(roughly) build core classes, build JDBC 2.0 classes, build JDBC 3.0 
classes, build remainder. As you can imagine, once the JDBC 4.0 
specification is released, this situation will become even more 
complex, or will remain at least as complex.

Maven's dependency system is an excellent idea, but I'm not sure that 
it is currently able to handle this situation. It seems like the 
runtime classes for compilation of a project are always assumed to be 
those of the JDK in which Maven is running. And while it is probably 
possible to write a plugin for Maven that would handle compiling 
against the runtime classes for multiple JDK revisions, it is probably 
not legal to add the Java runtime classes for the JDKs we compile 
against to Maven's dependency repository. :)

All that said, the rest of the build seems like it might fit into the 
Maven model. And I like Maven's goal of project cross-pollination and 
how it integrates with the other Apache projects. I for one would be 
very interested to see how well Maven is able to handle our build, so 
if you are willing to try it out, feel free to do so, and post your 
findings here.

Thanks,
Andrew