RE: Magic Eclipse target

"David Leangen" <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.user
Message-ID <[email protected]>
Nice!

I'll give it a go.




> -----Original Message-----
> From: Cameron Taggart [mailto:[email protected]]
> Sent: July 22, 2004 15:40
> To: Avalon framework users
> Subject: Re: Magic Eclipse target
> 
> 
> I just wrote a simple EclipseTask that will suit my needs for a couple 
> of projects I'm working on.  I based it on ArtifactTask, as Steve 
> suggested.  Attached is the source file.  Output from the task looks 
> like this:
> 
> Eclipse .project
> 
> <?xml version="1.0"?>
> <projectDescription>
>   <name>ant-tasks</name>
>   <comment></comment>
>   <projects></projects>
>   <buildSpec>
>     <buildCommand>
>       <name>org.eclipse.jdt.core.javabuilder</name>
>       <arguments></arguments>
>     </buildCommand>
>   </buildSpec>
>   <natures><nature>org.eclipse.jdt.core.javanature</nature></natures>
> </projectDescription>
> 
> Eclipse .classpath
> 
> <?xml version="1.0"?>
> <classpath>
>   <classpathentry kind="con" 
> path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
>   <classpathentry kind="src" path="src/main"/>
>   <classpathentry kind="output" path="target/classes"/>
>   <classpathentry kind="src" path="src/test" 
> output="target/test-classes"/>
>   <classpathentry kind="var" path="MAGIC_CACHE/ant/jars/ant-1.6.2.jar"/>
>   <classpathentry kind="var" 
> path="MAGIC_CACHE/ant/jars/ant-nodeps-1.6.2.jar"/>
>   <classpathentry kind="var" 
> path="MAGIC_CACHE/avalon/tools/jars/avalon-tools-magic.jar"/>
> </classpath>
> 
> The only dynamic stuff right now is the project name and the jars in the 
> magic cache.
> 
> -Cameron
> 
> 
> 
> Cameron Taggart wrote:
> 
> > David, I too am in need of an Eclipse plugin for Magic, so I'm looking 
> > at the stuff Steve referenced.  I modified a ".classpath" file that 
> > was produced by Maven's Eclipse plugin, so that my current project 
> > that I'm building with Magic will use the jars in Magic's cache.  The 
> > Magic Eclipse plugin/task will need to create a file similar to this.
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <classpath>
> >  <classpathentry kind="con" 
> > path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> >  <classpathentry kind="src" path="src/main"/>
> >  <classpathentry kind="output" path="target/classes"/>
> >  <classpathentry kind="src" path="src/test" 
> > output="target/test-classes"/>
> >    <classpathentry kind="var" 
> > path="MAGIC_CACHE/junit/jars/junit-3.8.1.jar"/>
> >  <classpathentry kind="var" 
> > path="MAGIC_CACHE/log4j/jars/log4j-1.2.8.jar"/>
> >  <classpathentry kind="var" 
> > path="MAGIC_CACHE/jaxme/jars/jaxmejs-0.2.jar"/>
> >  <classpathentry kind="var" 
> > path="MAGIC_CACHE/jibx/jars/jibx-run-beta3c-1.0.jar"/>
> >  <classpathentry kind="var" 
> > path="MAGIC_CACHE/jibx/jars/jibx-bind-beta3c-1.0.jar"/>
> >  <classpathentry kind="var" 
> > path="MAGIC_CACHE/jibx/jars/xpp3-beta3c-1.0.jar"/>
> >  <classpathentry kind="var" path="MAGIC_CACHE/ant/jars/ant-1.6.2.jar"/>
> >  <classpathentry kind="var" 
> > path="MAGIC_CACHE/ant/jars/ant-nodeps-1.6.2.jar"/>
> > </classpath>
> >
> > You can modify your ".classpath" file manually until a plugin is 
> > created.  Just refresh your project when your done (no need to close 
> > Eclipse).  You will also need to create a classpath variable tnamed 
> > "MAGIC_CACHE" to your cache directory.  For example: "C:\Documents and 
> > Settings\Owner\.magic\main".  Eclipse > Window > Preferences > Java > 
> > Build Path > Classpath variables
> >
> > Cameron
> >
> > Stephen McConnell wrote:
> >
> >> David Leangen wrote:
> >>
> >>> Does there happen to be an "Eclipse" target for magic? I'm playing 
> >>> around
> >>> with the tutorials now and I'd like to import a project into 
> Eclipse as
> >>> easily as possible.
> >>
> >>
> >>
> >> Nope - nothing like that.
> >>
> >> You may want to take a look at the meta plugin as an example of 
> >> creating a new plugin, and then look at the magic core tasks for 
> >> ArtifactTask and BlockTask for examples of how dependency information 
> >> can be used to construct xml classpath descriptors.
> >>
> >> Steve.
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.