‘Line Too Long’ Facebook Feed Problem

If you have the following problem in Facebook Product Feed:

Line too long
(1 product rejected)
This feed contains a line that is longer than our current limit.

Your XML file is probably 1 line which you might have removed all tabs, spaces and new lines to save up some space. Adding new lines for each entry may solve the problem.


Custom Maven Plugin repository

If you are developing or using custom maven plugins and would like to download them from your custom repository, you should define them like

<name>S3 Repo</name>
<url>your custom repo url</url>

Although you have already defined that custom repo within repositories, you will not be able to download them as plugins.

Rotating BufferedImage to left or right

If you need to rotate an BufferedImage to left or right you can use the following code

BufferedImage originalImage = // some image that you have as file / stream.
BufferedImage rotatedImage = new BufferedImage(originalImage.getHeight(), originalImage.getWidth(), originalImage.getType());

for (int row = 0; row < originalImage.getWidth(); row++) {
     for (int column = 0; column < originalImage.getHeight(); column++) {
         if (rotateLeft) {
              rotatedImage.setRGB(column, originalImage.getWidth() - row - 1, originalImage.getRGB(row, column));
         } else {
              rotatedImage.setRGB(originalImage.getHeight() - column - 1, row, originalImage.getRGB(row, column));