Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ant-dev] How do I run the org.eclipse.ant.core plugin in a runtime-workbench?

Is org.eclipse.ant.core the only plugin you have in source form? What build
are you using? F2? It is necessary to have the lib/antsupportlib.jar. I
usually do as follows (doesn't need to be exactly like this):

1) Import all plug-ins as binary plug-ins (File->Import->External Plugins
and Fragments) but org.eclipse.ant.core
2) Load org.eclipse.ant.core from CVS
3) "Create Plug-In JARs" to generate the build.xml file
4) Run Ant with the following target order: clean, build.jars, refresh
6) Delete temp.folder and antsupport.jar
5) Debug Runtime Workbench

I know it could be better/easier and will look into it later.
If you have more than one plug-in that contributes ant tasks you should
build their JARs as well.

Rodrigo



                                                                                                                                   
                      Matt_Conway@xxxxxx                                                                                           
                      Sent by:                       To:       platform-ant-dev@xxxxxxxxxxx                                        
                      platform-ant-dev-admin@        cc:                                                                           
                      eclipse.org                    Subject:  [platform-ant-dev] How do I run the org.eclipse.ant.core plugin in  
                                                      a runtime-workbench?                                                         
                                                                                                                                   
                      06/05/2002 01:11 PM                                                                                          
                      Please respond to                                                                                            
                      platform-ant-dev                                                                                             
                                                                                                                                   
                                                                                                                                   




I'm trying to hack the org.eclipse.ant.core plugin to get it working with
ant 1.5.  Unfortunately I must be doing something wrong because I can't
seem to run my local version (unedited even) in a runtime-workbench
instance.  I use CVS to checkout org.eclipse.ant.core as a project, add
ECLIPSE_HOME/plugins/org.apache.ant_1.4.1/ant.jar as a build library,
rebuild the project, "Create Plug-In JARs" from plugin.xml (neccessary?),
set the Plugin dev preferences for the target platform to have all plugins
but org.eclipse.ant.core, then Run->Debug As->Runtime-workbench.  The
workbench instance starts up ok, but when I run a simple build.xml inside
it, AntRunner fails to instantiate InternalAntRunner - a java.lang.Error
gets thrown due to the use of the ant classes like Project, etc - I
printed the stack trace below.   There must be something simple I'm doing
wrong - probably to do with pointing the running plugin to ant.jar (I _do_
do so in the Ant preferences page in the runtime-workbench instance - in
the debugger I can access the Project class in the display pane no
problem).  Any help appreciated,

Matt

java.lang.Error: Unresolved compilation problems:
        Project cannot be resolved
        BuildException cannot be resolved or is not a type
        Project cannot be resolved (or is not a valid type) for the
argument project of the method addBuildListeners
        The method createLogger() is undefined for the type
org.eclipse.ant.internal.core.ant.InternalAntRunner
        BuildListener cannot be resolved or is not a type
        BuildException cannot be resolved or is not a type
        Project cannot be resolved (or is not a valid type) for the
argument project of the method setProperties
        Project cannot be resolved (or is not a valid type) for the
argument project of the method setTasks
        BuildException cannot be resolved or is not a type
        Project cannot be resolved (or is not a valid type) for the
argument project of the method setTypes
        BuildException cannot be resolved or is not a type
        Project cannot be resolved (or is not a valid type) for the
argument project of the method parseScript
        ProjectHelper cannot be resolved
        Project cannot be resolved or is not a type
        Project cannot be resolved or is not a type
        DemuxOutputStream cannot be resolved or is not a type
        DemuxOutputStream cannot be resolved or is not a type
        Project cannot be resolved (or is not a valid type) for the
argument project of the method createMonitorBuildListener
        Project cannot be resolved (or is not a valid type) for the
argument project of the method printTargets
        Target cannot be resolved or is not a type
        Target cannot be resolved or is not a type
        Project cannot be resolved (or is not a valid type) for the
argument project of the method printTargets
        Project cannot be resolved
        Project cannot be resolved
        BuildLogger cannot be resolved (or is not a valid return type) for
the method createLogger
        BuildLogger cannot be resolved or is not a type
        BuildLogger cannot be resolved or is not a type
        Project cannot be resolved
        BuildException cannot be resolved or is not a type
        DefaultLogger cannot be resolved or is not a type
        Project cannot be resolved (or is not a valid type) for the
argument project of the method fireBuildStarted
        BuildEvent cannot be resolved or is not a type
        BuildEvent cannot be resolved or is not a type
        BuildListener cannot be resolved or is not a type
        BuildListener cannot be resolved or is not a type
        Project cannot be resolved (or is not a valid type) for the
argument project of the method fireBuildFinished
        Project cannot be resolved (or is not a valid type) for the
argument project of the method logMessage
        Project cannot be resolved or is not a type
        BuildEvent cannot be resolved or is not a type
        BuildEvent cannot be resolved or is not a type
        BuildListener cannot be resolved or is not a type
        BuildListener cannot be resolved or is not a type
        BuildException cannot be resolved (or is not an exception type)
for the method getAntVersion
        Main cannot be resolved or is not a type
        BuildException cannot be resolved or is not a type
        BuildException cannot be resolved or is not a type
        Project cannot be resolved
        Project cannot be resolved
        Project cannot be resolved
        Project cannot be resolved
        Project cannot be resolved (or is not a valid type) for the
argument project of the method printHelp
        Project cannot be resolved
        Project cannot be resolved
        Project cannot be resolved

        at java.lang.reflect.Constructor.newInstance(Native Method)
        at
org.eclipse.ant.internal.core.ant.InternalAntRunner.<init>(InternalAntRunner.java:111)

        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:237)
        at org.eclipse.ant.core.AntRunner.run(AntRunner.java:120)
        at
org.eclipse.ui.externaltools.internal.core.AntFileRunner.execute(AntFileRunner.java:54)

        at
org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.executeRunner(DefaultRunnerContext.java:320)

        at
org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.run(DefaultRunnerContext.java:370)

        at
org.eclipse.ui.externaltools.internal.ui.AntLaunchWizard$1.run(AntLaunchWizard.java:116)

        at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)



_______________________________________________
platform-ant-dev mailing list
platform-ant-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ant-dev






Back to the top