Browse Source

Fixes to allow xdoclet to build under gump/mutant

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272012 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 23 years ago
parent
commit
e26ee966c8
6 changed files with 52 additions and 2 deletions
  1. +9
    -0
      proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java
  2. +12
    -0
      proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java
  3. +14
    -0
      proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java
  4. +9
    -1
      proposal/mutant/src/java/common/org/apache/ant/common/model/Project.java
  5. +0
    -1
      proposal/mutant/src/java/common/org/apache/ant/common/service/DataService.java
  6. +8
    -0
      proposal/mutant/src/java/common/org/apache/ant/common/service/ExecService.java

+ 9
- 0
proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java View File

@@ -167,5 +167,14 @@ public class CoreExecService implements ExecService {
frame.getEventSupport().fireTaskFinished(task, failureCause); frame.getEventSupport().fireTaskFinished(task, failureCause);
} }
} }

/**
* get the name of the project associated with this execution.
*
* @return the project's name
*/
public String getProjectName() {
return frame.getProjectName();
}
} }



+ 12
- 0
proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java View File

@@ -200,6 +200,18 @@ public class Frame implements DemuxOutputReceiver {
setMagicProperties(); setMagicProperties();
} }


/**
* get the name of the project associated with this frame.
*
* @return the project's name
*/
public String getProjectName() {
if (project != null) {
return project.getName();
}
return null;
}
/** /**
* Set a value in this frame or any of its imported frames. * Set a value in this frame or any of its imported frames.
* *


+ 14
- 0
proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java View File

@@ -67,6 +67,7 @@ import org.apache.ant.common.antlib.AntLibFactory;
import org.apache.ant.common.event.MessageLevel; import org.apache.ant.common.event.MessageLevel;
import org.apache.ant.common.service.ComponentService; import org.apache.ant.common.service.ComponentService;
import org.apache.ant.common.service.DataService; import org.apache.ant.common.service.DataService;
import org.apache.ant.common.service.ExecService;
import org.apache.ant.common.service.FileService; import org.apache.ant.common.service.FileService;
import org.apache.ant.common.util.ExecutionException; import org.apache.ant.common.util.ExecutionException;
import org.apache.ant.common.util.PropertyUtils; import org.apache.ant.common.util.PropertyUtils;
@@ -143,6 +144,9 @@ public class Project implements org.apache.ant.common.event.BuildListener {
/** The core's DataService instance */ /** The core's DataService instance */
private DataService dataService; private DataService dataService;


/** Th ecore's execution service */
private ExecService execService;
/** The core's Component Service instance */ /** The core's Component Service instance */
private ComponentService componentService; private ComponentService componentService;


@@ -715,6 +719,7 @@ public class Project implements org.apache.ant.common.event.BuildListener {
this.context = context; this.context = context;
fileService = (FileService)context.getCoreService(FileService.class); fileService = (FileService)context.getCoreService(FileService.class);
dataService = (DataService)context.getCoreService(DataService.class); dataService = (DataService)context.getCoreService(DataService.class);
execService = (ExecService)context.getCoreService(ExecService.class);
componentService componentService
= (ComponentService)context.getCoreService(ComponentService.class); = (ComponentService)context.getCoreService(ComponentService.class);


@@ -1072,5 +1077,14 @@ public class Project implements org.apache.ant.common.event.BuildListener {
listener.messageLogged(event); listener.messageLogged(event);
} }
} }
/**
* Get the name of the project.
*
* @return the project name
*/
public String getName() {
return execService.getProjectName();
}
} }



+ 9
- 1
proposal/mutant/src/java/common/org/apache/ant/common/model/Project.java View File

@@ -192,7 +192,15 @@ public class Project extends ModelElement {
return base; return base;
} }



/**
* Get the name of the project element
*
* @return the project's name
*/
public String getName() {
return name;
}
/** /**
* Get the targets in this project. * Get the targets in this project.
* *


+ 0
- 1
proposal/mutant/src/java/common/org/apache/ant/common/service/DataService.java View File

@@ -137,6 +137,5 @@ public interface DataService {
* name. * name.
*/ */
Map getAllProperties(); Map getAllProperties();

} }



+ 8
- 0
proposal/mutant/src/java/common/org/apache/ant/common/service/ExecService.java View File

@@ -106,5 +106,13 @@ public interface ExecService {
* @exception ExecutionException if there is a problem in execution. * @exception ExecutionException if there is a problem in execution.
*/ */
void executeTask(Task task) throws ExecutionException; void executeTask(Task task) throws ExecutionException;
/**
* get the name of the project associated with this execution.
*
* @return the project's name
*/
String getProjectName();

} }



Loading…
Cancel
Save