It can't find the class Future. Could you please help
unable to resolve class Future
On Monday, March 10, 2014 at 4:26:28 AM UTC+5:30, dev123 wrote:
>
> A my bad I of course had to call the correct job, it now works thanks :-)
>
> On Sunday, March 9, 2014 11:47:20 PM UTC+1, dev123 wrote:
>>
>> Yes I did a check in allow concurrent execution.
>>
>> Now when I run mvn clean hpi:run it starts the jobs in parallel on the
>> available executors, but its spawns jobs infinitely and the text: XXXX Done
>> in: " + object.getTime() is never printed. And I have not even pressed the
>> build button.
>>
>> Why do I get something that seems like an infinite loop?
>>
>> Here is my code based on your script:
>>
>> List<Future<?>> futures = new ArrayList<Future<?>>();
>> for (int i = 0; i < 5; i++) {
>> System.out.println("Running: " + i + " out off: " + executors);
>> try {
>> QueueTaskFuture<?> scheduleBuild2 =
>> build.getProject().scheduleBuild2(0, new Cause.UserCause(),
>> parametersAction);
>> futures.add((Future) scheduleBuild2);
>> } catch (Exception e) {
>> throw new AbortException(e.getMessage());
>> }
>> }
>> for (Future<?> future : futures) {
>> AbstractBuild<?, ?> object = (AbstractBuild<?, ?>) future.get();
>> System.out.println("XXXX Done in: " + object.getTime());
>> }
>>
>>
>>
>>
>> On Sunday, March 9, 2014 11:23:37 PM UTC+1, Daniel Beck wrote:
>>>
>>> Since you seem to be triggering multiple builds of the same project, did
>>> you enable the project for parallel execution of multiple builds?
>>>
>>> On 09.03.2014, at 23:21, Daniel Beck <[email protected]> wrote:
>>>
>>> > If you have the executors, the builds should run in parallel
>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/53d688f9-1070-4f57-b07a-e47011315489%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.