Can't copy file mentioned in @ConcordionResources error

Skip to first unread message

Toby Weston

Mar 25, 2019, 3:07:51 PM3/25/19
to concordion
Hi Folks,

I intermittently get failures where the resource mentioned by @ConcordionResources can't be found. 

It feels like something isn't copying the files over as part of the build cycle (the file in question exists in src but not in the /tmp folder).

My friend can reproduce this every time (on a linux machine) and I see it every so often on a Mac (where it seems to fix itself).

Any ideas?

Thanks in advance,

Nigel Charman

Mar 27, 2019, 1:20:10 AM3/27/19
Hi Toby

Thanks for reporting this.

I've reproduced it by removing the target folder as you stated in StackOverflow. The problem is that the FileTarget#createOutputStream(Resource) method is unable to create an OutputStream.

Assuming your fixture is in the a.b.c package, Concordion is trying to create an OutputStream for the file "<concordion.output.dir>/a/b/c/../../../concordion.css" (where <concordion.output.dir> is the concordion output directory). If the "<concordion.output.dir>/a/b/c/" folder does not already exist this fails - it seems that Java does not automatically "normalize" the path to remove ".."s.

The solution will be to normalize the path (probably using Path.normalize()).

To resolve, you can either update to the 2.2.1 release which should be available soon, or use absolute paths (eg. @ConcordionResources("/concordion.css")).

You received this message because you are subscribed to the Google Groups "concordion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web, visit
For more options, visit

Nigel Charman

Mar 27, 2019, 2:20:07 AM3/27/19
Sorry, the release will take longer and won't just be a patch release - we're going to need to update to Java 7 for Path.normalize().

Toby Weston

Mar 27, 2019, 2:28:22 PM3/27/19
to concordion
Thanks for looking and fixing things up!
Reply all
Reply to author
0 new messages