Author: tv
Date: Mon Jul 27 18:42:00 2015
New Revision: 1692927
URL: http://svn.apache.org/r1692927
Log:
Update quartz dependency to 2.2.1
update build
Added:
turbine/fulcrum/trunk/quartz/src/assembly/
turbine/fulcrum/trunk/quartz/src/assembly/binaries.xml (with props)
turbine/fulcrum/trunk/quartz/src/assembly/source.xml (with props)
Removed:
turbine/fulcrum/trunk/quartz/NOTICE.txt
turbine/fulcrum/trunk/quartz/README.txt
Modified:
turbine/fulcrum/trunk/quartz/pom.xml
turbine/fulcrum/trunk/quartz/src/changes/changes.xml
turbine/fulcrum/trunk/quartz/src/java/org/apache/fulcrum/quartz/impl/QuartzSchedulerImpl.java
turbine/fulcrum/trunk/quartz/src/test/org/apache/fulcrum/quartz/DefaultQuartzSchedulerImplTest.java
Modified: turbine/fulcrum/trunk/quartz/pom.xml
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/pom.xml?rev=1692927&r1=1692926&r2=1692927&view=diff
==============================================================================
--- turbine/fulcrum/trunk/quartz/pom.xml (original)
+++ turbine/fulcrum/trunk/quartz/pom.xml Mon Jul 27 18:42:00 2015
@@ -23,6 +23,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-quartz</artifactId>
<version>1.1.1-SNAPSHOT</version>
<name>Fulcrum Quartz</name>
@@ -36,14 +37,6 @@
<url>http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/</url>
</scm>
- <distributionManagement>
- <site>
- <id>apache.website</id>
- <name>Fulcrum Website</name>
-
<url>${fulcrum.deployment.protocol}://people.apache.org/www/turbine.apache.org/fulcrum/fulcrum-quartz/</url>
- </site>
- </distributionManagement>
-
<developers>
<developer>
<name>Scott Eade</name>
@@ -92,17 +85,17 @@
<version>1.0.6</version>
<scope>test</scope>
</dependency>
- <!-- Service Dependencies -->
- <dependency>
- <groupId>org.quartz-scheduler</groupId>
- <artifactId>quartz</artifactId>
- <version>2.0.0</version>
- </dependency>
+ <!-- Service Dependencies -->
<dependency>
<groupId>org.apache.avalon.framework</groupId>
<artifactId>avalon-framework-api</artifactId>
<version>4.3.1</version>
</dependency>
+ <dependency>
+ <groupId>org.quartz-scheduler</groupId>
+ <artifactId>quartz</artifactId>
+ <version>2.2.1</version>
+ </dependency>
</dependencies>
<build>
@@ -110,45 +103,40 @@
<testSourceDirectory>${basedir}/src/test</testSourceDirectory>
</build>
- <reporting>
- <plugins>
- <plugin>
- <!-- generate the changes report from changes.xml -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-changes-plugin</artifactId>
- <version>2.0-beta-3</version>
- <configuration>
- <xmlPath>${basedir}/src/changes/changes.xml</xmlPath>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>changes-report</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
-
<properties>
- <!-- This bits are used for the staging directory -->
- <fulcrum.release.version>1.1.0</fulcrum.release.version>
- <fulcrum.rc.version>RC1</fulcrum.rc.version>
- <fulcrum.deployment.protocol>scpexe</fulcrum.deployment.protocol>
+ <turbine.site.path>fulcrum/fulcrum-quartz</turbine.site.path>
</properties>
-
+
<profiles>
<profile>
- <id>rc</id>
- <distributionManagement>
- <!-- Cannot define in parent ATM, see COMMONSSITE-26 -->
- <site>
- <id>apache.website</id>
- <name>Apache Fulcrum Release Candidate Staging Site</name>
-
<url>${fulcrum.deployment.protocol}://people.apache.org/www/turbine.apache.org/builds/fulcrum/${fulcrum.componentid}/${fulcrum.release.version}/${fulcrum.rc.version}/site</url>
- </site>
- </distributionManagement>
+ <id>apache-release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- build the source and binary distribution packages -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>fulcrum-source-release-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
+ <descriptors>
+ <descriptor>src/assembly/binaries.xml</descriptor>
+ <descriptor>src/assembly/source.xml</descriptor>
+ </descriptors>
+ <tarLongFileFormat>gnu</tarLongFileFormat>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</profile>
- </profiles>
+ </profiles>
+
</project>
\ No newline at end of file
Added: turbine/fulcrum/trunk/quartz/src/assembly/binaries.xml
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/assembly/binaries.xml?rev=1692927&view=auto
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/assembly/binaries.xml (added)
+++ turbine/fulcrum/trunk/quartz/src/assembly/binaries.xml Mon Jul 27 18:42:00
2015
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>bin</id>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>README*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+
<directory>${project.build.directory}/maven-shared-archive-resources/META-INF</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>LICENSE*</include>
+ <include>NOTICE*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
Propchange: turbine/fulcrum/trunk/quartz/src/assembly/binaries.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: turbine/fulcrum/trunk/quartz/src/assembly/source.xml
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/assembly/source.xml?rev=1692927&view=auto
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/assembly/source.xml (added)
+++ turbine/fulcrum/trunk/quartz/src/assembly/source.xml Mon Jul 27 18:42:00
2015
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>src</id>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}</directory>
+ <includes>
+ <include>README*</include>
+ <include>pom.xml</include>
+ </includes>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ </fileSet>
+ <fileSet>
+
<directory>${project.build.directory}/maven-shared-archive-resources/META-INF</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>LICENSE*</include>
+ <include>NOTICE*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/src</directory>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Propchange: turbine/fulcrum/trunk/quartz/src/assembly/source.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: turbine/fulcrum/trunk/quartz/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/changes/changes.xml?rev=1692927&r1=1692926&r2=1692927&view=diff
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/changes/changes.xml (original)
+++ turbine/fulcrum/trunk/quartz/src/changes/changes.xml Mon Jul 27 18:42:00
2015
@@ -24,7 +24,12 @@
</properties>
<body>
- <release version="1.1.0" date="in svn">
+ <release version="1.1.1" date="in SVN">
+ <action dev="tv" type="update">
+ Update dependency to quartz-2.2.1
+ </action>
+ </release>
+ <release version="1.1.0" date="2011-09-14">
<action dev="tv" type="update" date="2011-09-12">
Update dependency to quartz-2.0.0
</action>
Modified:
turbine/fulcrum/trunk/quartz/src/java/org/apache/fulcrum/quartz/impl/QuartzSchedulerImpl.java
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/java/org/apache/fulcrum/quartz/impl/QuartzSchedulerImpl.java?rev=1692927&r1=1692926&r2=1692927&view=diff
==============================================================================
---
turbine/fulcrum/trunk/quartz/src/java/org/apache/fulcrum/quartz/impl/QuartzSchedulerImpl.java
(original)
+++
turbine/fulcrum/trunk/quartz/src/java/org/apache/fulcrum/quartz/impl/QuartzSchedulerImpl.java
Mon Jul 27 18:42:00 2015
@@ -20,7 +20,6 @@
package org.apache.fulcrum.quartz.impl;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.Set;
@@ -45,6 +44,7 @@ import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobKey;
import org.quartz.JobListener;
+import org.quartz.Matcher;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.Trigger;
@@ -58,6 +58,15 @@ public class QuartzSchedulerImpl
extends AbstractLogEnabled
implements QuartzScheduler, Configurable, Serviceable, Disposable,
Initializable, ThreadSafe, JobListener, Startable
{
+ /** Configuration key */
+ private static final String CONFIG_CONFIGURATION = "configuration";
+
+ /** Configuration key */
+ private static final String CONFIG_PROPERTY_FILE = "quartzPropertyFile";
+
+ /** Configuration key */
+ private static final String CONFIG_PROPERTIES = "properties";
+
/**
* the Avalon service serviceManager
*/
@@ -83,23 +92,25 @@ public class QuartzSchedulerImpl
/**
* @see
org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
+ @Override
public void configure(Configuration conf) throws ConfigurationException
{
- Configuration quartzConf = conf.getChild("configuration", true);
+ Configuration quartzConf = conf.getChild(CONFIG_CONFIGURATION, true);
- if(quartzConf.getChild("properties", false) != null)
+ if(quartzConf.getChild(CONFIG_PROPERTIES, false) != null)
{
- this.quartzProperties =
Parameters.toProperties(Parameters.fromConfiguration(quartzConf.getChild("properties")));
+ this.quartzProperties =
Parameters.toProperties(Parameters.fromConfiguration(quartzConf.getChild(CONFIG_PROPERTIES)));
}
- else if(quartzConf.getChild("quartzPropertyFile", false) != null)
+ else if(quartzConf.getChild(CONFIG_PROPERTY_FILE, false) != null)
{
- this.quartzPropertyFile =
quartzConf.getChild("quartzPropertyFile").getValue();
+ this.quartzPropertyFile =
quartzConf.getChild(CONFIG_PROPERTY_FILE).getValue();
}
}
/**
* @see
org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
*/
+ @Override
public void service(ServiceManager manager) throws ServiceException
{
this.serviceManager = manager;
@@ -108,6 +119,7 @@ public class QuartzSchedulerImpl
/**
* @see org.apache.avalon.framework.activity.Initializable#initialize()
*/
+ @Override
public void initialize() throws Exception
{
// instantiating a specific scheduler from a property file or
properties
@@ -131,9 +143,10 @@ public class QuartzSchedulerImpl
this.scheduler = schedulerFactory.getScheduler();
// add this service instance as JobListener to allow basic monitoring
- getScheduler().getListenerManager().addJobListener(this, new
ArrayList());
+ getScheduler().getListenerManager().addJobListener(this, new
ArrayList<Matcher<JobKey>>());
}
+ @Override
public void start() throws Exception
{
getScheduler().start();
@@ -145,6 +158,7 @@ public class QuartzSchedulerImpl
}
+ @Override
public void stop() throws Exception
{
getScheduler().standby();
@@ -153,6 +167,7 @@ public class QuartzSchedulerImpl
/**
* @see org.apache.avalon.framework.activity.Disposable#dispose()
*/
+ @Override
public void dispose()
{
try
@@ -174,6 +189,7 @@ public class QuartzSchedulerImpl
/**
* @see org.apache.fulcrum.quartz.QuartzScheduler#getScheduler()
*/
+ @Override
public Scheduler getScheduler()
{
return scheduler;
@@ -184,6 +200,7 @@ public class QuartzSchedulerImpl
*
* @see org.quartz.JobListener#getName()
*/
+ @Override
public String getName()
{
return getClass().getName();
@@ -195,6 +212,7 @@ public class QuartzSchedulerImpl
*
* @see
org.quartz.JobListener#jobToBeExecuted(org.quartz.JobExecutionContext)
*/
+ @Override
public void jobToBeExecuted(JobExecutionContext context)
{
Job job = context.getJobInstance();
@@ -222,6 +240,7 @@ public class QuartzSchedulerImpl
/**
* @see
org.quartz.JobListener#jobWasExecuted(org.quartz.JobExecutionContext,
org.quartz.JobExecutionException)
*/
+ @Override
public void jobWasExecuted(JobExecutionContext context,
JobExecutionException ex)
{
if (ex != null)
@@ -241,6 +260,7 @@ public class QuartzSchedulerImpl
/**
* @see
org.quartz.JobListener#jobExecutionVetoed(org.quartz.JobExecutionContext)
*/
+ @Override
public void jobExecutionVetoed(JobExecutionContext context)
{
// nothing to do
@@ -250,23 +270,20 @@ public class QuartzSchedulerImpl
private void logSchedulerConfiguration() throws SchedulerException
{
- List jobGroups = getScheduler().getJobGroupNames();
- for (Iterator i = jobGroups.iterator(); i.hasNext();)
+ for (String jobGroup : getScheduler().getJobGroupNames())
{
- String jobGroup = (String)i.next();
- Set jobsInGroup =
getScheduler().getJobKeys(GroupMatcher.groupEquals(jobGroup));
+ Set<JobKey> jobsInGroup =
getScheduler().getJobKeys(GroupMatcher.jobGroupEquals(jobGroup));
getLogger().info("Job Group: " + jobGroup + " contains the
following number of jobs : " + jobsInGroup.size());
- for (Iterator j = jobsInGroup.iterator(); j.hasNext();)
+ for (JobKey jobKey : jobsInGroup)
{
- StringBuffer buffer = new StringBuffer();
- JobKey jobKey = (JobKey)j.next();
+ StringBuilder buffer = new StringBuilder();
JobDetail jobDetail = getScheduler().getJobDetail(jobKey);
- List jobTriggers = getScheduler().getTriggersOfJob(jobKey);
+ List<? extends Trigger> jobTriggers =
getScheduler().getTriggersOfJob(jobKey);
buffer.append(jobDetail.getKey());
buffer.append(" => ");
if(jobTriggers != null && !jobTriggers.isEmpty())
{
- Trigger jt = (Trigger)jobTriggers.get(0);
+ Trigger jt = jobTriggers.get(0);
buffer.append(jt.getKey());
buffer.append(" (");
buffer.append(jt.getNextFireTime());
Modified:
turbine/fulcrum/trunk/quartz/src/test/org/apache/fulcrum/quartz/DefaultQuartzSchedulerImplTest.java
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/test/org/apache/fulcrum/quartz/DefaultQuartzSchedulerImplTest.java?rev=1692927&r1=1692926&r2=1692927&view=diff
==============================================================================
---
turbine/fulcrum/trunk/quartz/src/test/org/apache/fulcrum/quartz/DefaultQuartzSchedulerImplTest.java
(original)
+++
turbine/fulcrum/trunk/quartz/src/test/org/apache/fulcrum/quartz/DefaultQuartzSchedulerImplTest.java
Mon Jul 27 18:42:00 2015
@@ -43,7 +43,7 @@ public class DefaultQuartzSchedulerImplT
{
/**
- * Make sure that the Quartz sheduler is up and running
+ * Make sure that the Quartz scheduler is up and running
*/
public void testService() throws Exception
{
@@ -60,7 +60,7 @@ public class DefaultQuartzSchedulerImplT
{
Scheduler scheduler = quartz.getScheduler();
assertNotNull(scheduler);
- Set jobNames =
scheduler.getJobKeys(GroupMatcher.groupEquals("TURBINE"));
+ Set<JobKey> jobNames =
scheduler.getJobKeys(GroupMatcher.jobGroupEquals("TURBINE"));
assertEquals("Expected two registered jobs", 2, jobNames.size());
}
@@ -82,7 +82,7 @@ public class DefaultQuartzSchedulerImplT
*/
public void testGetTriggersOfJob() throws Exception
{
- List triggers =
quartz.getScheduler().getTriggersOfJob(JobKey.jobKey("notSoSimpleJob",
"TURBINE"));
+ List<? extends Trigger> triggers =
quartz.getScheduler().getTriggersOfJob(JobKey.jobKey("notSoSimpleJob",
"TURBINE"));
assertEquals(1, triggers.size());
assertEquals("cronTrigger",
((Trigger)triggers.get(0)).getKey().getName());
}