Robby Pelssers | 1 Mar 2011 11:15

configuring FOP NG for Cocoon2.2

Hi all,

I was wondering if someone had some notes on configuring  the org.apache.cocoon.blocks.fop.FOPNGSerializer.

I found following page 'FOP and Embedding Fonts' at
http://cocoon.apache.org/2.2/blocks/fop/1.0/1225_1_1.html but it looks written for Cocoon2.1.x.

E.g.
$ cd %PATH_TO_COCOON%\lib  does not really apply in my case since Cocoon2.2 uses maven and I don't have a
cocoon lib folder unless I switch to using the target (build) folder of my cocoon maven project.

And the configuration file does not really match a configuration file of FOP1.0. 

<configuration>
  <fonts>
    <font metrics-file="D:/fop-fonts/arial.ttf.xml" 
    ...
  </fonts>
</configuration>

Any help or usefull pointers are appreciated.

Cheers,
Robby Pelssers
warrell harries | 1 Mar 2011 11:46
Picon

Re: Setting URLConnection User-Agent String

Hi Chris,

It doesn't make any difference - it's plain old HTTP despite the jargon :)

If you have already seen this http://www.mail-archive.com/users <at> cocoon.apache.org/msg34182.html

then investigate the original Generator code at /cocoon-2.1.11/src/blocks/proxy/java/org/apache/cocoon/generation/WebServiceProxyGenerator.java

It could be that this will be sufficient for your requirements.

Best regards,

Warrell


On 28 February 2011 16:13, Christopher Schultz <chris <at> christopherschultz.net> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Warrell,

On 2/28/2011 6:41 AM, warrell harries wrote:
> Please see recent discussion regarding proxying to another server. In
> brief, I usually deploy a custom transformer based on the web service
> proxy transformer but setting the user agent header before invoking the
> web service.

I was talking about a vanilla HTTP request that returns an XML document,
not a formal web service. Not sure if that changes your suggestion(s).

> Seems like this is a common requirement and it would be good if the
> desired header could be passed in as a sitemap parameter to an existing
> component. I am not aware of any existing component that provides this
> facility.

That would be cool. I've had a hard time penetrating the Cocoon code
base in the past. Any pointers on where to look to possibly implement this?

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1rybAACgkQ9CaO5/Lv0PAA8wCfWcDOcdJ/U4SiB3X9UTuRBqK0
FG4AoKsjKpjN4Cdy/msD8N6WmCJ0yMHT
=U07J
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
For additional commands, e-mail: users-help <at> cocoon.apache.org


Fawzib Rojas | 1 Mar 2011 14:13
Favicon

Re: configuring FOP NG for Cocoon2.2

AFAIK the cocoon-fop-ng-impl in the repositories is for cocoon 2.1 (It 
didnt work for me). I made a new version of the cocoon-fop-ng-impl and a 
new block cocoon-batik-ng-impl. Both seem to be working for me. The fop 
block uses fop-1.0, batik block uses batik-1.7.

You can get it from http://www.megaupload.com/?d=KUCDZ3XE , hope it 
works for you.

Faw

On 3/1/2011 6:15 AM, Robby Pelssers wrote:
> Hi all,
>
> I was wondering if someone had some notes on configuring  the org.apache.cocoon.blocks.fop.FOPNGSerializer.
>
> I found following page 'FOP and Embedding Fonts' at
http://cocoon.apache.org/2.2/blocks/fop/1.0/1225_1_1.html but it looks written for Cocoon2.1.x.
>
> E.g.
> $ cd %PATH_TO_COCOON%\lib  does not really apply in my case since Cocoon2.2 uses maven and I don't have a
cocoon lib folder unless I switch to using the target (build) folder of my cocoon maven project.
>
> And the configuration file does not really match a configuration file of FOP1.0.
>
> <configuration>
>    <fonts>
>      <font metrics-file="D:/fop-fonts/arial.ttf.xml"
>      ...
>    </fonts>
> </configuration>
>
> Any help or usefull pointers are appreciated.
>
> Cheers,
> Robby Pelssers
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
>
Robby Pelssers | 1 Mar 2011 14:54

