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