-
-
Notifications
You must be signed in to change notification settings - Fork 107
Parent pom upgrade #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
664bd6b
3aa94a1
68a2d1e
1c697da
617cc72
54fb675
fd3e587
cc3bc76
029ffe9
7c4677c
4195ffb
857ec50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,16 @@ | ||
| <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"> | ||
|
|
||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <properties> | ||
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
| <skipIntegrationTests>true</skipIntegrationTests> | ||
| <jenkins-test-harness.version>2.23</jenkins-test-harness.version> | ||
| <java.level>7</java.level> | ||
| <jenkins.version>2.7.4</jenkins.version> | ||
| </properties> | ||
|
|
||
| <parent> | ||
| <groupId>org.jenkins-ci.plugins</groupId> | ||
| <artifactId>plugin</artifactId> | ||
| <version>2.15</version> | ||
| <version>3.4</version> | ||
| </parent> | ||
|
|
||
| <properties> | ||
| <jenkins.version>1.625.3</jenkins.version> | ||
|
||
| <java.level>7</java.level> | ||
| </properties> | ||
|
|
||
| <repositories> | ||
| <repository> | ||
|
|
@@ -37,19 +33,6 @@ | |
| <tag>HEAD</tag> | ||
| </scm> | ||
|
|
||
| <distributionManagement> | ||
| <repository> | ||
| <id>maven.jenkins-ci.org</id> | ||
| <name>jenkinsci-releases</name> | ||
| <url>https://repo.jenkins-ci.org/releases</url> | ||
| </repository> | ||
| <snapshotRepository> | ||
| <id>maven.jenkins-ci.org</id> | ||
| <name>jenkinsci-snapshots</name> | ||
| <url>https://repo.jenkins-ci.org/snapshots</url> | ||
| </snapshotRepository> | ||
| </distributionManagement> | ||
|
|
||
| <artifactId>logstash</artifactId> | ||
| <packaging>hpi</packaging> | ||
| <version>2.0.0-SNAPSHOT</version> | ||
|
|
@@ -59,9 +42,9 @@ | |
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.apache.httpcomponents</groupId> | ||
| <artifactId>httpclient</artifactId> | ||
| <version>4.4</version> | ||
| <groupId>org.jenkins-ci.plugins</groupId> | ||
| <artifactId>apache-httpcomponents-client-4-api</artifactId> | ||
| <version>4.5.3-2.1</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
|
|
@@ -174,15 +157,6 @@ | |
| </dependencies> | ||
| </plugin> | ||
|
|
||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <configuration> | ||
| <source>1.7</source> | ||
| <target>1.7</target> | ||
| </configuration> | ||
| </plugin> | ||
|
|
||
| <!-- http://jira.codehaus.org/browse/MRELEASE-812 --> | ||
| <plugin> | ||
| <artifactId>maven-release-plugin</artifactId> | ||
|
|
@@ -199,17 +173,6 @@ | |
| </dependency> | ||
| </dependencies> | ||
| </plugin> | ||
|
|
||
| <!-- https://issues.jenkins-ci.org/browse/JENKINS-21977 --> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-surefire-plugin</artifactId> | ||
| <configuration> | ||
| <excludes> | ||
| <exclude>InjectedTest.java</exclude> | ||
| </excludes> | ||
| </configuration> | ||
| </plugin> | ||
|
|
||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,9 +79,10 @@ public List<?> getIndexerTypes() | |
|
|
||
| @SuppressWarnings("deprecation") | ||
| @Initializer(after = InitMilestone.JOB_LOADED) | ||
| public void migrateData() | ||
| public static void migrateData() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually what is the reason for making this method static?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The initializers are always static. The code won't even compile in newer versions otherwise IIRC |
||
| { | ||
| if (!dataMigrated) | ||
| LogstashConfiguration c = LogstashConfiguration.getInstance(); | ||
| if (!c.dataMigrated) | ||
| { | ||
| Descriptor descriptor = LogstashInstallation.getLogstashDescriptor(); | ||
| if (descriptor.getType() != null) | ||
|
|
@@ -96,7 +97,7 @@ public void migrateData() | |
| redis.setPort(descriptor.getPort()); | ||
| redis.setKey(descriptor.getKey()); | ||
| redis.setPassword(descriptor.getPassword()); | ||
| logstashIndexer = redis; | ||
| c.logstashIndexer = redis; | ||
| break; | ||
| case ELASTICSEARCH: | ||
| LOGGER.log(Level.INFO, "Migrating logstash configuration for Elastic Search"); | ||
|
|
@@ -110,7 +111,7 @@ public void migrateData() | |
| es.setUri(uri); | ||
| es.setUsername(descriptor.getUsername()); | ||
| es.setPassword(descriptor.getPassword()); | ||
| logstashIndexer = es; | ||
| c.logstashIndexer = es; | ||
| } | ||
| catch (URISyntaxException e) | ||
| { | ||
|
|
@@ -125,7 +126,7 @@ public void migrateData() | |
| rabbitMq.setQueue(descriptor.getKey()); | ||
| rabbitMq.setUsername(descriptor.getUsername()); | ||
| rabbitMq.setPassword(descriptor.getPassword()); | ||
| logstashIndexer = rabbitMq; | ||
| c.logstashIndexer = rabbitMq; | ||
| break; | ||
| case SYSLOG: | ||
| LOGGER.log(Level.INFO, "Migrating logstash configuration for SYSLOG"); | ||
|
|
@@ -145,16 +146,16 @@ public void migrateData() | |
| syslog.setMessageFormat(MessageFormat.RFC_3164); | ||
| break; | ||
| } | ||
| logstashIndexer = syslog; | ||
| c.logstashIndexer = syslog; | ||
| break; | ||
| default: | ||
| LOGGER.log(Level.INFO, "unknown logstash Indexer type: " + type); | ||
| break; | ||
| } | ||
| activeIndexer = logstashIndexer; | ||
| c.activeIndexer = c.logstashIndexer; | ||
| } | ||
| dataMigrated = true; | ||
| save(); | ||
| c.dataMigrated = true; | ||
| c.save(); | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| <?jelly escape-by-default='true'?> | ||
| <div> | ||
| Adds the possibility to push builds logs and build data to a Logstash indexer such as Redis, RabbitMQ, Elastic Search or to Syslog. | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it's a downgrade, since pom is at 2.15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I messed up the merge