Skip to content

Commit 8a127ce

Browse files
committed
Ant tests don't need org.eclipse.pde.core
Create a custom task with boolean parameter instead of trying to use pde.build one and thus force really big dependency tree for that.
1 parent e867cc1 commit 8a127ce

File tree

4 files changed

+45
-4
lines changed

4 files changed

+45
-4
lines changed

ant/org.eclipse.ant.tests.core/META-INF/MANIFEST.MF

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ Require-Bundle: org.eclipse.ui.ide;resolution:=optional,
1616
org.eclipse.core.resources,
1717
org.eclipse.ui,
1818
org.eclipse.ant.core,
19-
org.eclipse.core.runtime,
20-
org.eclipse.pde.core
19+
org.eclipse.core.runtime
2120
Import-Package: org.assertj.core.api
2221
Bundle-ActivationPolicy: lazy
2322
Bundle-RequiredExecutionEnvironment: JavaSE-17

ant/org.eclipse.ant.tests.ui/META-INF/MANIFEST.MF

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ Require-Bundle: org.eclipse.ui.ide;resolution:=optional,
3737
org.eclipse.test.performance,
3838
org.eclipse.ui.console,
3939
org.eclipse.ant.launching,
40-
org.eclipse.core.externaltools,
41-
org.eclipse.pde.core
40+
org.eclipse.core.externaltools
4241
Import-Package: org.assertj.core.api,
4342
org.assertj.core.api.iterable,
4443
org.junit.jupiter.api,

ant/org.eclipse.ant.tests.ui/plugin.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
library="lib/antUITestsSupport.jar"
3434
eclipseRuntime="false">
3535
</antTask>
36+
<antTask
37+
name="eclipse.buildScript"
38+
class="org.eclipse.ant.tests.ui.support.tasks.CustomBooleanTask"
39+
library="lib/antUITestsSupport.jar"
40+
eclipseRuntime="false">
41+
</antTask>
3642
<antTask
3743
name="coolUITask"
3844
uri="testing"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 Red Hat Inc. and others.
3+
*
4+
* This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License 2.0
6+
* which accompanies this distribution, and is available at
7+
* https://www.eclipse.org/legal/epl-2.0/
8+
*
9+
* SPDX-License-Identifier: EPL-2.0
10+
*
11+
* Contributors:
12+
* IBM Corporation - initial API and implementation
13+
*******************************************************************************/
14+
package org.eclipse.ant.tests.ui.support.tasks;
15+
16+
import org.apache.tools.ant.BuildException;
17+
import org.apache.tools.ant.Task;
18+
import org.apache.tools.ant.taskdefs.Echo;
19+
20+
public class CustomBooleanTask extends Task {
21+
22+
public CustomBooleanTask() {
23+
super();
24+
}
25+
26+
public void setRecursiveGeneration(@SuppressWarnings("unused") boolean recursiveGeneration) {
27+
// for testing purposes
28+
}
29+
30+
@Override
31+
public void execute() throws BuildException {
32+
Echo echo = new Echo();
33+
echo.setProject(getProject());
34+
echo.setMessage("Testing Ant in Eclipse with a custom task"); //$NON-NLS-1$
35+
echo.execute();
36+
}
37+
}

0 commit comments

Comments
 (0)