RE: configuring FOP NG for Cocoon2.2

Hi Fawzib,

we are actually already using your sources ;-)

But my question is more about any documentation on how-to configure the cocoon-batic-ng-impl block like
setting correct fonts etc.

Robby

-----Oorspronkelijk bericht-----
Van: Fawzib Rojas [mailto:f_rojas <at> spectron-msim.com]
Verzonden: di 1-3-2011 14:13
Aan: users <at> cocoon.apache.org
Onderwerp: Re: configuring FOP NG for Cocoon2.2

AFAIK the cocoon-fop-ng-impl in the repositories is for cocoon 2.1 (It 
didnt work for me). I made a new version of the cocoon-fop-ng-impl and a 
new block cocoon-batik-ng-impl. Both seem to be working for me. The fop 
block uses fop-1.0, batik block uses batik-1.7.

You can get it from http://www.megaupload.com/?d=KUCDZ3XE , hope it 
works for you.

Faw

On 3/1/2011 6:15 AM, Robby Pelssers wrote:
> Hi all,
>
> I was wondering if someone had some notes on configuring  the org.apache.cocoon.blocks.fop.FOPNGSerializer.
>
> I found following page 'FOP and Embedding Fonts' at
http://cocoon.apache.org/2.2/blocks/fop/1.0/1225_1_1.html but it looks written for Cocoon2.1.x.
>
> E.g.
> $ cd %PATH_TO_COCOON%\lib  does not really apply in my case since Cocoon2.2 uses maven and I don't have a
cocoon lib folder unless I switch to using the target (build) folder of my cocoon maven project.
>
> And the configuration file does not really match a configuration file of FOP1.0.
>
> <configuration>
>    <fonts>
>      <font metrics-file="D:/fop-fonts/arial.ttf.xml"
>      ...
>    </fonts>
> </configuration>
>
> Any help or usefull pointers are appreciated.
>
> Cheers,
> Robby Pelssers
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
For additional commands, e-mail: users-help <at> cocoon.apache.org

Attachment (winmail.dat): application/ms-tnef, 3509 bytes

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
For additional commands, e-mail: users-help <at> cocoon.apache.org
Myles Byrne | 3 Mar 2011 12:55
Picon
Gravatar

Re: ValidationReportTransformer in 2.2?

Huib, I have to follow up your solution to my problem:


your solution to call, 

    <dependency>
>             <groupId>org.apache.cocoon</groupId>
>             <artifactId>cocoon-validation-impl</artifactId>
>             <version>1.0.0-SNAPSHOT</version>
>         </dependency>

.. worked fine for a few days, and over a number of builds. Then suddenly maven said it could not locate the validation impl snapshot. The validation impl is in my local repo <at> ~/.m2, but it is still not building. I have been trying different repos, editing maven's settings.xml file, flushing the local repo, but to no avail. 

Are you pulling the dependency from the default repo, http://repo2.maven.org/maven2/?
Do you specify another repo for it anywhere?

Thanks,
- Myles
FIMM, Helsinki



On Sat, Feb 19, 2011 at 3:55 PM, Huib Verweij <Huib.Verwey <at> mpi.nl> wrote:

> > Hi all,
> >
> > Has anyone got the old 2.1 (schema, not form) Validation block working in
> > 2.2?
>
> I am using the validation transformer in 2.2, I can't remember me doing
> anything special for it, I have this in my Spring application context:
>
>
>   <bean name="org.apache.cocoon.transformation.Transformer/validate"
>     class="org.apache.cocoon.transformation.ValidatingTransformer"
>     scope="prototype" />
>
> and this in my sitemap:
>
> <map:transform type="validate" src="startLetterSearch.xsd"/>
>
> and this in the pom.xml:
>
>
>         <dependency>
>             <groupId>org.apache.cocoon</groupId>
>             <artifactId>cocoon-validation-impl</artifactId>
>             <version>1.0.0-SNAPSHOT</version>
>         </dependency>
>
> It does the trick.
>
> Huib.
>
>
>
>  --
> Drs. Huib Verweij
> Senior software developer - The Language Archive
> Max Planck Institute for Psycholinguistics
> P.O. Box 310
> 6500 AH Nijmegen
> The Netherlands
> t +31-24-3521911
> e huib.verwey <at> mpi.nl
> w http://www.mpi.nl/
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
For additional commands, e-mail: users-help <at> cocoon.apache.org

Myles Byrne | 3 Mar 2011 14:11
Picon
Gravatar

Re: Maven repo problems? cocoon-validation-impl not found

Thanks again, Andre! 


Yes, i compiled everything when it worked, and as you said the package is in the local repo. I've been trying to point Cocoon to that local version, and also seem to be getting the correct download from the central repo (repo2), but it can't find the POM:

[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo2.maven.org/maven2
[DEBUG] Reading resolution tracking file /home/mbyrne/lsdb1/lsf/~/.m2/repository/org/apache/cocoon/cocoon-validation-impl/1.0.0/cocoon-validation-impl-1.0.0.pom.lastUpdated
[DEBUG] Writing resolution tracking file /home/mbyrne/lsdb1/lsf/~/.m2/repository/org/apache/cocoon/cocoon-validation-impl/1.0.0/cocoon-validation-impl-1.0.0.pom.lastUpdated
[WARNING] The POM for org.apache.cocoon:cocoon-validation-impl:jar:1.0.0 is missing, no dependency information available

.. and then fails:

[ERROR] Failed to execute goal on project lsf: Could not resolve dependencies for project com.mycompany:lsf:jar:1.0.0: Could not find artifact org.apache.cocoon:cocoon-validation-impl:jar:1.0.0 in repo2 (http://repo2.maven.org/maven2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project lsf: Could not resolve dependencies for project com.mycompany:lsf:jar:1.0.0: Could not find artifact org.apache.cocoon:cocoon-validation-impl:jar:1.0.0 in repo2 (http://repo2.maven.org/maven2)

To solve this, i've tried placing a POM i found for the validation block in the local repo, but this hasn't worked.
I also have tried different mirror settings in ~/.m2/settings.xml, and forcing repositories in the POM. 

I'm stumped. It kills me that the validation-impl was working and is in my local repo, but won't build. I feel like there's something basic about getting Maven to find a dependecy i'm missing. On the other hand, i see others have had to search for the (schema) Validation block as well.

Any more hints?

(Note: i posted a related question in the 'ValidationReportTransformer in 2.2' thread)

Cheers and thanks again,
- Myles Byrne
FIMM.fi
Helsinki



 


On Mon, Feb 28, 2011 at 12:55 PM, Andre Juffer <andre.juffer <at> oulu.fi> wrote:
On 28/02/11 12:01, Myles Byrne wrote:
Hi all,

This dependency was available last week:

        <dependency>
            <groupId>org.apache.cocoon</groupId>
            <artifactId>cocoon-validation-impl</artifactId>
            <version>1.0.0-SNAPSHOT</version>
        </dependency>

Just wondering. Because you already compiled everything before (last week I assume), this particular package should be in your local repository (if you use Linux, check ~/.m2/repository), so that the error should in fact not occur (unless you never compiled your application ever with this particular dependency).



.. Now it aint:

Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.apache.cocoon:cocoon-validation-impl:jar:1.0.0-SNAPSHOT

All our other dependencies are still loading, and the Validation package seems to still be available here:


and here:


I've been trying to figure out how to point Cocoon to one of these. Any clues? Or should i escalate to MVNCENTRAL?

I believe you need to modify the settings.xml in your .m2 folder, if Maven is not searching http://repo2.maven.org/maven2/ for packages. Double check with the Maven website for the details.

Thanks,
- Myles Byrne
FIMM.fi
Helsinki





-- Andre H. Juffer | Phone: +358-8-553 1161 Biocenter Oulu and | Fax: +358-8-553-1141 Department of Biochemistry | Email: andre.juffer <at> oulu.fi University of Oulu, Finland | WWW: www.biochem.oulu.fi/Biocomputing/ StrucBioCat | WWW: www.strucbiocat.oulu.fi Triacle Biocomputing | WWW: www.triacle-bc.com

Huib Verweij | 3 Mar 2011 14:24
Picon

Re: ValidationReportTransformer in 2.2?

Hi Myles,

Op 3 mrt 2011, om 12:55 heeft Myles Byrne het volgende geschreven:

Huib, I have to follow up your solution to my problem:

your solution to call, 

    <dependency>
>             <groupId>org.apache.cocoon</groupId>
>             <artifactId>cocoon-validation-impl</artifactId>
>             <version>1.0.0-SNAPSHOT</version>
>         </dependency>

.. worked fine for a few days, and over a number of builds. Then suddenly maven said it could not locate the validation impl snapshot. The validation impl is in my local repo <at> ~/.m2, but it is still not building. I have been trying different repos, editing maven's settings.xml file, flushing the local repo, but to no avail. 

Are you pulling the dependency from the default repo, http://repo2.maven.org/maven2/?
Do you specify another repo for it anywhere?

A strange situation, it worked, now it doesn't work anymore. What changed? Is validation-impl the only jar that can't be found? Sounds like a maven/dependency-thing to me.

What I did was download the cocoon source code and use the build.sh script to install it into the local maven repo - "./build.sh install" like it says in the README. It did take some tweaking to get that to successfully complete unfortunately, it didn't work "out-of-the-box" for me. But once that hurdle had been taken, the validation-impl jar could be found. 
 
Hartelijke groet,

Huib.
--
Drs. Huib Verweij
Senior software developer - The Language Archive
Max Planck Institute for Psycholinguistics
P.O. Box 310
6500 AH Nijmegen
The Netherlands
Andre Juffer | 3 Mar 2011 16:44
Picon
Picon
Favicon

Re: Maven repo problems? cocoon-validation-impl not found

This I cannot understand. If everything compiled fine earlier, and the required package was already downloaded to your repository, Maven should not check again a remote repository, because it already has everything, right? It is possible that your local repository has been corrupted in one way or another, say, some files accidentally were removed?


On 03/03/11 15:11, Myles Byrne wrote:
Thanks again, Andre! 

Yes, i compiled everything when it worked, and as you said the package is in the local repo. I've been trying to point Cocoon to that local version, and also seem to be getting the correct download from the central repo (repo2), but it can't find the POM:

[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo2.maven.org/maven2
[DEBUG] Reading resolution tracking file /home/mbyrne/lsdb1/lsf/~/.m2/repository/org/apache/cocoon/cocoon-validation-impl/1.0.0/cocoon-validation-impl-1.0.0.pom.lastUpdated
[DEBUG] Writing resolution tracking file /home/mbyrne/lsdb1/lsf/~/.m2/repository/org/apache/cocoon/cocoon-validation-impl/1.0.0/cocoon-validation-impl-1.0.0.pom.lastUpdated
[WARNING] The POM for org.apache.cocoon:cocoon-validation-impl:jar:1.0.0 is missing, no dependency information available

.. and then fails:

[ERROR] Failed to execute goal on project lsf: Could not resolve dependencies for project com.mycompany:lsf:jar:1.0.0: Could not find artifact org.apache.cocoon:cocoon-validation-impl:jar:1.0.0 in repo2 (http://repo2.maven.org/maven2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project lsf: Could not resolve dependencies for project com.mycompany:lsf:jar:1.0.0: Could not find artifact org.apache.cocoon:cocoon-validation-impl:jar:1.0.0 in repo2 (http://repo2.maven.org/maven2)

To solve this, i've tried placing a POM i found for the validation block in the local repo, but this hasn't worked.
I also have tried different mirror settings in ~/.m2/settings.xml, and forcing repositories in the POM. 

I'm stumped. It kills me that the validation-impl was working and is in my local repo, but won't build. I feel like there's something basic about getting Maven to find a dependecy i'm missing. On the other hand, i see others have had to search for the (schema) Validation block as well.

Any more hints?

(Note: i posted a related question in the 'ValidationReportTransformer in 2.2' thread)

Cheers and thanks again,
- Myles Byrne
FIMM.fi
Helsinki



 


On Mon, Feb 28, 2011 at 12:55 PM, Andre Juffer <andre.juffer <at> oulu.fi> wrote:
On 28/02/11 12:01, Myles Byrne wrote:
Hi all,

This dependency was available last week:

        <dependency>
            <groupId>org.apache.cocoon</groupId>
            <artifactId>cocoon-validation-impl</artifactId>
            <version>1.0.0-SNAPSHOT</version>
        </dependency>

Just wondering. Because you already compiled everything before (last week I assume), this particular package should be in your local repository (if you use Linux, check ~/.m2/repository), so that the error should in fact not occur (unless you never compiled your application ever with this particular dependency).



.. Now it aint:

Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.apache.cocoon:cocoon-validation-impl:jar:1.0.0-SNAPSHOT

All our other dependencies are still loading, and the Validation package seems to still be available here:


and here:


I've been trying to figure out how to point Cocoon to one of these. Any clues? Or should i escalate to MVNCENTRAL?

I believe you need to modify the settings.xml in your .m2 folder, if Maven is not searching http://repo2.maven.org/maven2/ for packages. Double check with the Maven website for the details.

Thanks,
- Myles Byrne
FIMM.fi
Helsinki





-- Andre H. Juffer | Phone: +358-8-553 1161 Biocenter Oulu and | Fax: +358-8-553-1141 Department of Biochemistry | Email: andre.juffer <at> oulu.fi University of Oulu, Finland | WWW: www.biochem.oulu.fi/Biocomputing/ StrucBioCat | WWW: www.strucbiocat.oulu.fi Triacle Biocomputing | WWW: www.triacle-bc.com



-- Andre H. Juffer | Phone: +358-8-553 1161 Biocenter Oulu and | Fax: +358-8-553-1141 Department of Biochemistry | Email: andre.juffer <at> oulu.fi University of Oulu, Finland | WWW: www.biochem.oulu.fi/Biocomputing/ StrucBioCat | WWW: www.strucbiocat.oulu.fi Triacle Biocomputing | WWW: www.triacle-bc.com
jadaboo017 | 5 Mar 2011 22:08
Picon
Favicon

(unknown)

http://wijetule.110mb.com/bozanyso.html
IFelt Bad
Myles Byrne | 7 Mar 2011 10:56
Picon
Gravatar

Re: ValidationReportTransformer in 2.2?

Nogmaals bedankt, Huib. 

I built Cocoon 2.1.11 in ~/.m2/repository as you suggested, and checked that my settings.xml points to this repo. Now i'm having (what must be total noob) trouble getting Maven to find the Validation blocks in the local repo. 

I've tried dozens of variations of the following POM dependencies:

<dependency>
    <groupId>cocoon</groupId>
    <artifactId>cocoon-validation</artifactId>
    <version>2.1.11</version>  
</dependency>
 <dependency>
            <groupId>org.apache.cocoon</groupId>
            <artifactId>cocoon-validation-impl</artifactId>
            <version>1.0.0-SNAPSHOT</version>
  </dependency>

.. but still get a build fail:

Could not resolve dependencies for project com.mycompany:lsdb:jar:1.0.0: Could not find artifact org.apache.cocoon:cocoon-validation-impl:jar:1.0.0-SNAPSHOT

The worst part is with your earlier help, it was working for a few days. Then the builds started failing again. So if nothing in Maven central has changed, that means my earlier attempts to install the Validation block locally (in the Cocoon app, not in the Maven repo) worked. 

Now i'm looking for a way to tell Maven to get the -impl block from:

 ~/.m2/repository/cocoon-2.1.11/src/blocks/validation/

.. I've tried a number of things but can't find the key. Any clues?

Cheers,
- Myles
Helsinki


[...]
What I did was download the cocoon source code and use the build.sh script to install it into the local maven repo - "./build.sh install" like it says in the README. It did take some tweaking to get that to successfully complete unfortunately, it didn't work "out-of-the-box" for me. But once that hurdle had been taken, the validation-impl jar could be found. 
 
Hartelijke groet,

Huib.
--
Drs. Huib Verweij
Senior software developer - The Language Archive
Max Planck Institute for Psycholinguistics
P.O. Box 310
6500 AH Nijmegen
The Netherlands


Gmane