branch develop updated (020ee45 -> 8ea5284)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository jredmine. See https://gitlab.nuiton.org/nuiton/jredmine.git from 020ee45 Update parent pom new b3bf1dc Add a new mojo to generate a changelog.txt from the generated changes.xml (Fixes #4020) new 758f510 Use maven 3.3.9 API instead of 2.2.1 (Fixes #4021) new c9761a6 Update tests new 8ea5284 Update dependencies (Fixes #4023) The 4 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 8ea5284f1fcf002a85210197c62262cf751eba5c Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 12 19:12:06 2016 +0200 Update dependencies (Fixes #4023) commit c9761a6feaf753b98e59afa5f18f0edb2a20cb0e Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 12 19:06:14 2016 +0200 Update tests commit 758f510e802e563a335fe554c35cbd524f9a04f7 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 12 18:27:58 2016 +0200 Use maven 3.3.9 API instead of 2.2.1 (Fixes #4021) commit b3bf1dc298b5293f214edb90879051d37fe2dcfe Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 12 18:25:11 2016 +0200 Add a new mojo to generate a changelog.txt from the generated changes.xml (Fixes #4020) Summary of changes: jredmine-client/pom.xml | 2 +- jredmine-maven-plugin/pom.xml | 15 +- .../jredmine/plugin/GenerateChangelogMojo.java | 225 +++++++++++++++++++++ .../jredmine/plugin/AbstractRedmineMojoTest.java | 153 +++++--------- .../jredmine/plugin/DisplayDataMojoTest.java | 33 +-- .../jredmine/plugin/GenerateChangesMojoTest.java | 19 +- .../jredmine/plugin/NextVersionMojoTest.java | 21 +- .../plugin/PublishAttachmentsMojoTest.java | 21 +- .../jredmine/plugin/PublishNewsMojoTest.java | 21 +- ...dmineMojoTest.java => RedmineMojoTestRule.java} | 87 +++----- .../jredmine/plugin/UpdateVersionMojoTest.java | 21 +- .../GenerateEmailAnnouncementMojoTest.java | 26 ++- .../GenerateNewsAnnouncementMojoTest.java | 26 ++- .../plugin/report/IssuesReportByAssigneeTest.java | 8 +- .../plugin/report/IssuesReportByCategoryTest.java | 8 +- .../plugin/report/IssuesReportByPriorityTest.java | 8 +- .../plugin/report/IssuesReportByReporterTest.java | 8 +- .../plugin/report/IssuesReportByStatusTest.java | 8 +- .../plugin/report/IssuesReportByTrackerTest.java | 8 +- .../plugin/report/IssuesReportByVersionTest.java | 8 +- .../jredmine/plugin/report/IssuesReportTest.java | 8 +- pom.xml | 154 +++++--------- 22 files changed, 522 insertions(+), 366 deletions(-) create mode 100644 jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/GenerateChangelogMojo.java copy jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/{AbstractRedmineMojoTest.java => RedmineMojoTestRule.java} (60%) -- 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 https://gitlab.nuiton.org/nuiton/jredmine.git commit b3bf1dc298b5293f214edb90879051d37fe2dcfe Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 12 18:25:11 2016 +0200 Add a new mojo to generate a changelog.txt from the generated changes.xml (Fixes #4020) --- .../jredmine/plugin/GenerateChangelogMojo.java | 225 +++++++++++++++++++++ 1 file changed, 225 insertions(+) diff --git a/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/GenerateChangelogMojo.java b/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/GenerateChangelogMojo.java new file mode 100644 index 0000000..69d292d --- /dev/null +++ b/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/GenerateChangelogMojo.java @@ -0,0 +1,225 @@ +package org.nuiton.jredmine.plugin; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.SystemUtils; +import org.apache.maven.execution.MavenSession; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.changes.model.Action; +import org.apache.maven.plugins.changes.model.ChangesDocument; +import org.apache.maven.plugins.changes.model.FixedIssue; +import org.apache.maven.plugins.changes.model.Release; +import org.apache.maven.plugins.changes.model.io.xpp3.ChangesXpp3Reader; +import org.apache.maven.project.MavenProject; +import org.apache.maven.project.MavenProjectHelper; +import org.nuiton.plugin.AbstractPlugin; + +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.Reader; +import java.util.Date; +import java.util.List; + +/** + * To generate a changelog.txt file from the changes.xml file. + * + * Created on 12/09/16. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 1.9 + */ +@Mojo(name = "generate-changelog") +public class GenerateChangelogMojo extends AbstractPlugin { + + /** + * The path of the {@code changes.xml} file that will be converted into the changelog.txt. + */ + @Parameter(property = "redmine.xmlPath", defaultValue = "${basedir}/src/changes/changes.xml", required = true) + protected File xmlPath; + + /** + * Where to generate the changelog file. + */ + @Parameter(property = "redmine.outputFile", defaultValue = "${project.build.directory}/changelog.txt", required = true) + protected File outputFile; + + /** + * Flag to activate verbose mode. + */ + @Parameter(property = "redmine.verbose", defaultValue = "${maven.verbose}") + protected boolean verbose; + + /** + * A flag to attach the generated changelog file (with <b>changelog</b> classifier). + */ + @Parameter(property = "redmine.attach") + protected boolean attach; + + /** + * A flag to skip the goal. + */ + @Parameter(property = "redmine.skipGenerateChangelog") + protected boolean skipGenerateChangelog; + + /** + * A flag to generate only once in a multi-module project. + * + * The changelog.txt file will be generated only once. + */ + @Parameter(property = "redmine.generateOnce", defaultValue = "true") + protected boolean generateOnce; + + /** + * A flag to restrict only to run on root module. + */ + @Parameter(property = "redmine.runOnlyOnRoot", defaultValue = "true") + protected boolean runOnlyOnRoot; + + /** + * Current project. + */ + @Parameter(defaultValue = "${project}", readonly = true) + protected MavenProject project; + + /** + * Maven session. + */ + @Parameter(defaultValue = "${session}", readonly = true) + protected MavenSession session; + + @Component + private MavenProjectHelper mavenProjectHelper; + + @Override + protected boolean checkSkip() { + + if (skipGenerateChangelog) { + getLog().info("Skipping goal skipGenerateChangelog flag is on)."); + return false; + } + + Date buildStartTime = session == null ? null : session.getStartTime(); + Date newStartTime = outputFile != null && outputFile.exists() ? new Date(outputFile.lastModified()) : null; + + boolean needInvoke = needInvoke(generateOnce, runOnlyOnRoot, buildStartTime, newStartTime); + if (!needInvoke) { + getLog().info("Skipping goal (runOnce flag is on, and was already executed)."); + } + + return needInvoke; + + } + + @Override + protected void init() throws Exception { + + if (!xmlPath.exists()) { + throw new MojoExecutionException("Could not find xmlPath: " + xmlPath); + } + + } + + @Override + protected void doAction() throws Exception { + + getLog().info("Loading changes.xml from file: " + xmlPath); + + ChangesXpp3Reader reader = new ChangesXpp3Reader(); + ChangesDocument changesDocument; + Reader fileReader = new FileReader(xmlPath); + try { + changesDocument = reader.read(fileReader); + fileReader.close(); + } finally { + IOUtils.closeQuietly(fileReader); + } + + getLog().info("Generate changelog in file: " + outputFile); + + String eol = SystemUtils.LINE_SEPARATOR; + FileWriter writer = new FileWriter(outputFile); + + try { + List<Release> releases = changesDocument.getBody().getReleases(); + + for (Release release : releases) { + + writer.append(eol).append("Version ").append(release.getVersion()).append(" - ").append(release.getDateRelease()).append(eol); + + for (Object o : release.getActions("add")) { + Action a = (Action) o; + String dev = a.getDev(); + String dueTo = a.getDueTo(); + List<FixedIssue> fixedIssues = a.getFixedIssues(); + String issue = a.getIssue(); + String action = a.getAction(); + + writer.append(" o Feature #").append(issue).append(" ") + .append("due to ").append(dueTo).append(", thanks to ").append(dev) + .append(" - ").append(action).append(eol); + } + + for (Object o : release.getActions("fix")) { + Action a = (Action) o; + String dev = a.getDev(); + String dueTo = a.getDueTo(); + List<FixedIssue> fixedIssues = a.getFixedIssues(); + String issue = a.getIssue(); + String action = a.getAction(); + + writer.append(" o Bug #").append(issue).append(" ") + .append("due to ").append(dueTo).append(", thanks to ").append(dev) + .append(" - ").append(action).append(eol); + } + + for (Object o : release.getActions("update")) { + Action a = (Action) o; + String dev = a.getDev(); + String dueTo = a.getDueTo(); + List<FixedIssue> fixedIssues = a.getFixedIssues(); + String issue = a.getIssue(); + String action = a.getAction(); + + writer.append(" o Task #").append(issue).append(" ") + .append("due to ").append(dueTo).append(", thanks to ").append(dev) + .append(" - ").append(action).append(eol); + } + + } + + writer.close(); + } finally { + IOUtils.closeQuietly(writer); + } + + if (attach) { + + getLog().info("Attach changelog file as *changelog* classifier."); + mavenProjectHelper.attachArtifact(project, outputFile, "changelog"); + + } + } + + @Override + public MavenProject getProject() { + return project; + } + + @Override + public void setProject(MavenProject project) { + this.project = project; + } + + @Override + public boolean isVerbose() { + return verbose; + } + + @Override + public void setVerbose(boolean verbose) { + this.verbose = verbose; + } +} -- 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 https://gitlab.nuiton.org/nuiton/jredmine.git commit 758f510e802e563a335fe554c35cbd524f9a04f7 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 12 18:27:58 2016 +0200 Use maven 3.3.9 API instead of 2.2.1 (Fixes #4021) --- jredmine-maven-plugin/pom.xml | 9 ++++----- pom.xml | 32 +++++++++++++------------------- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/jredmine-maven-plugin/pom.xml b/jredmine-maven-plugin/pom.xml index d2b5e93..0832d69 100644 --- a/jredmine-maven-plugin/pom.xml +++ b/jredmine-maven-plugin/pom.xml @@ -95,11 +95,6 @@ <dependency> <groupId>org.apache.maven</groupId> - <artifactId>maven-project</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.maven</groupId> <artifactId>maven-settings</artifactId> </dependency> @@ -112,6 +107,10 @@ <groupId>org.apache.maven</groupId> <artifactId>maven-core</artifactId> </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-compat</artifactId> + </dependency> <dependency> <groupId>org.apache.maven</groupId> diff --git a/pom.xml b/pom.xml index e9cdf1d..dd3a690 100644 --- a/pom.xml +++ b/pom.xml @@ -78,7 +78,7 @@ <jredminePluginVersion>1.8.2</jredminePluginVersion> <doxiaVersion>1.6</doxiaVersion> - <mavenVersion>2.2.1</mavenVersion> + <mavenVersion>3.3.9</mavenVersion> <helperPluginVersion>2.1</helperPluginVersion> <!-- documentation is in apt --> @@ -282,28 +282,35 @@ <dependency> <groupId>org.apache.maven</groupId> - <artifactId>maven-project</artifactId> + <artifactId>maven-plugin-api</artifactId> + <version>${mavenVersion}</version> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-settings</artifactId> <version>${mavenVersion}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> - <artifactId>maven-plugin-api</artifactId> + <artifactId>maven-model</artifactId> <version>${mavenVersion}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> - <artifactId>maven-settings</artifactId> + <artifactId>maven-artifact</artifactId> <version>${mavenVersion}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> - <artifactId>maven-model</artifactId> + <artifactId>maven-compat</artifactId> <version>${mavenVersion}</version> <scope>provided</scope> </dependency> @@ -313,13 +320,6 @@ <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>${pluginPluginVersion}</version> - <scope>compile</scope> - </dependency> - - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-artifact</artifactId> - <version>${mavenVersion}</version> <scope>provided</scope> </dependency> @@ -327,15 +327,9 @@ <groupId>org.apache.maven.reporting</groupId> <artifactId>maven-reporting-api</artifactId> <version>3.0</version> - <scope>provided</scope> + <scope>compile</scope> </dependency> - <!--dependency> - <groupId>org.apache.maven.reporting</groupId> - <artifactId>maven-reporting-impl</artifactId> - <version>2.2</version> - </dependency--> - <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-core</artifactId> -- 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 https://gitlab.nuiton.org/nuiton/jredmine.git commit c9761a6feaf753b98e59afa5f18f0edb2a20cb0e Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 12 19:06:14 2016 +0200 Update tests --- jredmine-client/pom.xml | 2 +- jredmine-maven-plugin/pom.xml | 6 +- .../jredmine/plugin/AbstractRedmineMojoTest.java | 153 +++++++-------------- .../jredmine/plugin/DisplayDataMojoTest.java | 33 +++-- .../jredmine/plugin/GenerateChangesMojoTest.java | 19 ++- .../jredmine/plugin/NextVersionMojoTest.java | 21 ++- .../plugin/PublishAttachmentsMojoTest.java | 21 ++- .../jredmine/plugin/PublishNewsMojoTest.java | 21 ++- ...dmineMojoTest.java => RedmineMojoTestRule.java} | 87 ++++-------- .../jredmine/plugin/UpdateVersionMojoTest.java | 21 ++- .../GenerateEmailAnnouncementMojoTest.java | 26 ++-- .../GenerateNewsAnnouncementMojoTest.java | 26 ++-- .../plugin/report/IssuesReportByAssigneeTest.java | 8 +- .../plugin/report/IssuesReportByCategoryTest.java | 8 +- .../plugin/report/IssuesReportByPriorityTest.java | 8 +- .../plugin/report/IssuesReportByReporterTest.java | 8 +- .../plugin/report/IssuesReportByStatusTest.java | 8 +- .../plugin/report/IssuesReportByTrackerTest.java | 8 +- .../plugin/report/IssuesReportByVersionTest.java | 8 +- .../jredmine/plugin/report/IssuesReportTest.java | 8 +- pom.xml | 100 ++++---------- 21 files changed, 269 insertions(+), 331 deletions(-) diff --git a/jredmine-client/pom.xml b/jredmine-client/pom.xml index 60c9db5..100dce5 100644 --- a/jredmine-client/pom.xml +++ b/jredmine-client/pom.xml @@ -21,7 +21,7 @@ #L% --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> diff --git a/jredmine-maven-plugin/pom.xml b/jredmine-maven-plugin/pom.xml index 0832d69..4f38855 100644 --- a/jredmine-maven-plugin/pom.xml +++ b/jredmine-maven-plugin/pom.xml @@ -21,7 +21,7 @@ #L% --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> @@ -185,9 +185,8 @@ <dependency> <groupId>org.nuiton</groupId> - <artifactId>helper-maven-plugin-api</artifactId> + <artifactId>helper-maven-plugin-test-api</artifactId> <scope>test</scope> - <classifier>tests</classifier> </dependency> <dependency> @@ -390,7 +389,6 @@ </configuration> </execution> </executions> - </plugin> </plugins> diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/AbstractRedmineMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/AbstractRedmineMojoTest.java index 0e28b34..501794b 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/AbstractRedmineMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/AbstractRedmineMojoTest.java @@ -26,25 +26,15 @@ package org.nuiton.jredmine.plugin; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.maven.model.IssueManagement; -import org.codehaus.plexus.util.StringUtils; -import org.junit.After; import org.junit.Assert; -import org.nuiton.jredmine.service.RedmineConfigurationUtil; import org.nuiton.jredmine.RedmineFixtures; -import org.nuiton.jredmine.service.RedmineServiceConfiguration; -import org.nuiton.jredmine.client.RedmineClientAuthConfiguration; -import org.nuiton.plugin.AbstractMojoTest; - -import java.io.File; -import java.io.IOException; /** * @param <P> type of mojo to test * @author tchemit <chemit@codelutin.com> * @since 1.0.0 */ -public abstract class AbstractRedmineMojoTest<P extends AbstractRedmineMojo> extends AbstractMojoTest<P> { +public abstract class AbstractRedmineMojoTest<P extends AbstractRedmineMojo> { /** Logger. */ private static final Log log = @@ -54,104 +44,59 @@ public abstract class AbstractRedmineMojoTest<P extends AbstractRedmineMojo> ext protected boolean canContinue; - protected abstract RedmineServiceConfiguration getConfiguration() throws IOException; - +// protected abstract RedmineServiceConfiguration getConfiguration() throws IOException; +// protected abstract RedmineFixtures getFixtures(); - protected void beforeMojoInit(P mojo, File pomFile) throws Exception { - - // add a issue management - IssueManagement i = new IssueManagement(); - i.setSystem(AbstractRedmineMojo.REDMINE_SYSTEM); - i.setUrl(mojo.getUrl().toString()); - mojo.getProject().setIssueManagement(i); - - RedmineClientAuthConfiguration authConfiguration = - getConfiguration().getAuthConfiguration(); - mojo.setUsername(authConfiguration.getUsername()); - mojo.setPassword(authConfiguration.getPassword()); - mojo.setApiKey(authConfiguration.getApiKey()); - - if (mojo instanceof RedmineProjectAware) { - - // fill projectId if none is given from pom.xml - RedmineProjectAware redmineMojoWithProject = (RedmineProjectAware) mojo; - - String projectId = redmineMojoWithProject.getProjectId(); - if (StringUtils.isBlank(projectId)) { - - redmineMojoWithProject.setProjectId(getFixtures().projectName()); - } - } - - if (mojo instanceof RedmineVersionAware) { - - // fill versionId if none is given from pom.xml - RedmineVersionAware redmineMojoWithProjectAndVersion = (RedmineVersionAware) mojo; - - String versionId = redmineMojoWithProjectAndVersion.getVersionId(); - if (StringUtils.isBlank(versionId)) { - - redmineMojoWithProjectAndVersion.setVersionId(getFixtures().versionName()); - } - } - - if (mojo instanceof DryRunAware) { - - // never authorize to modify any content... - ((DryRunAware) mojo).setDryRun(true); - } - } - - @Override - protected void setUpMojo(P mojo, File pomFile) throws Exception { - - super.setUpMojo(mojo, pomFile); - - RedmineServiceConfiguration configuration = getConfiguration(); - - // copy redmine test server configuration - RedmineConfigurationUtil.copyConfiguration(configuration, mojo); - - beforeMojoInit(mojo, pomFile); - - try { - mojo.init(); - - - canContinue = mojo.checkSkip(); - if (!canContinue) { - if (log.isInfoEnabled()) { - log.info("The goal was marked as to be skip, the test is done."); - } - return; - } - } catch (Exception e) { - log.error(e); - canContinue = false; - } - if (canContinue) { - if (mojo.isVerbose()) { - log.info("setup done for " + mojo.getProject().getFile().getName()); - } - } else { - log.warn("setup was not successfull, will skip this test [" + getClass() + "]"); - } - } - - @After - public void tearDown() throws Exception { - P mojo = getMojo(); - if (mojo != null) { - mojo.closeService(); - } - } - - protected void mojoDoAction() throws Exception { +// protected void beforeMojoInit(P mojo, File pomFile) throws Exception { +// +// // add a issue management +// IssueManagement i = new IssueManagement(); +// i.setSystem(AbstractRedmineMojo.REDMINE_SYSTEM); +// i.setUrl(mojo.getUrl().toString()); +// mojo.getProject().setIssueManagement(i); +// +// RedmineClientAuthConfiguration authConfiguration = +// getConfiguration().getAuthConfiguration(); +// mojo.setUsername(authConfiguration.getUsername()); +// mojo.setPassword(authConfiguration.getPassword()); +// mojo.setApiKey(authConfiguration.getApiKey()); +// +// if (mojo instanceof RedmineProjectAware) { +// +// // fill projectId if none is given from pom.xml +// RedmineProjectAware redmineMojoWithProject = (RedmineProjectAware) mojo; +// +// String projectId = redmineMojoWithProject.getProjectId(); +// if (StringUtils.isBlank(projectId)) { +// +// redmineMojoWithProject.setProjectId(getFixtures().projectName()); +// } +// } +// +// if (mojo instanceof RedmineVersionAware) { +// +// // fill versionId if none is given from pom.xml +// RedmineVersionAware redmineMojoWithProjectAndVersion = (RedmineVersionAware) mojo; +// +// String versionId = redmineMojoWithProjectAndVersion.getVersionId(); +// if (StringUtils.isBlank(versionId)) { +// +// redmineMojoWithProjectAndVersion.setVersionId(getFixtures().versionName()); +// } +// } +// +// if (mojo instanceof DryRunAware) { +// +// // never authorize to modify any content... +// ((DryRunAware) mojo).setDryRun(true); +// } +// } + + protected void mojoDoAction(P mojo) throws Exception { if (canContinue) { - P mojo = getMojo(); Assert.assertNotNull(mojo); try { mojo.doAction(); diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/DisplayDataMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/DisplayDataMojoTest.java index 8000aa3..feff7e1 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/DisplayDataMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/DisplayDataMojoTest.java @@ -24,7 +24,11 @@ */ package org.nuiton.jredmine.plugin; +import org.junit.Rule; import org.junit.Test; +import org.nuiton.jredmine.service.RedmineServiceConfiguration; + +import java.io.IOException; /** * @author tchemit <chemit@codelutin.com> @@ -32,53 +36,58 @@ import org.junit.Test; */ public class DisplayDataMojoTest extends AbstractAnonymousRedmineMojoTest<DisplayDataMojo> { - @Override - protected String getGoalName(String methodName) { - return "display-data"; - } + @Rule + public RedmineMojoTestRule<DisplayDataMojo> rule = new RedmineMojoTestRule<DisplayDataMojo>(DisplayDataMojoTest.class, "display-data", classRule.getFixtures()) { + + @Override + protected RedmineServiceConfiguration getConfiguration() throws IOException { + return getFixtures().newAnonymousConfiguration(); + } + + }; @Test public void displayProjects() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void displayVersions() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void displayProjectTrackers() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void displayProjectUsers() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void displayProjectIssueCategories() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void displayIssueStatuses() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void displayIssuePriorities() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void displayAll() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/GenerateChangesMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/GenerateChangesMojoTest.java index d3b0022..12e2649 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/GenerateChangesMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/GenerateChangesMojoTest.java @@ -24,7 +24,11 @@ */ package org.nuiton.jredmine.plugin; +import org.junit.Rule; import org.junit.Test; +import org.nuiton.jredmine.service.RedmineServiceConfiguration; + +import java.io.IOException; /** * @author tchemit <chemit@codelutin.com> @@ -32,16 +36,21 @@ import org.junit.Test; */ public class GenerateChangesMojoTest extends AbstractLogguedRedmineMojoTest<GenerateChangesMojo> { - @Override - protected String getGoalName(String methodName) { - return "generate-changes"; - } + @Rule + public RedmineMojoTestRule<GenerateChangesMojo> rule = new RedmineMojoTestRule<GenerateChangesMojo>(DisplayDataMojoTest.class, "generate-changes", classRule.getFixtures()) { + + @Override + protected RedmineServiceConfiguration getConfiguration() throws IOException { + return getFixtures().newLogguedConfiguration(); + } + + }; @Test public void generateChanges() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); //TODO check file is generated } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/NextVersionMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/NextVersionMojoTest.java index 6446565..4199227 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/NextVersionMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/NextVersionMojoTest.java @@ -24,7 +24,11 @@ */ package org.nuiton.jredmine.plugin; +import org.junit.Rule; import org.junit.Test; +import org.nuiton.jredmine.service.RedmineServiceConfiguration; + +import java.io.IOException; /** * @author tchemit <chemit@codelutin.com> @@ -32,20 +36,25 @@ import org.junit.Test; */ public class NextVersionMojoTest extends AbstractLogguedRedmineMojoTest<NextVersionMojo> { - @Override - protected String getGoalName(String methodName) { - return "next-version"; - } + @Rule + public RedmineMojoTestRule<NextVersionMojo> rule = new RedmineMojoTestRule<NextVersionMojo>(DisplayDataMojoTest.class, "next-version", classRule.getFixtures()) { + + @Override + protected RedmineServiceConfiguration getConfiguration() throws IOException { + return getFixtures().newAnonymousConfiguration(); + } + + }; @Test public void nextVersion() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void skipNextVersion() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojoTest.java index 75d2a7e..fa0233d 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/PublishAttachmentsMojoTest.java @@ -24,7 +24,11 @@ */ package org.nuiton.jredmine.plugin; +import org.junit.Rule; import org.junit.Test; +import org.nuiton.jredmine.service.RedmineServiceConfiguration; + +import java.io.IOException; /** * @author tchemit <chemit@codelutin.com> @@ -32,20 +36,25 @@ import org.junit.Test; */ public class PublishAttachmentsMojoTest extends AbstractLogguedRedmineMojoTest<PublishAttachmentsMojo> { - @Override - protected String getGoalName(String methodName) { - return "publish-attachments"; - } + @Rule + public RedmineMojoTestRule<PublishAttachmentsMojo> rule = new RedmineMojoTestRule<PublishAttachmentsMojo>(DisplayDataMojoTest.class, "publish-attachments", classRule.getFixtures()) { + + @Override + protected RedmineServiceConfiguration getConfiguration() throws IOException { + return getFixtures().newAnonymousConfiguration(); + } + + }; @Test public void publishAttachments() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void skipPublishAttachments() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/PublishNewsMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/PublishNewsMojoTest.java index 4f651fc..81aba7e 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/PublishNewsMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/PublishNewsMojoTest.java @@ -24,7 +24,11 @@ */ package org.nuiton.jredmine.plugin; +import org.junit.Rule; import org.junit.Test; +import org.nuiton.jredmine.service.RedmineServiceConfiguration; + +import java.io.IOException; /** * @author tchemit <chemit@codelutin.com> @@ -32,20 +36,25 @@ import org.junit.Test; */ public class PublishNewsMojoTest extends AbstractLogguedRedmineMojoTest<PublishNewsMojo> { - @Override - protected String getGoalName(String methodName) { - return "publish-news"; - } + @Rule + public RedmineMojoTestRule<PublishNewsMojo> rule = new RedmineMojoTestRule<PublishNewsMojo>(DisplayDataMojoTest.class, "publish-news", classRule.getFixtures()) { + + @Override + protected RedmineServiceConfiguration getConfiguration() throws IOException { + return getFixtures().newAnonymousConfiguration(); + } + + }; @Test public void publishNews() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void skipPublishNews() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/AbstractRedmineMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/RedmineMojoTestRule.java similarity index 60% copy from jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/AbstractRedmineMojoTest.java copy to jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/RedmineMojoTestRule.java index 0e28b34..e82f8c5 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/AbstractRedmineMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/RedmineMojoTestRule.java @@ -1,64 +1,40 @@ -/* - * #%L - * JRedmine :: Maven plugin - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2009 - 2012 Tony Chemit, CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ package org.nuiton.jredmine.plugin; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.maven.model.IssueManagement; import org.codehaus.plexus.util.StringUtils; -import org.junit.After; -import org.junit.Assert; -import org.nuiton.jredmine.service.RedmineConfigurationUtil; import org.nuiton.jredmine.RedmineFixtures; -import org.nuiton.jredmine.service.RedmineServiceConfiguration; import org.nuiton.jredmine.client.RedmineClientAuthConfiguration; -import org.nuiton.plugin.AbstractMojoTest; +import org.nuiton.jredmine.service.RedmineConfigurationUtil; +import org.nuiton.jredmine.service.RedmineServiceConfiguration; +import org.nuiton.plugin.MojoTestRule; import java.io.File; import java.io.IOException; /** - * @param <P> type of mojo to test - * @author tchemit <chemit@codelutin.com> - * @since 1.0.0 + * Created on 12/09/16. + * + * @author Tony Chemit - chemit@codelutin.com */ -public abstract class AbstractRedmineMojoTest<P extends AbstractRedmineMojo> extends AbstractMojoTest<P> { +public abstract class RedmineMojoTestRule<P extends AbstractRedmineMojo> extends MojoTestRule<P> { /** Logger. */ - private static final Log log = - LogFactory.getLog(AbstractRedmineMojoTest.class); - - protected static boolean init; + private static final Log log = LogFactory.getLog(RedmineMojoTestRule.class); protected boolean canContinue; - protected abstract RedmineServiceConfiguration getConfiguration() throws IOException; + private final RedmineFixtures fixtures; - protected abstract RedmineFixtures getFixtures(); + public RedmineMojoTestRule(Class<?> testClass, String goalName, RedmineFixtures fixtures) { + super(testClass, goalName); + this.fixtures = fixtures; + } + + protected abstract RedmineServiceConfiguration getConfiguration() throws IOException; - protected void beforeMojoInit(P mojo, File pomFile) throws Exception { + protected void beforeMojoInit(P mojo, File pomFile) throws IOException { // add a issue management IssueManagement i = new IssueManagement(); @@ -66,8 +42,7 @@ public abstract class AbstractRedmineMojoTest<P extends AbstractRedmineMojo> ext i.setUrl(mojo.getUrl().toString()); mojo.getProject().setIssueManagement(i); - RedmineClientAuthConfiguration authConfiguration = - getConfiguration().getAuthConfiguration(); + RedmineClientAuthConfiguration authConfiguration = getConfiguration().getAuthConfiguration(); mojo.setUsername(authConfiguration.getUsername()); mojo.setPassword(authConfiguration.getPassword()); mojo.setApiKey(authConfiguration.getApiKey()); @@ -80,7 +55,7 @@ public abstract class AbstractRedmineMojoTest<P extends AbstractRedmineMojo> ext String projectId = redmineMojoWithProject.getProjectId(); if (StringUtils.isBlank(projectId)) { - redmineMojoWithProject.setProjectId(getFixtures().projectName()); + redmineMojoWithProject.setProjectId(fixtures.projectName()); } } @@ -92,7 +67,7 @@ public abstract class AbstractRedmineMojoTest<P extends AbstractRedmineMojo> ext String versionId = redmineMojoWithProjectAndVersion.getVersionId(); if (StringUtils.isBlank(versionId)) { - redmineMojoWithProjectAndVersion.setVersionId(getFixtures().versionName()); + redmineMojoWithProjectAndVersion.setVersionId(fixtures.versionName()); } } @@ -139,25 +114,17 @@ public abstract class AbstractRedmineMojoTest<P extends AbstractRedmineMojo> ext } } - @After - public void tearDown() throws Exception { - P mojo = getMojo(); - if (mojo != null) { - mojo.closeService(); - } + @Override + public boolean initMojo(P mojo) { + return super.initMojo(mojo); } - protected void mojoDoAction() throws Exception { - - if (canContinue) { + @Override + protected void tearDownMojo(P mojo) { + super.tearDownMojo(mojo); - P mojo = getMojo(); - Assert.assertNotNull(mojo); - try { - mojo.doAction(); - } finally { - mojo.afterExecute(); - } + if (mojo != null) { + mojo.closeService(); } } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/UpdateVersionMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/UpdateVersionMojoTest.java index db1f310..7c604f7 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/UpdateVersionMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/UpdateVersionMojoTest.java @@ -24,7 +24,11 @@ */ package org.nuiton.jredmine.plugin; +import org.junit.Rule; import org.junit.Test; +import org.nuiton.jredmine.service.RedmineServiceConfiguration; + +import java.io.IOException; /** * @author tchemit <chemit@codelutin.com> @@ -32,20 +36,25 @@ import org.junit.Test; */ public class UpdateVersionMojoTest extends AbstractLogguedRedmineMojoTest<UpdateVersionMojo> { - @Override - protected String getGoalName(String methodName) { - return "update-version"; - } + @Rule + public RedmineMojoTestRule<UpdateVersionMojo> rule = new RedmineMojoTestRule<UpdateVersionMojo>(DisplayDataMojoTest.class, "update-version", classRule.getFixtures()) { + + @Override + protected RedmineServiceConfiguration getConfiguration() throws IOException { + return getFixtures().newAnonymousConfiguration(); + } + + }; @Test public void updateVersion() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } @Test public void skipUpdateVersion() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/announcement/GenerateEmailAnnouncementMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/announcement/GenerateEmailAnnouncementMojoTest.java index 226a48b..703f998 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/announcement/GenerateEmailAnnouncementMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/announcement/GenerateEmailAnnouncementMojoTest.java @@ -28,10 +28,15 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Assert; +import org.junit.Rule; import org.junit.Test; import org.nuiton.jredmine.plugin.AbstractLogguedRedmineMojoTest; +import org.nuiton.jredmine.plugin.DisplayDataMojoTest; +import org.nuiton.jredmine.plugin.RedmineMojoTestRule; +import org.nuiton.jredmine.service.RedmineServiceConfiguration; import java.io.File; +import java.io.IOException; /** * @author tchemit <chemit@codelutin.com> @@ -43,19 +48,24 @@ public class GenerateEmailAnnouncementMojoTest extends AbstractLogguedRedmineMoj private static final Log log = LogFactory.getLog(GenerateEmailAnnouncementMojoTest.class); - @Override - protected String getGoalName(String methodName) { - return "generate-email-announcement"; - } + @Rule + public RedmineMojoTestRule<GenerateEmailAnnouncementMojo> rule = new RedmineMojoTestRule<GenerateEmailAnnouncementMojo>(DisplayDataMojoTest.class, "generate-email-announcement", classRule.getFixtures()) { + + @Override + protected RedmineServiceConfiguration getConfiguration() throws IOException { + return getFixtures().newAnonymousConfiguration(); + } + + }; @Test public void generateEmailAnnouncement() throws Exception { - File outputFile = getMojo().getOutputFile(); + File outputFile = rule.getMojo().getOutputFile(); Assert.assertNotNull(outputFile); - mojoDoAction(); + mojoDoAction(rule.getMojo()); Assert.assertTrue(outputFile.exists()); - if (getMojo().isVerbose()) { + if (rule.getMojo().isVerbose()) { String content = FileUtils.readFileToString(outputFile); if (log.isInfoEnabled()) { @@ -67,6 +77,6 @@ public class GenerateEmailAnnouncementMojoTest extends AbstractLogguedRedmineMoj @Test public void skipGenerateEmailAnnouncement() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/announcement/GenerateNewsAnnouncementMojoTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/announcement/GenerateNewsAnnouncementMojoTest.java index efbe40e..0d419de 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/announcement/GenerateNewsAnnouncementMojoTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/announcement/GenerateNewsAnnouncementMojoTest.java @@ -28,10 +28,15 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Assert; +import org.junit.Rule; import org.junit.Test; import org.nuiton.jredmine.plugin.AbstractLogguedRedmineMojoTest; +import org.nuiton.jredmine.plugin.DisplayDataMojoTest; +import org.nuiton.jredmine.plugin.RedmineMojoTestRule; +import org.nuiton.jredmine.service.RedmineServiceConfiguration; import java.io.File; +import java.io.IOException; /** * @author tchemit <chemit@codelutin.com> @@ -43,20 +48,25 @@ public class GenerateNewsAnnouncementMojoTest extends AbstractLogguedRedmineMojo private static final Log log = LogFactory.getLog(GenerateNewsAnnouncementMojoTest.class); - @Override - protected String getGoalName(String methodName) { - return "generate-news-announcement"; - } + @Rule + public RedmineMojoTestRule<GenerateNewsAnnouncementMojo> rule = new RedmineMojoTestRule<GenerateNewsAnnouncementMojo>(DisplayDataMojoTest.class, "generate-news-announcement", classRule.getFixtures()) { + + @Override + protected RedmineServiceConfiguration getConfiguration() throws IOException { + return getFixtures().newAnonymousConfiguration(); + } + + }; @Test public void generateNewsAnnouncement() throws Exception { - File outputFile = getMojo().getOutputFile(); + File outputFile = rule.getMojo().getOutputFile(); Assert.assertNotNull(outputFile); - mojoDoAction(); + mojoDoAction(rule.getMojo()); Assert.assertTrue(outputFile.exists()); - if (getMojo().isVerbose()) { + if (rule.getMojo().isVerbose()) { String content = FileUtils.readFileToString(outputFile); if (log.isInfoEnabled()) { @@ -68,6 +78,6 @@ public class GenerateNewsAnnouncementMojoTest extends AbstractLogguedRedmineMojo @Test public void skipGenerateNewsAnnouncement() throws Exception { - mojoDoAction(); + mojoDoAction(rule.getMojo()); } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByAssigneeTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByAssigneeTest.java index 7b317e3..0cb65fe 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByAssigneeTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByAssigneeTest.java @@ -30,8 +30,8 @@ package org.nuiton.jredmine.plugin.report; */ public class IssuesReportByAssigneeTest extends AbstractIssuesReportTest<IssuesReportByAssignee> { - @Override - protected String getGoalName(String methodName) { - return "issues-report-by-assignee"; - } +// @Override +// protected String getGoalName(String methodName) { +// return "issues-report-by-assignee"; +// } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByCategoryTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByCategoryTest.java index d7264ad..2458aff 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByCategoryTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByCategoryTest.java @@ -30,8 +30,8 @@ package org.nuiton.jredmine.plugin.report; */ public class IssuesReportByCategoryTest extends AbstractIssuesReportTest<IssuesReportByAssignee> { - @Override - protected String getGoalName(String methodName) { - return "issues-report-by-category"; - } +// @Override +// protected String getGoalName(String methodName) { +// return "issues-report-by-category"; +// } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByPriorityTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByPriorityTest.java index a1a715b..bc6b5e9 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByPriorityTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByPriorityTest.java @@ -30,8 +30,8 @@ package org.nuiton.jredmine.plugin.report; */ public class IssuesReportByPriorityTest extends AbstractIssuesReportTest<IssuesReportByAssignee> { - @Override - protected String getGoalName(String methodName) { - return "issues-report-by-priority"; - } +// @Override +// protected String getGoalName(String methodName) { +// return "issues-report-by-priority"; +// } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByReporterTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByReporterTest.java index 298da28..7e2d9be 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByReporterTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByReporterTest.java @@ -30,8 +30,8 @@ package org.nuiton.jredmine.plugin.report; */ public class IssuesReportByReporterTest extends AbstractIssuesReportTest<IssuesReportByAssignee> { - @Override - protected String getGoalName(String methodName) { - return "issues-report-by-reporter"; - } +// @Override +// protected String getGoalName(String methodName) { +// return "issues-report-by-reporter"; +// } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByStatusTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByStatusTest.java index c09088c..32889f3 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByStatusTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByStatusTest.java @@ -30,9 +30,9 @@ package org.nuiton.jredmine.plugin.report; */ public class IssuesReportByStatusTest extends AbstractIssuesReportTest<IssuesReportByAssignee> { - @Override - protected String getGoalName(String methodName) { - return "issues-report-by-status"; - } +// @Override +// protected String getGoalName(String methodName) { +// return "issues-report-by-status"; +// } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByTrackerTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByTrackerTest.java index 6a81ab0..e00c02b 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByTrackerTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByTrackerTest.java @@ -30,9 +30,9 @@ package org.nuiton.jredmine.plugin.report; */ public class IssuesReportByTrackerTest extends AbstractIssuesReportTest<IssuesReportByAssignee> { - @Override - protected String getGoalName(String methodName) { - return "issues-report-by-tracker"; - } +// @Override +// protected String getGoalName(String methodName) { +// return "issues-report-by-tracker"; +// } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByVersionTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByVersionTest.java index 0d077b3..a78cc4f 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByVersionTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportByVersionTest.java @@ -30,9 +30,9 @@ package org.nuiton.jredmine.plugin.report; */ public class IssuesReportByVersionTest extends AbstractIssuesReportTest<IssuesReportByAssignee> { - @Override - protected String getGoalName(String methodName) { - return "issues-report-by-version"; - } +// @Override +// protected String getGoalName(String methodName) { +// return "issues-report-by-version"; +// } } diff --git a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportTest.java b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportTest.java index 5511890..822b2ba 100644 --- a/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportTest.java +++ b/jredmine-maven-plugin/src/test/java/org/nuiton/jredmine/plugin/report/IssuesReportTest.java @@ -30,8 +30,8 @@ package org.nuiton.jredmine.plugin.report; */ public class IssuesReportTest extends AbstractIssuesReportTest<IssuesReportByAssignee> { - @Override - protected String getGoalName(String methodName) { - return "issues-report"; - } +// @Override +// protected String getGoalName(String methodName) { +// return "issues-report"; +// } } diff --git a/pom.xml b/pom.xml index dd3a690..eb36d2c 100644 --- a/pom.xml +++ b/pom.xml @@ -20,24 +20,24 @@ <http://www.gnu.org/licenses/lgpl-3.0.html>. #L% --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <parent> <groupId>org.nuiton</groupId> <artifactId>nuitonpom</artifactId> - <version>10.2</version> + <version>10.3</version> </parent> <artifactId>jredmine</artifactId> <version>2.0-SNAPSHOT</version> + <packaging>pom</packaging> - <modules> - <module>jredmine-client</module> - <module>jredmine-maven-plugin</module> - </modules> + <name>JRedmine</name> + <description>JRedmine is a java redmine client</description> + <url>http://jredmine.nuiton.org</url> + <inceptionYear>2009</inceptionYear> <developers> @@ -55,17 +55,21 @@ </developers> - <name>JRedmine</name> - <description>JRedmine is a java redmine client</description> - <inceptionYear>2009</inceptionYear> - <url>http://doc.nuiton.org/jredmine</url> - - <packaging>pom</packaging> - <prerequisites> <maven>3.0</maven> </prerequisites> + <modules> + <module>jredmine-client</module> + <module>jredmine-maven-plugin</module> + </modules> + + <scm> + <connection>scm:git:git@gitlab.nuiton.org:nuiton/jredmine.git</connection> + <developerConnection>scm:git:git@gitlab.nuiton.org:nuiton/jredmine.git</developerConnection> + <url>https://gitlab.nuiton.org/nuiton/jredmine</url> + </scm> + <properties> <projectId>jredmine</projectId> @@ -75,30 +79,16 @@ <signatureVersion>1.1</signatureVersion> <!-- must be on a fixed version, not on the snapshot to make possible release --> - <jredminePluginVersion>1.8.2</jredminePluginVersion> + <jredminePluginVersion>1.9</jredminePluginVersion> <doxiaVersion>1.6</doxiaVersion> <mavenVersion>3.3.9</mavenVersion> - <helperPluginVersion>2.1</helperPluginVersion> <!-- documentation is in apt --> <siteSourcesType>apt</siteSourcesType> </properties> - <scm> - <connection>scm:git:git@gitlab.nuiton.org:nuiton/jredmine.git</connection> - <developerConnection>scm:git:git@gitlab.nuiton.org:nuiton/jredmine.git</developerConnection> - <url>https://gitlab.nuiton.org/nuiton/jredmine</url> - </scm> - - <distributionManagement> - <site> - <id>${site.server}</id> - <url>${site.url}</url> - </site> - </distributionManagement> - <dependencyManagement> <dependencies> @@ -177,12 +167,11 @@ <version>17.0</version> </dependency> - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-utils</artifactId> - <version>3.0-rc-8</version> - </dependency> - + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-utils</artifactId> + <version>3.0-rc-8</version> + </dependency> <dependency> <groupId>org.nuiton</groupId> @@ -207,7 +196,6 @@ </exclusion> </exclusions> - </dependency> <dependency> @@ -243,7 +231,6 @@ </exclusion> </exclusions> - </dependency> <dependency> @@ -547,50 +534,17 @@ <dependency> <groupId>org.nuiton</groupId> - <artifactId>helper-maven-plugin-api</artifactId> + <artifactId>helper-maven-plugin-test-api</artifactId> <version>${helperPluginVersion}</version> <scope>test</scope> - <classifier>tests</classifier> - <exclusions> - <exclusion> - <groupId>plexus</groupId> - <artifactId>plexus-mail-sender-simple</artifactId> - </exclusion> - <exclusion> - <groupId>plexus</groupId> - <artifactId>plexus-mail-sender-api</artifactId> - </exclusion> - <exclusion> - <groupId>plexus</groupId> - <artifactId>plexus-mail-sender-javamail</artifactId> - </exclusion> - <exclusion> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - </exclusion> - <exclusion> - <groupId>org.sonatype.plexus</groupId> - <artifactId>plexus-cipher</artifactId> - </exclusion> - <exclusion> - <groupId>org.sonatype.plexus</groupId> - <artifactId>plexus-sec-dispatcher</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.maven.shared</groupId> - <artifactId>maven-dependency-tree</artifactId> - </exclusion> - - </exclusions> </dependency> <dependency> <groupId>org.apache.maven.plugin-testing</groupId> <artifactId>maven-plugin-testing-harness</artifactId> - <version>1.3</version> + <version>3.3.0</version> <scope>test</scope> <exclusions> - <exclusion> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-archiver</artifactId> -- 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 https://gitlab.nuiton.org/nuiton/jredmine.git commit 8ea5284f1fcf002a85210197c62262cf751eba5c Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 12 19:12:06 2016 +0200 Update dependencies (Fixes #4023) --- pom.xml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index eb36d2c..46f22a0 100644 --- a/pom.xml +++ b/pom.xml @@ -97,7 +97,7 @@ <dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-config</artifactId> - <version>3.0-rc-2</version> + <version>3.0-rc-4</version> <exclusions> <exclusion> <groupId>org.nuiton.i18n</groupId> @@ -125,33 +125,33 @@ <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.4</version> + <version>2.5</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> - <version>1.9</version> + <version>1.10</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>3.3.2</version> + <version>3.4</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> - <version>4.3.2</version> + <version>4.4.5</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpmime</artifactId> - <version>4.3.5</version> + <version>4.5.2</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> - <version>4.3.5</version> + <version>4.5.2</version> <exclusions> <exclusion> <groupId>commons-codec</groupId> @@ -164,13 +164,13 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>17.0</version> + <version>19.0</version> </dependency> <dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-utils</artifactId> - <version>3.0-rc-8</version> + <version>3.0-rc-15</version> </dependency> <dependency> @@ -236,7 +236,7 @@ <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-velocity</artifactId> - <version>1.1.8</version> + <version>1.2</version> <exclusions> <exclusion> <groupId>org.codehaus.plexus</groupId> @@ -520,7 +520,7 @@ <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> - <version>3.0.17</version> + <version>3.0.24</version> </dependency> <!-- tests dependencies --> @@ -528,7 +528,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.11</version> + <version>4.12</version> <scope>test</scope> </dependency> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm