Skip to content

Commit

Permalink
Release 1.1.2.201812191233-r [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI committed Dec 19, 2018
2 parents 3e7190a + 2b6c384 commit 8ffc965
Show file tree
Hide file tree
Showing 37 changed files with 298 additions and 47 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,29 @@
# Change Log

## [Unreleased](https://github.com/m2e-code-quality/m2e-code-quality/tree/HEAD)

[Full Changelog](https://github.com/m2e-code-quality/m2e-code-quality/compare/1.1.2...HEAD)

**Closed issues:**

- Plan a new Release [\#191](https://github.com/m2e-code-quality/m2e-code-quality/issues/191)

## [1.1.2](https://github.com/m2e-code-quality/m2e-code-quality/tree/1.1.2) (2018-12-19)
[Full Changelog](https://github.com/m2e-code-quality/m2e-code-quality/compare/1.1.1...1.1.2)

**Closed issues:**

- For inline configuration use header from maven [\#192](https://github.com/m2e-code-quality/m2e-code-quality/issues/192)
- Icon, for GitHub org and perhaps even Eclipse's About [\#189](https://github.com/m2e-code-quality/m2e-code-quality/issues/189)
- When merging to master on release handle conflicts correctly [\#187](https://github.com/m2e-code-quality/m2e-code-quality/issues/187)
- Support inline checkstyle configuration [\#178](https://github.com/m2e-code-quality/m2e-code-quality/issues/178)

**Merged pull requests:**

- Fix \#192 [\#193](https://github.com/m2e-code-quality/m2e-code-quality/pull/193) ([Serranya](https://github.com/Serranya))
- Bump tycho-version from 1.2.0 to 1.3.0 [\#190](https://github.com/m2e-code-quality/m2e-code-quality/pull/190) ([dependabot[bot]](https://github.com/apps/dependabot))
- Support checkstyle inline configuration \#178 [\#188](https://github.com/m2e-code-quality/m2e-code-quality/pull/188) ([Serranya](https://github.com/Serranya))

## [1.1.1](https://github.com/m2e-code-quality/m2e-code-quality/tree/1.1.1) (2018-12-03)
[Full Changelog](https://github.com/m2e-code-quality/m2e-code-quality/compare/1.1.0...1.1.1)

Expand All @@ -8,6 +32,7 @@
- Checkstyle only adds 1st of several Local Check Configurations?! [\#180](https://github.com/m2e-code-quality/m2e-code-quality/issues/180)
- Automatic release recreates JARs for tagged version [\#179](https://github.com/m2e-code-quality/m2e-code-quality/issues/179)
- Automatic release does not work [\#176](https://github.com/m2e-code-quality/m2e-code-quality/issues/176)
- Setup instructions from README does not work [\#157](https://github.com/m2e-code-quality/m2e-code-quality/issues/157)
- Redirect old to new CD update site? [\#143](https://github.com/m2e-code-quality/m2e-code-quality/issues/143)
- Build is too brittle because .target files contain timestamps of external dependencies which change [\#135](https://github.com/m2e-code-quality/m2e-code-quality/issues/135)

Expand Down
Expand Up @@ -2,7 +2,7 @@
<feature
id="com.basistech.m2e.code.quality.checkstyle.feature"
label="Checkstyle configuration plugin for M2Eclipse"
version="1.1.1.201812031126-r"
version="1.1.2.201812191233-r"
plugin="com.basistech.m2e.code.quality.shared">

<description>
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.checkstyle.feature/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.checkstyle.feature</artifactId>
Expand Down
Expand Up @@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: M2Eclipse Project Configurator for Eclipse Checkstyle Tests
Bundle-SymbolicName: com.basistech.m2e.code.quality.checkstyle.test
Bundle-Version: 1.1.1.201812031126-r
Bundle-Version: 1.1.2.201812191233-r
Bundle-Vendor: Basis Technology Corp.
Fragment-Host: com.basistech.m2e.code.quality.checkstyle;bundle-version="[1.1.1.201812031126-r,2.0.0)"
Fragment-Host: com.basistech.m2e.code.quality.checkstyle;bundle-version="[1.1.2.201812191233-r,2.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.junit,
com.basistech.m2e.code.quality.shared.test;bundle-version="1.1.1.201812031126-r",
com.basistech.m2e.code.quality.shared.test;bundle-version="1.1.2.201812191233-r",
org.eclipse.m2e.tests.common
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.checkstyle.test/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.checkstyle.test</artifactId>
Expand Down
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: M2Eclipse Project Configurator for Eclipse Checkstyle
Bundle-SymbolicName: com.basistech.m2e.code.quality.checkstyle
;singleton:=true
Bundle-Version: 1.1.1.201812031126-r
Bundle-Version: 1.1.2.201812191233-r
Require-Bundle: org.eclipse.m2e.jdt;bundle-version="[1.0.0,2.0.0)",
org.eclipse.m2e.core;bundle-version="[1.0.0,2.0.0)",
org.eclipse.m2e.maven.runtime;bundle-version="[1.0.0,2.0.0)",
Expand All @@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.m2e.jdt;bundle-version="[1.0.0,2.0.0)",
org.eclipse.core.runtime;bundle-version="3.6.0",
net.sf.eclipsecs.core;bundle-version="5.2.0",
net.sf.eclipsecs.checkstyle;bundle-version="5.2.0",
com.basistech.m2e.code.quality.shared;bundle-version="1.1.1.201812031126-r",
com.basistech.m2e.code.quality.shared;bundle-version="1.1.2.201812191233-r",
org.apache.commons.lang;bundle-version="2.6.0",
org.slf4j.api;bundle-version="1.6.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.checkstyle/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.checkstyle</artifactId>
Expand Down
Expand Up @@ -17,9 +17,11 @@
package com.basistech.m2e.code.quality.checkstyle;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.io.Writer;
import java.net.URI;
import java.net.URL;
import java.nio.file.Path;
Expand All @@ -37,9 +39,12 @@
import org.apache.maven.model.Resource;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.configuration.PlexusConfiguration;
import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
import org.codehaus.plexus.util.StringUtils;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.m2e.core.embedder.IMaven;
import org.slf4j.Logger;
Expand All @@ -64,20 +69,27 @@ public class MavenPluginConfigurationTranslator
private static final Logger LOG =
LoggerFactory.getLogger(MavenPluginConfigurationTranslator.class);

private static final String CHECKSTYLE_DEFAULT_CONFIG_FILE_NAME = "sun_checks.xml";
private static final String CHECKSTYLE_DEFAULT_CONFIG_LOCATION =
"config/sun_checks.xml";
"config/" + CHECKSTYLE_DEFAULT_CONFIG_FILE_NAME;
/** checkstyle maven plugin artifactId */
private static final Map<String, String> PATTERNS_CACHE = new HashMap<>();
private static final String CHECKSTYLE_DEFAULT_CONFIG_FILE_HEADER =
"<?xml version=\"1.0\"?>\n" +
"<!DOCTYPE module PUBLIC \"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN\" " +
"\"https://checkstyle.org/dtds/configuration_1_3.dtd\">";

private final URI basedirUri;
private final Path workingDirectory;
private final String projectName;

private MavenPluginConfigurationTranslator(final IMaven maven,
final MavenSession session, final MavenProject mavenProject,
final MojoExecution mojoExecution, final IProject project,
final URI basedirUri, final Path workingDirectory,
final IProgressMonitor monitor) throws CoreException {
super(maven, session, mavenProject, mojoExecution, project, monitor);
this.projectName = project.getName();
this.workingDirectory = workingDirectory;
this.basedirUri = basedirUri;
}
Expand All @@ -87,14 +99,52 @@ public boolean isSkip() throws CoreException {
}

public URL getRuleset() throws CheckstylePluginException, CoreException {
final URL ruleset = resolveLocation(this.getConfigLocation());
final String configLocation = this.getConfigLocation();
URL ruleset = getInlineRules();

if (ruleset != null && !CHECKSTYLE_DEFAULT_CONFIG_FILE_NAME.equals(configLocation)) {
throw new CheckstylePluginException("If you use inline configuration for rules, don't specify a configLocation");
}

if (ruleset == null) {
ruleset = resolveLocation(this.getConfigLocation());
}
if (ruleset == null) {
throw new CheckstylePluginException(
"Failed to resolve RuleSet from configLocation,SKIPPING Eclipse checkstyle configuration");
"Failed to resolve RuleSet from inlineConfig or configLocation,SKIPPING Eclipse checkstyle configuration");
}
return ruleset;
}

private URL getInlineRules() throws CoreException, CheckstylePluginException {
PlexusConfiguration config = getParameterValue("checkstyleRules", XmlPlexusConfiguration.class);
if (config == null) {
return null;
}
if (config.getChildCount() > 1) {
throw new CheckstylePluginException("Currently only one root module is supported");
}
if ((config = config.getChild(0)) == null) {
return null;
}
String configFileHeader = getParameterValue("checkstyleRulesHeader", String.class);
if (configFileHeader == null) {
configFileHeader = CHECKSTYLE_DEFAULT_CONFIG_FILE_HEADER;
}

IPath stateLocation = Activator.getDefault().getStateLocation();
File dir = stateLocation.toFile();
File checkstyleFile = new File(dir, projectName + "_inline_checkstyle.xml");
try (Writer writer = new FileWriter(checkstyleFile)){
writer.write(configFileHeader);
writer.write(config.toString());
return checkstyleFile.toURI().toURL();
} catch (IOException e) {
CheckstylePluginException.rethrow(e, "Error while extracting inline rules.");
return null;
}
}

public String getHeaderFile()
throws CheckstylePluginException, CoreException {
final URL headerLocation = getHeaderLocation();
Expand Down
Expand Up @@ -2,7 +2,7 @@
<feature
id="com.basistech.m2e.code.quality.findbugs.feature"
label="Findbugs configuration plugin for M2Eclipse"
version="1.1.1.201812031126-r"
version="1.1.2.201812191233-r"
plugin="com.basistech.m2e.code.quality.shared">

<description>
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.findbugs.feature/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.findbugs.feature</artifactId>
Expand Down
Expand Up @@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: M2Eclipse Project Configurator for Eclipse Findbugs Tests
Bundle-SymbolicName: com.basistech.m2e.code.quality.findbugs.test
Bundle-Version: 1.1.1.201812031126-r
Bundle-Version: 1.1.2.201812191233-r
Bundle-Vendor: Basis Technology Corp.
Fragment-Host: com.basistech.m2e.code.quality.findbugs;bundle-version="[1.1.1.201812031126-r,2.0.0)"
Fragment-Host: com.basistech.m2e.code.quality.findbugs;bundle-version="[1.1.2.201812191233-r,2.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.junit,
com.basistech.m2e.code.quality.shared.test;bundle-version="1.1.1.201812031126-r",
com.basistech.m2e.code.quality.shared.test;bundle-version="1.1.2.201812191233-r",
org.eclipse.m2e.tests.common
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.findbugs.test/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.findbugs.test</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions com.basistech.m2e.code.quality.findbugs/META-INF/MANIFEST.MF
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: M2Eclipse Project Configurator for Eclipse Findbugs
Bundle-SymbolicName: com.basistech.m2e.code.quality.findbugs;singleton:=true
Bundle-Version: 1.1.1.201812031126-r
Bundle-Version: 1.1.2.201812191233-r
Require-Bundle: org.eclipse.m2e.jdt;bundle-version="[1.0.0,2.0.0)",
org.eclipse.m2e.core;bundle-version="[1.0.0,2.0.0)",
org.eclipse.m2e.maven.runtime;bundle-version="[1.0.0,2.0.0)",
Expand All @@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.m2e.jdt;bundle-version="[1.0.0,2.0.0)",
org.eclipse.ui.console,
org.eclipse.jdt.core;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.6.0",
com.basistech.m2e.code.quality.shared;bundle-version="1.1.1.201812031126-r",
com.basistech.m2e.code.quality.shared;bundle-version="1.1.2.201812191233-r",
org.eclipse.ui.workbench;bundle-version="3.6.0",
org.eclipse.jface;bundle-version="3.6.0",
edu.umd.cs.findbugs.plugin.eclipse;bundle-version="[2.0.0,4.0.0)",
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.findbugs/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.findbugs</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.pmd.feature/feature.xml
Expand Up @@ -2,7 +2,7 @@
<feature
id="com.basistech.m2e.code.quality.pmd.feature"
label="PMD configuration plugin for M2Eclipse"
version="1.1.1.201812031126-r"
version="1.1.2.201812191233-r"
plugin="com.basistech.m2e.code.quality.shared">

<description>
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.pmd.feature/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.pmd.feature</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions com.basistech.m2e.code.quality.pmd/META-INF/MANIFEST.MF
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: M2Eclipse Extension to support Eclipse PMD Configuration
Bundle-SymbolicName: com.basistech.m2e.code.quality.pmd
;singleton:=true
Bundle-Version: 1.1.1.201812031126-r
Bundle-Version: 1.1.2.201812191233-r
Require-Bundle: org.eclipse.m2e.jdt;bundle-version="[1.0.0,2.0.0)",
org.eclipse.m2e.core;bundle-version="[1.0.0,2.0.0)",
org.eclipse.m2e.maven.runtime;bundle-version="[1.0.0,2.0.0)",
Expand All @@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.m2e.jdt;bundle-version="[1.0.0,2.0.0)",
org.eclipse.ui.console,
org.eclipse.jdt.core;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.6.0",
com.basistech.m2e.code.quality.shared;bundle-version="1.1.1.201812031126-r",
com.basistech.m2e.code.quality.shared;bundle-version="1.1.2.201812191233-r",
net.sourceforge.pmd.eclipse.plugin;bundle-version="[4.0.0,5.0.0)",
org.slf4j.api;bundle-version="1.6.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.pmd/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.pmd</artifactId>
Expand Down
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: M2Eclipse Project Configurator for Eclipse Shared Tests
Bundle-SymbolicName: com.basistech.m2e.code.quality.shared.test
Bundle-Version: 1.1.1.201812031126-r
Bundle-Version: 1.1.2.201812191233-r
Bundle-Vendor: Basis Technology Corp.
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.m2e.jdt;bundle-version="[1.0.0,2.0.0)",
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.shared.test/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.shared.test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.shared/META-INF/MANIFEST.MF
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Shared Code for M2 Code Quality Plugin Extensions
Bundle-SymbolicName: com.basistech.m2e.code.quality.shared
;singleton:=true
Bundle-Version: 1.1.1.201812031126-r
Bundle-Version: 1.1.2.201812191233-r
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-Vendor: BasisTech
Export-Package: com.basistech.m2e.code.quality.shared,
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.shared/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.shared</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.site/pom.xml
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.site</artifactId>
Expand Down
Expand Up @@ -2,7 +2,7 @@
<feature
id="com.basistech.m2e.code.quality.spotbugs.feature"
label="SpotBugs configuration plugin for M2Eclipse"
version="1.1.1.201812031126-r"
version="1.1.2.201812191233-r"
plugin="com.basistech.m2e.code.quality.shared">

<description>
Expand Down
2 changes: 1 addition & 1 deletion com.basistech.m2e.code.quality.spotbugs.feature/pom.xml
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.basistech.m2e-code-quality</groupId>
<artifactId>m2e-code-quality-plugins</artifactId>
<version>1.1.1.201812031126-r</version>
<version>1.1.2.201812191233-r</version>
</parent>

<artifactId>com.basistech.m2e.code.quality.spotbugs.feature</artifactId>
Expand Down

0 comments on commit 8ffc965

Please sign in to comment.