1 package org.apache.maven.plugin.eclipse.writers;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.List;
23
24 import org.apache.maven.plugin.logging.Log;
25 import org.codehaus.plexus.util.xml.XMLWriter;
26
27
28
29
30
31
32 public class EclipseAntExternalLaunchConfigurationWriter
33 extends EclipseLaunchConfigurationWriter
34 {
35 private String buildfilePath;
36
37
38
39
40
41
42 public EclipseWriter init( Log log, EclipseWriterConfig config, String launcherName, String buildfilePath )
43 {
44 this.buildfilePath = buildfilePath;
45 return super.init( log, config, launcherName );
46 }
47
48 protected void addAttributes( XMLWriter writer )
49 {
50
51 writeAttribute( writer, "process_factory_id", "org.eclipse.ant.ui.remoteAntProcessFactory" );
52
53 writeAttribute( writer, "org.eclipse.ant.ui.DEFAULT_VM_INSTALL", false );
54
55 writeAttribute( writer, "org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON", false );
56
57 writeAttribute( writer, "org.eclipse.ant.ui.ATTR_TARGETS_UPDATED", true );
58
59 writeAttribute( writer, "org.eclipse.jdt.launching.CLASSPATH_PROVIDER",
60 "org.eclipse.ant.ui.AntClasspathProvider" );
61
62 writeAttribute( writer, "org.eclipse.debug.core.MAPPED_RESOURCE_TYPES", new String[] { "1" } );
63
64 writeAttribute( writer, "org.eclipse.debug.core.MAPPED_RESOURCE_PATHS",
65 new String[] { "/" + config.getEclipseProjectName() + "/" + buildfilePath } );
66 }
67
68 protected String getLaunchConfigurationType()
69 {
70 return "org.eclipse.ant.AntBuilderLaunchConfigurationType";
71 }
72
73 protected String getBuilderLocation()
74 {
75 return "${build_project}/" + buildfilePath;
76 }
77
78 protected List getMonitoredResources()
79 {
80
81
82
83 return super.getMonitoredResources();
84 }
85 }