Karl Wright created CONNECTORS-912:
--------------------------------------

             Summary: MCF binary build should provide build environment for 
user connectors
                 Key: CONNECTORS-912
                 URL: https://issues.apache.org/jira/browse/CONNECTORS-912
             Project: ManifoldCF
          Issue Type: Improvement
          Components: Build, Documentation
    Affects Versions: ManifoldCF 1.6
            Reporter: Karl Wright
            Assignee: Karl Wright
             Fix For: ManifoldCF 1.6


Right now the way people are told to develop connectors, they must download 
sources and integrate their connector into the MCF tree.  This involves 
understand some very complicated makefiles, and also means that they cannot 
easily extend a binary release.

Instead, I propose that (a) the build structure is revised to allow connectors 
to build against a MCF binary release, and (b) binary releases also include 
enough of the build system to make this feasible.  I've figured out a way to do 
this for ant at least already, and I believe that for Maven it will simply just 
require connectors to no longer be subprojects of the MCF root.  Instead, the 
framework and each connector would be independent projects.

For ant, the proposal is as follows:
(1) All connectors build against an MCF distribution area
(2) The MCF distribution area will contain a connector-build.xml
(3) There will be code in each connector's build.xml that accepts an 
environment variable to reference the MCF distribution area, for example:

{code}
    <property environment="env"/>
    <condition property="mcf-dist-path" value="${env.DISTPATH}">
        <isset property="env.DISTPATH"/>
    </condition>
    <condition property="mcf-dist-path" value="../../dist">
        <not>
            <isset property="env.DISTPATH"/>
        </not>
    </condition>

    <import file="${mcf-dist-path}/connector-build.xml"/>
{code}

I've tried this and it works.  In this way, both standard builds and 
third-party connector builds can readily be supported.

The other requirements for this change are the following:
(1) The connector build needs to control installation of the connector into the 
examples, so targets that do this must be moved from the main build.xml to 
connector-build.xml
(2) Connector unit tests will require dist area test jars to be delivered too
(3) Integration tests may benefit from a similar test-centric setup
(4) The main build file should be completely rewritten, and become heavily 
parametrized instead of having so many explicit targets
(5) Conditional delivery logic will also need to be ported to 
connector-build.xml

This is not a small task by any means, but it *can* be done on a branch since I 
don't believe it would require significant tree reorganization.  If tree 
reorganization *does* turn out to be required, that should be committed to 
trunk as a separate step.




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to