ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruyn Bill" <Bru...@mcao.maricopa.gov>
Subject RE: [ABATOR] Source Target?
Date Tue, 04 Apr 2006 18:29:25 GMT
Excellent.  Thanks, Jeff.

	-----Original Message-----
	From: Jeff Butler [mailto:jeffgbutler@gmail.com] 
	Sent: Tuesday, April 04, 2006 10:48 AM
	To: user-java@ibatis.apache.org
	Subject: Re: [ABATOR] Source Target?
	
	
	You need to specify the project because it is possible to have
the Abator configuration in one project, and the generated objects in
different projects.  In my case, I usually put the DAOs and XML in a
"persistence" project, and the model objects in another project (usually
called something like "commons").  Then I can use the classpath to
enforce my application layering. 
	 
	Currently, Abator will add the generated artifacts to the first
source folder it finds in an Eclipse project.  If you have more than one
source folder in an Eclipse project, there is no way to specify which
one you want to use.  Sounds like a good enhancement to add - I'll take
a look. 
	 
	Jeff Butler
	
	 
	On 4/4/06, Bruyn Bill <Bruynb@mcao.maricopa.gov> wrote: 

		You know, I tried something like that (where drugfreeaz
is the Eclipse
		project I'm working on and so corresponds to a folder
name off the root 
		of my Eclipse workspace)
		
		<javaModelGenerator
	
targetPackage="gov.maricopa.mcao.drugfreeaz.treatment.domain"
		targetProject="/drugfreeaz/src/abator/java" />
		
		And got
		
		java.lang.IllegalArgumentException : Path for project
must have only one
		segment.
		at
org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:60)
		at
	
org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRo
		ot.java:134)
		at 
	
org.apache.ibatis.abator.ui.plugin.EclipseShellCallback.getJavaProject(E
		clipseShellCallback.java:152)
		at
	
org.apache.ibatis.abator.ui.plugin.EclipseShellCallback.getFolder(Eclips
		eShellCallback.java:183)
		at
	
org.apache.ibatis.abator.ui.plugin.EclipseShellCallback.getDirectory(Ecl
		ipseShellCallback.java:72)
		at
org.apache.ibatis.abator.api.Abator.generate(Abator.java:184)
		at
		org.apache.ibatis.abator.ui.actions.RunAbatorThread.run
(RunAbatorThread.
		java:79)
		at
	
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1721)
		at
	
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1741)
		at
	
org.apache.ibatis.abator.ui.actions.RunAbatorAction$AbatorRunner.run
(Run
		AbatorAction.java:149)
		at
	
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalCon
		text.java:113)
		
		In other words, I have to put in the name of the Eclipse
project I'm
		working on (seems like the plugin should be able to get
that 
		information, but maybe not) - or the name of some other
project (which
		is clearly not what I want) and Abator writes to the
first source folder
		created?
		
		
		FWIW, I'm using the Abator plugin for Eclipse v 0.6.2
with Eclipse 3.1.2
		
		
		
		> -----Original Message-----
		> From: Tony Qian [mailto:daqiqian2@aol.com]
		> Sent: Tuesday, April 04, 2006 9:34 AM
		> To: user-java@ibatis.apache.org
		> Subject: Re: [ABATOR] Source Target?
		>
		>
		>
		>
		> Christopher Lamey wrote on 4/4/2006, 12:24 PM:
		>
		>  > On Tue, 2006-04-04 at 09:13 -0700, Bruyn Bill
wrote: 
		>  >
		>  > > BTW, what exactly is that targetProject attribute
		> suppsed to do?  Don't  > > see any reference to that
in the
		> doc...  >  > targetProject is the target
directory/folder for 
		> each element.  I have  > my abator.xml setup so my
models go
		> in one dir, the sqlmaps in another,  > and the daos in
yet
		> another.  >  > Cheers,  > Chris  >
		>
		> something like: 
		>
		>   <javaModelGenerator
targetPackage="com.aol.easysaver.lib.data"
		>          targetProject="/home/AbatorOutput/src">
		>        <property name="enableSubPackages"
value="false" /> 
		>        <property name="trimStrings" value="true" />
		>      </javaModelGenerator>
		>
		>      <sqlMapGenerator
targetPackage="com.aol.easysaver.lib.xml"
		>          targetProject="/home/AbatorOutput/src">
		>        <property name="enableSubPackages"
value="false" />
		>      </sqlMapGenerator>
		>
		>      <daoGenerator type="IBATIS" 
		> targetPackage="com.aol.easysaver.lib.dao"
		>          targetProject="/home/AbatorOutput/src">
		>        <property name="enableSubPackages"
value="false" /> 
		>      </daoGenerator>
		>
		> hope it helps.
		>
		> Tony
		>
		>
		



Mime
View raw message