You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Lars Huttar <la...@sil.org> on 2005/06/10 18:50:08 UTC

compiling a custom transformer

Hello,

I've been wanting to use the ValidationTransformer and 
ValidationTransformerReporter described on the wiki at
http://wiki.apache.org/cocoon/ValidationTransformer
The source code is given in some java files but I'm having trouble
compiling them.

In particular, the code has imports for various other Cocoon components.
I could add all the .jar files Cocoon uses into the CLASSPATH, but that
would be pretty laborious.
What is the normal mechanism for compiling such Java files? Of course I
will then want to put the classes into a jar, install that in the right
place, and have Cocoon find it.
Can I accomplish all that by putting the files into a new block? If so,
what is the procedure for creating a block?

I have searched around on cocoon.apache.org and the wiki and mailing 
list archives for info on creating a block, but all I see is discussion 
about how blocks should be designed to work in the future.

Any help would be appreciated.

I have contacted the author of ValidationTransformer a couple of times 
but have not received a reply.

Lars



Re: compiling a custom transformer

Posted by Ralph Goers <Ra...@dslextreme.com>.
I believe I just saw something today in Daisy that documented that and I 
think it was copied from the Wiki. I'd look there.

Ralph

Lars Huttar wrote:

> Ralph Goers wrote:
>
>> I use maven to do my builds. The jars are all in our local 
>> repository. These are the dependencies I have in my project.xml to 
>> compile:
>> ...
>
>
> Thanks for your reply.
>
> I haven't used Maven, and I'm reluctant to add another third-party 
> tool to our process.
>
> Is there a way to compile these extensions just using the Cocoon (Ant) 
> build script? E.g. by adding a block?
>
> Thanks,
> Lars
>


Re: compiling a custom transformer

Posted by Lars Huttar <la...@sil.org>.
Ralph Goers wrote:

> I use maven to do my builds. The jars are all in our local repository. 
> These are the dependencies I have in my project.xml to compile:
> ...

Thanks for your reply.

I haven't used Maven, and I'm reluctant to add another third-party tool 
to our process.

Is there a way to compile these extensions just using the Cocoon (Ant) 
build script? E.g. by adding a block?

Thanks,
Lars


Re: compiling a custom transformer

Posted by Ralph Goers <Ra...@dslextreme.com>.
I use maven to do my builds. The jars are all in our local repository. 
These are the dependencies I have in my project.xml to compile:
 <dependency>
      <groupId>cocoon</groupId>
      <artifactId>cocoon</artifactId>
      <url>http://cocoon.apache.org/2.1/</url>
    </dependency>
    <dependency>
      <groupId>excalibur</groupId>
      <artifactId>excalibur-sourceresolve</artifactId>
      <url>http://avalon.apache.org/</url>
    </dependency>
    <dependency>
      <groupId>excalibur</groupId>
      <artifactId>excalibur-pool</artifactId>
      <url>http://avalon.apache.org/</url>
    </dependency>
    <dependency>
      <artifactId>avalon-framework</artifactId>
      <groupId>avalon-framework</groupId>
      <url>http://avalon.apache.org/</url>
    </dependency>

And these are the additional dependencies I have for testing:
<dependency>
      <groupId>excalibur</groupId>
      <artifactId>excalibur-component</artifactId>
      <url>http://avalon.apache.org/</url>
    </dependency>
    <dependency>
      <groupId>excalibur</groupId>
      <artifactId>excalibur-i18n</artifactId>
      <url>http://avalon.apache.org/</url>
    </dependency>
    <dependency>
      <groupId>excalibur</groupId>
      <artifactId>excalibur-logger</artifactId>
      <url>http://avalon.apache.org/</url>
    </dependency>
    <dependency>
      <groupId>excalibur</groupId>
      <artifactId>excalibur-instrument</artifactId>
      <url>http://avalon.apache.org/</url>
    </dependency>
    <dependency>
      <groupId>excalibur</groupId>
      <artifactId>excalibur-xmlutil</artifactId>
      <url>http://avalon.apache.org/</url>
    </dependency>
    <dependency>
      <groupId>cocoon</groupId>
      <artifactId>cocoon-tests</artifactId>
      <url>http://cocoon.apache.org/2.1</url>
    </dependency>

I guess I need to change the urls for avalon though. :-)

HTH,
Ralph


Lars Huttar wrote:

> Hello,
>
> I've been wanting to use the ValidationTransformer and 
> ValidationTransformerReporter described on the wiki at
> http://wiki.apache.org/cocoon/ValidationTransformer
> The source code is given in some java files but I'm having trouble
> compiling them.
>
> In particular, the code has imports for various other Cocoon components.
> I could add all the .jar files Cocoon uses into the CLASSPATH, but that
> would be pretty laborious.
> What is the normal mechanism for compiling such Java files? Of course I
> will then want to put the classes into a jar, install that in the right
> place, and have Cocoon find it.
> Can I accomplish all that by putting the files into a new block? If so,
> what is the procedure for creating a block?
>
> I have searched around on cocoon.apache.org and the wiki and mailing 
> list archives for info on creating a block, but all I see is 
> discussion about how blocks should be designed to work in the future.
>
> Any help would be appreciated.
>
> I have contacted the author of ValidationTransformer a couple of times 
> but have not received a reply.
>
> Lars
>
>