branch develop updated (d102c7f -> 0992fa7)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository jredmine. See http://git.nuiton.org/jredmine.git from d102c7f fixes #3642 Make jredmine client works with redmine 3.0.0 Merge branch 'feature/3642' into develop new 807623d add warning when publish attachment failed new 31a0235 add warning message when publish was not possible new 0992fa7 fixes #3643: Add a tip when could not publish an attachment The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 0992fa788d860ebc952983689904a1d4e3185668 Merge: d102c7f 31a0235 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Mar 4 12:43:29 2015 +0100 fixes #3643: Add a tip when could not publish an attachment commit 31a023520e4e4ecf618bcf461c15176923c410bf Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Mar 4 12:42:04 2015 +0100 add warning message when publish was not possible commit 807623d94134c8bb589020d432cb93827c7aa846 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Mar 4 11:59:07 2015 +0100 add warning when publish attachment failed Summary of changes: .../jredmine/plugin/PublishAttachmentsMojo.java | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jredmine. See http://git.nuiton.org/jredmine.git commit 807623d94134c8bb589020d432cb93827c7aa846 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Mar 4 11:59:07 2015 +0100 add warning when publish attachment failed --- .../jredmine/plugin/PublishAttachmentsMojo.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojo.java b/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojo.java index c846205..06ad049 100644 --- a/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojo.java +++ b/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojo.java @@ -30,6 +30,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.nuiton.helper.plugin.CollectFilesMojo; import org.nuiton.jredmine.model.Attachment; +import org.nuiton.jredmine.service.RedmineServiceException; import org.nuiton.plugin.PluginHelper; import java.io.File; @@ -270,11 +271,21 @@ public class PublishAttachmentsMojo extends AbstractRedmineMojoWithProjectAndVer a.setToUpload(f); // do upload - Attachment result = service.addAttachment(projectId, releaseVersion.getName(), a); - long t1 = System.nanoTime(); - if (isVerbose()) { - getLog().info("done in " + PluginHelper.convertTime(t1 - t0) + ". attachment id : " + result.getId() + ", size : " + PluginHelper.convertMemory(result.getFilesize())); + try { + Attachment result = service.addAttachment(projectId, releaseVersion.getName(), a); + long t1 = System.nanoTime(); + if (isVerbose()) { + getLog().info("done in " + PluginHelper.convertTime(t1 - t0) + ". attachment id : " + result.getId() + ", size : " + PluginHelper.convertMemory(result.getFilesize())); + } + } catch (RedmineServiceException e) { + + getLog().warn(""); + getLog().warn(String.format("Could not upload attachment %s, may be the file length (%s) exceed the one authorized by the redmine instance.", f, f.length())); + getLog().warn(""); + throw e; + } + } } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jredmine. See http://git.nuiton.org/jredmine.git commit 31a023520e4e4ecf618bcf461c15176923c410bf Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Mar 4 12:42:04 2015 +0100 add warning message when publish was not possible --- .../main/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojo.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojo.java b/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojo.java index 06ad049..b33a9f1 100644 --- a/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojo.java +++ b/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojo.java @@ -32,6 +32,7 @@ import org.nuiton.helper.plugin.CollectFilesMojo; import org.nuiton.jredmine.model.Attachment; import org.nuiton.jredmine.service.RedmineServiceException; import org.nuiton.plugin.PluginHelper; +import org.nuiton.util.StringUtil; import java.io.File; import java.io.IOException; @@ -280,7 +281,8 @@ public class PublishAttachmentsMojo extends AbstractRedmineMojoWithProjectAndVer } catch (RedmineServiceException e) { getLog().warn(""); - getLog().warn(String.format("Could not upload attachment %s, may be the file length (%s) exceed the one authorized by the redmine instance.", f, f.length())); + String lengthHumanReadable = StringUtil.convertMemory(f.length()); + getLog().warn(String.format("Could not upload attachment %s, may be the file length (%s) exceed the one authorized by the redmine instance.", f, lengthHumanReadable)); getLog().warn(""); throw e; -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jredmine. See http://git.nuiton.org/jredmine.git commit 0992fa788d860ebc952983689904a1d4e3185668 Merge: d102c7f 31a0235 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Mar 4 12:43:29 2015 +0100 fixes #3643: Add a tip when could not publish an attachment .../jredmine/plugin/PublishAttachmentsMojo.java | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm