Funzionante ma non sono gestiti gli errori
This commit is contained in:
12
pom.xml
12
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jenkins-ci.plugins</groupId>
|
<groupId>org.jenkins-ci.plugins</groupId>
|
||||||
<artifactId>plugin</artifactId>
|
<artifactId>plugin</artifactId>
|
||||||
<version>4.85</version>
|
<version>4.88</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>1.0.7</revision>
|
<revision>1.0.20</revision>
|
||||||
<changelist>-SNAPSHOT</changelist>
|
<changelist>-SNAPSHOT</changelist>
|
||||||
|
|
||||||
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
|
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
|
||||||
@@ -47,14 +47,18 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<!-- Pick up common dependencies for the selected LTS line: https://github.com/jenkinsci/bom#usage -->
|
<!-- Pick up common dependencies for the selected LTS line: https://github.com/jenkinsci/bom#usage -->
|
||||||
<groupId>io.jenkins.tools.bom</groupId>
|
<groupId>io.jenkins.tools.bom</groupId>
|
||||||
<artifactId>bom-2.440.x</artifactId>
|
<artifactId>bom-2.462.x</artifactId>
|
||||||
<version>3193.v330d8248d39e</version>
|
<version>3696.vb_b_4e2d1a_0542</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||||
|
<artifactId>workflow-step-api</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jenkins-ci.plugins</groupId>
|
<groupId>org.jenkins-ci.plugins</groupId>
|
||||||
<artifactId>structs</artifactId>
|
<artifactId>structs</artifactId>
|
||||||
|
|||||||
@@ -24,30 +24,19 @@ public class PBAutoBuildBuilder extends Builder implements SimpleBuildStep {
|
|||||||
*/
|
*/
|
||||||
private String pbAutoBuildName;
|
private String pbAutoBuildName;
|
||||||
private String cmdLineArgs;
|
private String cmdLineArgs;
|
||||||
private boolean continueOnBuildFailure;
|
|
||||||
private boolean unstableIfWarnings;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When this builder is created in the project configuration step, the
|
* When this builder is created in the project configuration step, the
|
||||||
* builder object will be created from the strings below.
|
* builder object will be created from the strings below.
|
||||||
*
|
*
|
||||||
* @param pbAutoBuildName
|
* @param pbAutoBuildName The PowerBuilder logical name
|
||||||
* The PowerBuilder logical name
|
* @param cmdLineArgs Whitespace separated list of command line arguments for pb autobuild utility
|
||||||
* @param cmdLineArgs
|
|
||||||
* Whitespace separated list of command line arguments for pb autobuild utility
|
|
||||||
* @param continueOnBuildFailure
|
|
||||||
* If true, job will continue despite pb autobuild build failure
|
|
||||||
* @param unstableIfWarnings
|
|
||||||
* If true, job will be unstable if there are warnings
|
|
||||||
*/
|
*/
|
||||||
@DataBoundConstructor
|
@DataBoundConstructor
|
||||||
public PBAutoBuildBuilder(String pbAutoBuildName, String cmdLineArgs, boolean continueOnBuildFailure, boolean unstableIfWarnings) {
|
public PBAutoBuildBuilder(String pbAutoBuildName, String cmdLineArgs) {
|
||||||
this.pbAutoBuildName = pbAutoBuildName;
|
this.pbAutoBuildName = pbAutoBuildName;
|
||||||
this.cmdLineArgs = cmdLineArgs;
|
this.cmdLineArgs = cmdLineArgs;
|
||||||
this.continueOnBuildFailure = continueOnBuildFailure;
|
|
||||||
this.unstableIfWarnings = unstableIfWarnings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPbAutoBuildName() {
|
public String getPbAutoBuildName() {
|
||||||
@@ -68,127 +57,124 @@ public class PBAutoBuildBuilder extends Builder implements SimpleBuildStep {
|
|||||||
this.cmdLineArgs = cmdLineArgs;
|
this.cmdLineArgs = cmdLineArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isContinueOnBuildFailure() {
|
|
||||||
return continueOnBuildFailure;
|
|
||||||
}
|
|
||||||
|
|
||||||
@DataBoundSetter
|
|
||||||
public void setContinueOnBuildFailure(boolean continueOnBuildFailure) {
|
|
||||||
this.continueOnBuildFailure = continueOnBuildFailure;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isUnstableIfWarnings() {
|
|
||||||
return unstableIfWarnings;
|
|
||||||
}
|
|
||||||
|
|
||||||
@DataBoundSetter
|
|
||||||
public void setUnstableIfWarnings(boolean unstableIfWarnings) {
|
|
||||||
this.unstableIfWarnings = unstableIfWarnings;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PBAutoBuildInstallation getPBAutoBuild() {
|
public PBAutoBuildInstallation getPBAutoBuild() {
|
||||||
DescriptorImpl descriptor = (DescriptorImpl) getDescriptor();
|
DescriptorImpl descriptor = (DescriptorImpl) getDescriptor();
|
||||||
for (PBAutoBuildInstallation i : descriptor.getInstallations()) {
|
for (PBAutoBuildInstallation i : descriptor.getInstallations()) {
|
||||||
if (pbAutoBuildName != null && i.getName().equals(pbAutoBuildName))
|
if (pbAutoBuildName != null && i.getName().equals(pbAutoBuildName))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
if ( descriptor.getInstallations().length == 1 ) {
|
if (descriptor.getInstallations().length == 1) {
|
||||||
return descriptor.getInstallations()[0];
|
return descriptor.getInstallations()[0];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
|
public boolean requiresWorkspace() {
|
||||||
throws InterruptedException, IOException {
|
return true;
|
||||||
return runPBAutoBuild(build, Objects.requireNonNull(build.getWorkspace()), launcher, listener);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void perform(@NonNull Run<?, ?> run, @NonNull FilePath workspace, @NonNull EnvVars env, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException {
|
public void perform(@NonNull Run<?, ?> run,
|
||||||
|
@NonNull FilePath workspace,
|
||||||
|
@NonNull EnvVars env,
|
||||||
|
@NonNull Launcher launcher,
|
||||||
|
@NonNull TaskListener listener
|
||||||
|
) throws InterruptedException, IOException {
|
||||||
runPBAutoBuild(run, workspace, launcher, listener);
|
runPBAutoBuild(run, workspace, launcher, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean runPBAutoBuild(Run<?, ?> build, @NonNull FilePath workspace, Launcher launcher, TaskListener listener)
|
public boolean runPBAutoBuild(Run<?, ?> build, @NonNull FilePath workspace, Launcher launcher, TaskListener listener)
|
||||||
throws InterruptedException, IOException {
|
throws InterruptedException, IOException {
|
||||||
ArgumentListBuilder args = new ArgumentListBuilder();
|
|
||||||
PBAutoBuildInstallation ai = getPBAutoBuild();
|
PBAutoBuildInstallation ai = getPBAutoBuild();
|
||||||
String execName = "pbautobuild220.exe";
|
|
||||||
|
|
||||||
if (ai == null) {
|
if (ai == null) {
|
||||||
listener.fatalError("Unable to find a valid installation");
|
listener.fatalError("Unable to find a valid installation");
|
||||||
} else {
|
|
||||||
EnvVars env = build.getEnvironment(listener);
|
|
||||||
//Node node = Computer.currentComputer().getNode();
|
|
||||||
//if (node != null) {
|
|
||||||
//ai = ai.forNode(node, listener);
|
|
||||||
ai = ai.forEnvironment(env);
|
|
||||||
String pathToPBAutoBuild = getToolFullPath(launcher, ai.getHome(), execName);
|
|
||||||
FilePath exec = new FilePath(launcher.getChannel(), pathToPBAutoBuild);
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (!exec.exists()) {
|
|
||||||
listener.fatalError(pathToPBAutoBuild + " doesn't exist");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
listener.fatalError("Failed checking for existence of " + pathToPBAutoBuild);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
listener.getLogger().println("Path to PB AutoBuild utility: " + pathToPBAutoBuild);
|
|
||||||
args.add(pathToPBAutoBuild);
|
|
||||||
|
|
||||||
if (ai.getDefaultArgs() != null) {
|
|
||||||
args.add(tokenizeArgs(ai.getDefaultArgs()));
|
|
||||||
}
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
|
|
||||||
EnvVars env = build.getEnvironment(listener);
|
|
||||||
String normalizedArgs = cmdLineArgs.replaceAll("[\t\r\n]+", " ");
|
|
||||||
normalizedArgs = Util.replaceMacro(normalizedArgs, env);
|
|
||||||
//normalizedArgs = Util.replaceMacro(normalizedArgs, build.getBuildVariables());
|
|
||||||
|
|
||||||
if (!normalizedArgs.trim().isEmpty())
|
|
||||||
args.add(tokenizeArgs(normalizedArgs));
|
|
||||||
|
|
||||||
|
|
||||||
if (!launcher.isUnix()) {
|
|
||||||
// final int cpi = getCodePageIdentifier(build.getCharset());
|
|
||||||
// if (cpi != 0)
|
|
||||||
// args.prepend("cmd.exe", "/C", "\"", "chcp", String.valueOf(cpi), "&&");
|
|
||||||
// else
|
|
||||||
args.prepend("cmd.exe", "/C", "\"");
|
|
||||||
args.add("\"", "&&", "exit", "%%ERRORLEVEL%%");
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
listener.getLogger()
|
|
||||||
.println(String.format("Executing the command %s from %s", args.toStringWithQuote(), workspace));
|
|
||||||
// Parser to find the number of Warnings/Errors
|
|
||||||
PBAutoBuildConsoleParser mbcp = new PBAutoBuildConsoleParser(listener.getLogger(), build.getCharset(), false);
|
|
||||||
PBAutoBuildConsoleAnnotator annotator = new PBAutoBuildConsoleAnnotator(listener.getLogger(),
|
|
||||||
build.getCharset(), false, workspace.getRemote());
|
|
||||||
|
|
||||||
// Launch the pbautobuild utility
|
|
||||||
int r = launcher.launch().cmds(args).envs(env).stdout(mbcp).stdout(annotator).pwd(workspace).join();
|
|
||||||
|
|
||||||
// Check the number of warnings
|
|
||||||
if (unstableIfWarnings && mbcp.getNumberOfWarnings() > 0) {
|
|
||||||
listener.getLogger().println("> Set build UNSTABLE because there are warnings.");
|
|
||||||
build.setResult(Result.UNSTABLE);
|
|
||||||
}
|
|
||||||
// Return the result of the compilation
|
|
||||||
return continueOnBuildFailure || (r == 0);
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
|
||||||
Util.displayIOException(e, listener);
|
|
||||||
build.setResult(Result.FAILURE);
|
build.setResult(Result.FAILURE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ottieni l'ambiente della build
|
||||||
|
EnvVars env = build.getEnvironment(listener);
|
||||||
|
ai = ai.forEnvironment(env); // Configura l'installazione per l'ambiente corrente
|
||||||
|
String execName = "pbautobuild220.exe";
|
||||||
|
String pathToPBAutoBuild = getToolFullPath(launcher, ai.getHome(), execName);
|
||||||
|
FilePath exec = new FilePath(launcher.getChannel(), pathToPBAutoBuild);
|
||||||
|
|
||||||
|
// Verifica se l'eseguibile esiste
|
||||||
|
if (!exec.exists()) {
|
||||||
|
return handleError(pathToPBAutoBuild + " doesn't exist", build, listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
listener.getLogger().println("Path to PB AutoBuild utility: " + pathToPBAutoBuild);
|
||||||
|
|
||||||
|
// Costruisci i parametri di comando
|
||||||
|
ArgumentListBuilder args = new ArgumentListBuilder();
|
||||||
|
args.add(pathToPBAutoBuild);
|
||||||
|
|
||||||
|
if (ai.getDefaultArgs() != null) {
|
||||||
|
args.add(tokenizeArgs(ai.getDefaultArgs()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Aggiungi gli argomenti personalizzati (se presenti)
|
||||||
|
String normalizedArgs = cmdLineArgs.replaceAll("[\t\r\n]+", " ");
|
||||||
|
normalizedArgs = Util.replaceMacro(normalizedArgs, env);
|
||||||
|
if (!normalizedArgs.trim().isEmpty()) {
|
||||||
|
args.add(tokenizeArgs(normalizedArgs));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Aggiungi il comando per Windows
|
||||||
|
if (!launcher.isUnix()) {
|
||||||
|
args.prepend("cmd.exe", "/C", "\"");
|
||||||
|
args.add("\"", "&&", "exit", "%%ERRORLEVEL%%");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Esegui il comando
|
||||||
|
return executeBuildCommand(args, build, workspace, launcher, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean handleError(String message, Run<?, ?> build, TaskListener listener) throws AbortException {
|
||||||
|
listener.fatalError(message);
|
||||||
|
build.setResult(Result.FAILURE);
|
||||||
|
throw new AbortException(message);
|
||||||
|
// return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean executeBuildCommand(ArgumentListBuilder args, Run<?, ?> build, FilePath workspace,
|
||||||
|
Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
|
||||||
|
listener.getLogger().println(String.format("Executing the command %s from %s", args.toStringWithQuote(), workspace));
|
||||||
|
|
||||||
|
// Parser per il numero di Warnings/Errors
|
||||||
|
PBAutoBuildConsoleParser mbcp = new PBAutoBuildConsoleParser(listener.getLogger(),
|
||||||
|
build.getCharset(), false, workspace.getRemote());
|
||||||
|
PBAutoBuildConsoleAnnotator annotator = new PBAutoBuildConsoleAnnotator(listener.getLogger(),
|
||||||
|
build.getCharset(), false, workspace.getRemote());
|
||||||
|
|
||||||
|
// Lancia il comando
|
||||||
|
int r = launcher.launch()
|
||||||
|
.cmds(args)
|
||||||
|
.envs(build.getEnvironment(listener))
|
||||||
|
.stdout(mbcp)
|
||||||
|
.stdout(annotator)
|
||||||
|
.pwd(workspace)
|
||||||
|
.join();
|
||||||
|
|
||||||
|
// Gestione degli errori
|
||||||
|
if (!mbcp.getErrors().isEmpty()) {
|
||||||
|
return handleError(mbcp.getErrors().get(0), build, listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Se ci sono warning, possiamo decidere se segnalarli come build UNSTABLE
|
||||||
|
// Se necessario, decommentare la parte per segnalarli come UNSTABLE
|
||||||
|
// if (unstableIfWarnings && !mbcp.getWarnings().isEmpty()) {
|
||||||
|
// listener.getLogger().println("> Set build UNSTABLE because there are warnings.");
|
||||||
|
// build.setResult(Result.UNSTABLE);
|
||||||
|
//}
|
||||||
|
|
||||||
|
return r == 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the full path of the tool to run. If given path is a directory, this
|
* Get the full path of the tool to run. If given path is a directory, this
|
||||||
* will append the executable name.
|
* will append the executable name.
|
||||||
@@ -235,6 +221,7 @@ public class PBAutoBuildBuilder extends Builder implements SimpleBuildStep {
|
|||||||
@Extension
|
@Extension
|
||||||
@Symbol("pbautobuild")
|
@Symbol("pbautobuild")
|
||||||
public static final class DescriptorImpl extends BuildStepDescriptor<Builder> {
|
public static final class DescriptorImpl extends BuildStepDescriptor<Builder> {
|
||||||
|
|
||||||
@CopyOnWrite
|
@CopyOnWrite
|
||||||
private volatile PBAutoBuildInstallation[] installations = new PBAutoBuildInstallation[0];
|
private volatile PBAutoBuildInstallation[] installations = new PBAutoBuildInstallation[0];
|
||||||
|
|
||||||
@@ -248,7 +235,6 @@ public class PBAutoBuildBuilder extends Builder implements SimpleBuildStep {
|
|||||||
return Messages.PBAutoBuildBuilder_DisplayName();
|
return Messages.PBAutoBuildBuilder_DisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
|
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
|
||||||
return true;
|
return true;
|
||||||
@@ -268,156 +254,4 @@ public class PBAutoBuildBuilder extends Builder implements SimpleBuildStep {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getCodePageIdentifier(Charset charset) {
|
|
||||||
final String s_charset = charset.name();
|
|
||||||
if (s_charset.equalsIgnoreCase("utf-8")) // Unicode
|
|
||||||
return 65001;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ibm437")) // US
|
|
||||||
return 437;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ibm850")) // OEM Multilingual Latin
|
|
||||||
// 1
|
|
||||||
return 850;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ibm852")) // OEM Latin2
|
|
||||||
return 852;
|
|
||||||
else if (s_charset.equalsIgnoreCase("shift_jis") || s_charset.equalsIgnoreCase("windows-31j")) // Japanese
|
|
||||||
return 932;
|
|
||||||
else if (s_charset.equalsIgnoreCase("us-ascii")) // US-ASCII
|
|
||||||
return 20127;
|
|
||||||
else if (s_charset.equalsIgnoreCase("euc-jp")) // Japanese
|
|
||||||
return 20932;
|
|
||||||
else if (s_charset.equalsIgnoreCase("iso-8859-1")) // Latin 1
|
|
||||||
return 28591;
|
|
||||||
else if (s_charset.equalsIgnoreCase("iso-8859-2")) // Latin 2
|
|
||||||
return 28592;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM00858"))
|
|
||||||
return 858;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM775"))
|
|
||||||
return 775;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM855"))
|
|
||||||
return 855;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM857"))
|
|
||||||
return 857;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-8859-4"))
|
|
||||||
return 28594;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-8859-5"))
|
|
||||||
return 28595;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-8859-7"))
|
|
||||||
return 28597;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-8859-9"))
|
|
||||||
return 28599;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-8859-13"))
|
|
||||||
return 28603;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-8859-15"))
|
|
||||||
return 28605;
|
|
||||||
else if (s_charset.equalsIgnoreCase("KOI8-R"))
|
|
||||||
return 20866;
|
|
||||||
else if (s_charset.equalsIgnoreCase("KOI8-U"))
|
|
||||||
return 21866;
|
|
||||||
else if (s_charset.equalsIgnoreCase("UTF-16"))
|
|
||||||
return 1200;
|
|
||||||
else if (s_charset.equalsIgnoreCase("UTF-32"))
|
|
||||||
return 12000;
|
|
||||||
else if (s_charset.equalsIgnoreCase("UTF-32BE"))
|
|
||||||
return 12001;
|
|
||||||
else if (s_charset.equalsIgnoreCase("windows-1250"))
|
|
||||||
return 1250;
|
|
||||||
else if (s_charset.equalsIgnoreCase("windows-1251"))
|
|
||||||
return 1251;
|
|
||||||
else if (s_charset.equalsIgnoreCase("windows-1252"))
|
|
||||||
return 1252;
|
|
||||||
else if (s_charset.equalsIgnoreCase("windows-1253"))
|
|
||||||
return 1253;
|
|
||||||
else if (s_charset.equalsIgnoreCase("windows-1254"))
|
|
||||||
return 1254;
|
|
||||||
else if (s_charset.equalsIgnoreCase("windows-1257"))
|
|
||||||
return 1257;
|
|
||||||
else if (s_charset.equalsIgnoreCase("Big5"))
|
|
||||||
return 950;
|
|
||||||
else if (s_charset.equalsIgnoreCase("EUC-KR"))
|
|
||||||
return 51949;
|
|
||||||
else if (s_charset.equalsIgnoreCase("GB18030"))
|
|
||||||
return 54936;
|
|
||||||
else if (s_charset.equalsIgnoreCase("GB2312"))
|
|
||||||
return 936;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM-Thai"))
|
|
||||||
return 20838;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01140"))
|
|
||||||
return 1140;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01141"))
|
|
||||||
return 1141;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01142"))
|
|
||||||
return 1142;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01143"))
|
|
||||||
return 1143;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01144"))
|
|
||||||
return 1144;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01145"))
|
|
||||||
return 1145;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01146"))
|
|
||||||
return 1146;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01147"))
|
|
||||||
return 1147;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01148"))
|
|
||||||
return 1148;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM01149"))
|
|
||||||
return 1149;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM037"))
|
|
||||||
return 37;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM1026"))
|
|
||||||
return 1026;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM273"))
|
|
||||||
return 20273;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM277"))
|
|
||||||
return 20277;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM278"))
|
|
||||||
return 20278;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM280"))
|
|
||||||
return 20280;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM284"))
|
|
||||||
return 20284;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM285"))
|
|
||||||
return 20285;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM297"))
|
|
||||||
return 20297;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM420"))
|
|
||||||
return 20420;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM424"))
|
|
||||||
return 20424;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM500"))
|
|
||||||
return 500;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM860"))
|
|
||||||
return 860;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM861"))
|
|
||||||
return 861;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM863"))
|
|
||||||
return 863;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM864"))
|
|
||||||
return 864;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM865"))
|
|
||||||
return 865;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM869"))
|
|
||||||
return 869;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM870"))
|
|
||||||
return 870;
|
|
||||||
else if (s_charset.equalsIgnoreCase("IBM871"))
|
|
||||||
return 20871;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-2022-JP"))
|
|
||||||
return 50220;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-2022-KR"))
|
|
||||||
return 50225;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-8859-3"))
|
|
||||||
return 28593;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-8859-6"))
|
|
||||||
return 28596;
|
|
||||||
else if (s_charset.equalsIgnoreCase("ISO-8859-8"))
|
|
||||||
return 28598;
|
|
||||||
else if (s_charset.equalsIgnoreCase("windows-1255"))
|
|
||||||
return 1255;
|
|
||||||
else if (s_charset.equalsIgnoreCase("windows-1256"))
|
|
||||||
return 1256;
|
|
||||||
else if (s_charset.equalsIgnoreCase("windows-1258"))
|
|
||||||
return 1258;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ package io.jenkins.plugins.sample;
|
|||||||
|
|
||||||
import hudson.console.LineTransformationOutputStream;
|
import hudson.console.LineTransformationOutputStream;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
@@ -19,12 +18,12 @@ public class PBAutoBuildConsoleAnnotator extends LineTransformationOutputStream
|
|||||||
private final boolean verboseLogging;
|
private final boolean verboseLogging;
|
||||||
private final String workspace;
|
private final String workspace;
|
||||||
|
|
||||||
|
private List<String> warnings = new ArrayList<>();
|
||||||
|
private List<String> errors = new ArrayList<>();
|
||||||
|
|
||||||
private final PBAutoBuildErrorNote errorNote = new PBAutoBuildErrorNote();
|
private final PBAutoBuildErrorNote errorNote = new PBAutoBuildErrorNote();
|
||||||
private final PBAutoBuildWarningNote warningNote = new PBAutoBuildWarningNote();
|
private final PBAutoBuildWarningNote warningNote = new PBAutoBuildWarningNote();
|
||||||
|
|
||||||
private int numberOfWarnings = 0;
|
|
||||||
private int numberOfErrors = 0;
|
|
||||||
|
|
||||||
// Pattern per Versione e Runtime
|
// Pattern per Versione e Runtime
|
||||||
private Pattern versionPattern = Pattern.compile("PBAutoBuild Version: ([\\d\\.]+)");
|
private Pattern versionPattern = Pattern.compile("PBAutoBuild Version: ([\\d\\.]+)");
|
||||||
private Pattern runtimePattern = Pattern.compile("Runtime Version: ([\\d\\.]+)");
|
private Pattern runtimePattern = Pattern.compile("Runtime Version: ([\\d\\.]+)");
|
||||||
@@ -41,9 +40,11 @@ public class PBAutoBuildConsoleAnnotator extends LineTransformationOutputStream
|
|||||||
|
|
||||||
// Pattern per Stage1, Stage2 e Regenerating
|
// Pattern per Stage1, Stage2 e Regenerating
|
||||||
private Pattern stagePattern = Pattern.compile("(Normal|Stage1|Stage2|Regenerating) for ([a-zA-Z]:\\\\.*?\\\\([^\\\\]+\\.\\w+))");
|
private Pattern stagePattern = Pattern.compile("(Normal|Stage1|Stage2|Regenerating) for ([a-zA-Z]:\\\\.*?\\\\([^\\\\]+\\.\\w+))");
|
||||||
|
private Pattern errorPattern = Pattern.compile("\\[\\s*Error\\s*\\](.*)");
|
||||||
|
private Pattern warningPattern = Pattern.compile("\\[\\s*Warning\\s*\\](.*)");
|
||||||
|
|
||||||
|
|
||||||
private final Queue<byte[]> queueLog = new ConcurrentLinkedQueue<>();
|
private final Queue<String> queueLog = new ConcurrentLinkedQueue<>();
|
||||||
private Thread consumerThread;
|
private Thread consumerThread;
|
||||||
private boolean consumerThreadRunning;
|
private boolean consumerThreadRunning;
|
||||||
|
|
||||||
@@ -57,17 +58,12 @@ public class PBAutoBuildConsoleAnnotator extends LineTransformationOutputStream
|
|||||||
startQueueConsumer();
|
startQueueConsumer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNumberOfWarnings() {
|
|
||||||
return numberOfWarnings;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getNumberOfErrors() {
|
|
||||||
return numberOfErrors;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void eol(byte[] b, int len) throws IOException {
|
protected void eol(byte[] b, int len) throws IOException {
|
||||||
queueLog.add(b);
|
String line = charset.decode(ByteBuffer.wrap(b, 0, len)).toString();
|
||||||
|
line = line.replace("\0", "").trim();
|
||||||
|
queueLog.add(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -82,7 +78,7 @@ public class PBAutoBuildConsoleAnnotator extends LineTransformationOutputStream
|
|||||||
consumerThread = new Thread(() -> {
|
consumerThread = new Thread(() -> {
|
||||||
while (consumerThreadRunning) {
|
while (consumerThreadRunning) {
|
||||||
if (!queueLog.isEmpty()) {
|
if (!queueLog.isEmpty()) {
|
||||||
final byte[] item = queueLog.poll();
|
final String item = queueLog.poll();
|
||||||
|
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
try {
|
try {
|
||||||
@@ -93,6 +89,7 @@ public class PBAutoBuildConsoleAnnotator extends LineTransformationOutputStream
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
// queueLog.wait();
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
@@ -103,41 +100,22 @@ public class PBAutoBuildConsoleAnnotator extends LineTransformationOutputStream
|
|||||||
consumerThread.start();
|
consumerThread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processLine(byte[] b) throws IOException {
|
private void processLine(String line) throws IOException {
|
||||||
String line = charset.decode(ByteBuffer.wrap(b, 0, b.length)).toString();
|
|
||||||
byte[] bytes1 = line.getBytes(charset);
|
|
||||||
|
|
||||||
String lineUtf16 = StandardCharsets.UTF_16.decode(ByteBuffer.wrap(b, 0, b.length)).toString();
|
|
||||||
|
|
||||||
boolean isUtf16 = true;
|
|
||||||
for (int i = 0; i < bytes1.length; i = i + 2) {
|
|
||||||
if (bytes1[i] != 0) {
|
|
||||||
isUtf16 = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isUtf16) {
|
|
||||||
line = lineUtf16;
|
|
||||||
}
|
|
||||||
|
|
||||||
// trim off CR/LF from the end
|
|
||||||
line = trimEOL(line);
|
|
||||||
|
|
||||||
if (line.isEmpty()) return;
|
if (line.isEmpty()) return;
|
||||||
|
|
||||||
// Error messages handler
|
// Error messages handler
|
||||||
Matcher m = PBAutoBuildErrorNote.PATTERN.matcher(line);
|
final String errorMessage = extractData(line, errorPattern);
|
||||||
if (m.matches()) { // Match the number of warnings
|
|
||||||
|
if (errorMessage != null) { // Match the number of warnings
|
||||||
errorNote.encodeTo(out);
|
errorNote.encodeTo(out);
|
||||||
this.numberOfErrors++;
|
errors.add(errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warning messages handler
|
// Warning messages handler
|
||||||
m = PBAutoBuildWarningNote.PATTERN.matcher(line);
|
final String warningMessage = extractData(line, warningPattern);
|
||||||
if (m.matches()) { // Match the number of warnings
|
if (warningMessage != null) { // Match the number of warnings
|
||||||
warningNote.encodeTo(out);
|
warningNote.encodeTo(out);
|
||||||
this.numberOfWarnings++;
|
warnings.add(warningMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -147,13 +125,7 @@ public class PBAutoBuildConsoleAnnotator extends LineTransformationOutputStream
|
|||||||
out.write(b1, 0, b1.length);
|
out.write(b1, 0, b1.length);
|
||||||
} else {
|
} else {
|
||||||
// Estrarre i dati
|
// Estrarre i dati
|
||||||
// String version = extractData(line, versionPattern);
|
|
||||||
// String runtimePath = extractData(line, runtimePattern);
|
|
||||||
// String workPath = extractData(line, workPathPattern);
|
|
||||||
// String project = extractData(line, projectPattern);
|
|
||||||
String timestamp = extractData(line, timestampPattern);
|
String timestamp = extractData(line, timestampPattern);
|
||||||
// String filename = extractFileNames(line, fileNamePattern);
|
|
||||||
// String stage = extractStages(line, stagePattern);
|
|
||||||
|
|
||||||
line = line.replace(workspace, "")
|
line = line.replace(workspace, "")
|
||||||
.replace("\t", " ");
|
.replace("\t", " ");
|
||||||
@@ -163,9 +135,8 @@ public class PBAutoBuildConsoleAnnotator extends LineTransformationOutputStream
|
|||||||
|
|
||||||
|
|
||||||
line += "\r\n";
|
line += "\r\n";
|
||||||
byte[] bytesToWrite = line.getBytes(charset);
|
byte[] bytesToWrite = line.getBytes();
|
||||||
out.write(bytesToWrite, 0, bytesToWrite.length);
|
out.write(bytesToWrite, 0, bytesToWrite.length);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,13 +22,17 @@ package io.jenkins.plugins.sample;
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import hudson.console.LineTransformationOutputStream;
|
import hudson.console.LineTransformationOutputStream;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@@ -40,11 +44,11 @@ import java.util.regex.Pattern;
|
|||||||
public class PBAutoBuildConsoleParser extends LineTransformationOutputStream {
|
public class PBAutoBuildConsoleParser extends LineTransformationOutputStream {
|
||||||
private final OutputStream out;
|
private final OutputStream out;
|
||||||
private final Charset charset;
|
private final Charset charset;
|
||||||
|
|
||||||
private int numberOfWarnings = -1;
|
|
||||||
private int numberOfErrors = -1;
|
|
||||||
|
|
||||||
private boolean verboseLogging = false;
|
private boolean verboseLogging = false;
|
||||||
|
private final String workspace;
|
||||||
|
|
||||||
|
private List<String> warnings = new ArrayList<>();
|
||||||
|
private List<String> errors = new ArrayList<>();
|
||||||
|
|
||||||
private final Pattern patternWarnings = Pattern.compile(".*\\d+\\sWarning\\(s\\).*");
|
private final Pattern patternWarnings = Pattern.compile(".*\\d+\\sWarning\\(s\\).*");
|
||||||
private final Pattern patternErrors = Pattern.compile(".*\\d+\\sError\\(s\\).*");
|
private final Pattern patternErrors = Pattern.compile(".*\\d+\\sError\\(s\\).*");
|
||||||
@@ -61,87 +65,67 @@ public class PBAutoBuildConsoleParser extends LineTransformationOutputStream {
|
|||||||
|
|
||||||
// Pattern per i file (solo nome, escludendo il percorso)
|
// Pattern per i file (solo nome, escludendo il percorso)
|
||||||
private Pattern fileNamePattern = Pattern.compile("([^\\\\]+\\.\\w+)$");
|
private Pattern fileNamePattern = Pattern.compile("([^\\\\]+\\.\\w+)$");
|
||||||
|
private Pattern timestampPattern = Pattern.compile("(^\\d{2}:\\d{2}:\\d{2})");
|
||||||
|
|
||||||
// Pattern per Stage1, Stage2 e Regenerating
|
// Pattern per Stage1, Stage2 e Regenerating
|
||||||
private Pattern stagePattern = Pattern.compile("(Normal|Stage1|Stage2|Regenerating) for ([a-zA-Z]:\\\\.*?\\\\([^\\\\]+\\.\\w+))");
|
private Pattern stagePattern = Pattern.compile("(Normal|Stage1|Stage2|Regenerating) for ([a-zA-Z]:\\\\.*?\\\\([^\\\\]+\\.\\w+))");
|
||||||
|
private Pattern errorPattern = Pattern.compile("\\[\\s*Error\\s*\\](.*)");
|
||||||
|
private Pattern warningPattern = Pattern.compile("\\[\\s*Warning\\s*\\](.*)");
|
||||||
|
|
||||||
|
|
||||||
public PBAutoBuildConsoleParser(OutputStream out, Charset charset, boolean verboseLogging) {
|
public PBAutoBuildConsoleParser(OutputStream out, Charset charset, boolean verboseLogging, String workspace) {
|
||||||
this.out = out;
|
this.out = out;
|
||||||
this.charset = charset;
|
this.charset = charset;
|
||||||
this.verboseLogging = verboseLogging;
|
this.verboseLogging = verboseLogging;
|
||||||
|
this.workspace = workspace + File.separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNumberOfWarnings() {
|
public List<String> getWarnings() {
|
||||||
return numberOfWarnings;
|
return warnings;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNumberOfErrors() {
|
public List<String> getErrors() {
|
||||||
return numberOfErrors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void eol(byte[] b, int len) throws IOException {
|
protected void eol(byte[] b, int len) throws IOException {
|
||||||
String line = charset.decode(ByteBuffer.wrap(b, 0, len)).toString();
|
String line = charset.decode(ByteBuffer.wrap(b, 0, len)).toString();
|
||||||
byte[] bytes1 = line.getBytes(charset);
|
line = line.replace("\0", "").trim();
|
||||||
|
|
||||||
String lineUtf16 = StandardCharsets.UTF_16.decode(ByteBuffer.wrap(b, 0, len)).toString();
|
if (line.isEmpty()) return;
|
||||||
|
|
||||||
boolean isUtf16 = true;
|
final String errorMessage = extractData(line, errorPattern);
|
||||||
for(int i = 0; i < bytes1.length; i = i+2) {
|
|
||||||
if(bytes1[i] != 0) {
|
if (errorMessage != null) { // Match the number of warnings
|
||||||
isUtf16 = false;
|
errors.add(errorMessage);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isUtf16) {
|
// Warning messages handler
|
||||||
line = lineUtf16;
|
final String warningMessage = extractData(line, warningPattern);
|
||||||
}
|
if (warningMessage != null) { // Match the number of warnings
|
||||||
|
warnings.add(warningMessage);
|
||||||
// trim off CR/LF from the end
|
|
||||||
line = trimEOL(line);
|
|
||||||
|
|
||||||
if(line.isEmpty()) return;
|
|
||||||
|
|
||||||
Matcher mWarnings = patternWarnings.matcher(line);
|
|
||||||
Matcher mErrors = patternErrors.matcher(line);
|
|
||||||
|
|
||||||
if (mWarnings.matches()) { // Match the number of warnings
|
|
||||||
String[] part = line.split(" ");
|
|
||||||
try {
|
|
||||||
numberOfWarnings = Integer.parseInt(part[4]);
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
} else if (mErrors.matches()) { // Match the number of errors
|
|
||||||
String[] part = line.split(" ");
|
|
||||||
try {
|
|
||||||
numberOfErrors = Integer.parseInt(part[4]);
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write to output
|
// Write to output
|
||||||
if(verboseLogging)
|
if (verboseLogging) {
|
||||||
out.write(b, 0, len);
|
line += "\r\n";
|
||||||
else {
|
byte[] b1 = line.getBytes(charset);
|
||||||
|
out.write(b1, 0, b1.length);
|
||||||
|
} else {
|
||||||
// Estrarre i dati
|
// Estrarre i dati
|
||||||
String version = extractData(line, versionPattern);
|
String timestamp = extractData(line, timestampPattern);
|
||||||
String runtimePath = extractData(line, runtimePattern);
|
|
||||||
String workPath = extractData(line, workPathPattern);
|
|
||||||
String project = extractData(line, projectPattern);
|
|
||||||
String filename = extractFileNames(line, fileNamePattern);
|
|
||||||
String stage = extractStages(line, stagePattern);
|
|
||||||
|
|
||||||
if(line.contains("[Normal]")) {
|
line = line.replace(workspace, "")
|
||||||
//if(line.contains("\\"))
|
.replace("\t", " ");
|
||||||
// line = line.substring(line.lastIndexOf("\\"));
|
|
||||||
|
|
||||||
byte[] bytesToWrite = line.getBytes(charset);
|
if (timestamp != null && !timestamp.isEmpty())
|
||||||
out.write(bytesToWrite, 0, bytesToWrite.length);
|
line = line.replace(timestamp, "").trim();
|
||||||
}
|
|
||||||
|
|
||||||
|
line += "\r\n";
|
||||||
|
byte[] bytesToWrite = line.getBytes();
|
||||||
|
out.write(bytesToWrite, 0, bytesToWrite.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +136,6 @@ public class PBAutoBuildConsoleParser extends LineTransformationOutputStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private String extractData(String log, Pattern pattern) {
|
private String extractData(String log, Pattern pattern) {
|
||||||
Matcher matcher = pattern.matcher(log);
|
Matcher matcher = pattern.matcher(log);
|
||||||
if (matcher.matches()) {
|
if (matcher.matches()) {
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ public class PBAutoBuildErrorNote extends ConsoleNote {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -3278523238642788774L;
|
private static final long serialVersionUID = -3278523238642788774L;
|
||||||
/** Pattern to identify error messages */
|
|
||||||
public final static Pattern PATTERN = Pattern.compile("(.*)[Ee]rror\\s(([A-Z]*)\\d+){0,1}:\\s(.*)");
|
|
||||||
|
|
||||||
public PBAutoBuildErrorNote() {
|
public PBAutoBuildErrorNote() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ public class PBAutoBuildWarningNote extends ConsoleNote {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 5058082724408336863L;
|
private static final long serialVersionUID = 5058082724408336863L;
|
||||||
/** Pattern to identify warning messages */
|
|
||||||
public final static Pattern PATTERN = Pattern.compile("(.*)\\(\\d+(,\\d+){0,1}\\):\\s[Ww]arning\\s(([A-Z]*)\\d+){0,1}:\\s(.*)");
|
|
||||||
|
|
||||||
public PBAutoBuildWarningNote() {
|
public PBAutoBuildWarningNote() {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user