You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nelson Arapé <na...@ica.luz.ve> on 2003/06/29 00:07:07 UTC
best practice for idl source files
Hello to all
I am new to the whole maven system. I am working in a small research project
in my University. That project utilizes CORBA, so we have idl files that
require to be compiled with a IDL compiler (JacORB).
We prefer separate source directory for our code and the stubs generated by
the IDL compiler. Actually we have something like this:
+- src
+- java
+- idlgenerated
+- test
Apparently maven don't support this, even i read some posting saying that
several sourcepath are evil!.
So the question is: what would be the best practice for this type of
environment?
Thanks in Advance
Nelson Arapé
PS: Sorry for my English, it is not my native language
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: best practice for idl source files
Posted by Nelson Arapé <na...@ica.luz.ve>.
Thanks again Jason and happy maven :)
Nelson Arapé
On Monday 30 June 2003 16:00, Jason van Zyl wrote:
> On Mon, 2003-06-30 at 15:56, Nelson Arapé wrote:
> > Thanks Jason
> >
> > Everything works ok, the only problem that I have is how do I use the
> > property set by the uptodate task?. In ant I used to write the unless
> > attribute in the task, but I did not find the equivalent maven
> > instruction
>
> You can use Jelly's core <j:if/> tag.
>
> <project
> xmlns:ant="jelly:ant"
> xmlns:j="jelly:core">
>
> <ant:uptodate property="idluptodate" ... />
>
> <j:if test="${!idluptodate}">
>
> <!-- Do your idl generation -->
>
> </j:if>
>
> <project>
>
> > Thanks
> > Nelson Arapé
> >
> > On Saturday 28 June 2003 20:40, Jason van Zyl wrote:
> >
> > *snip*
> >
> > > Take a look at the Antlr plugin but generally you keep your grammar, or
> > > IDL files in your case, in a separate directory and then your generated
> > > sources can be output to a directory like ${basedir/target/idlgenerated
> > > and then you can use the <addPath/> to hook in the sources. So you
> > > might have something like this:
> > >
> > > <preGoal name="java:compile">
> > >
> > > <!--
> > >
> > > Run JacORB performing any uptodate checks you want.
> > > Your IDL is stored in ${basedir}/src/idl and this process
> > > will output to ${basedir}/target/idlgenerated.
> > >
> > > -->
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: best practice for idl source files
Posted by Jason van Zyl <ja...@zenplex.com>.
On Mon, 2003-06-30 at 15:56, Nelson Arapé wrote:
> Thanks Jason
>
> Everything works ok, the only problem that I have is how do I use the property
> set by the uptodate task?. In ant I used to write the unless attribute in the
> task, but I did not find the equivalent maven instruction
You can use Jelly's core <j:if/> tag.
<project
xmlns:ant="jelly:ant"
xmlns:j="jelly:core">
<ant:uptodate property="idluptodate" ... />
<j:if test="${!idluptodate}">
<!-- Do your idl generation -->
</j:if>
<project>
> Thanks
> Nelson Arapé
>
> On Saturday 28 June 2003 20:40, Jason van Zyl wrote:
>
> *snip*
> >
> > Take a look at the Antlr plugin but generally you keep your grammar, or
> > IDL files in your case, in a separate directory and then your generated
> > sources can be output to a directory like ${basedir/target/idlgenerated
> > and then you can use the <addPath/> to hook in the sources. So you might
> > have something like this:
> >
> > <preGoal name="java:compile">
> >
> > <!--
> >
> > Run JacORB performing any uptodate checks you want.
> > Your IDL is stored in ${basedir}/src/idl and this process
> > will output to ${basedir}/target/idlgenerated.
> >
> > -->
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
--
jvz.
Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: best practice for idl source files
Posted by Nelson Arapé <na...@ica.luz.ve>.
Thanks Jason
Everything works ok, the only problem that I have is how do I use the property
set by the uptodate task?. In ant I used to write the unless attribute in the
task, but I did not find the equivalent maven instruction
Thanks
Nelson Arapé
On Saturday 28 June 2003 20:40, Jason van Zyl wrote:
*snip*
>
> Take a look at the Antlr plugin but generally you keep your grammar, or
> IDL files in your case, in a separate directory and then your generated
> sources can be output to a directory like ${basedir/target/idlgenerated
> and then you can use the <addPath/> to hook in the sources. So you might
> have something like this:
>
> <preGoal name="java:compile">
>
> <!--
>
> Run JacORB performing any uptodate checks you want.
> Your IDL is stored in ${basedir}/src/idl and this process
> will output to ${basedir}/target/idlgenerated.
>
> -->
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: best practice for idl source files
Posted by Jason van Zyl <ja...@zenplex.com>.
On Sat, 2003-06-28 at 18:07, Nelson Arapé wrote:
> Hello to all
>
> I am new to the whole maven system. I am working in a small research project
> in my University. That project utilizes CORBA, so we have idl files that
> require to be compiled with a IDL compiler (JacORB).
>
> We prefer separate source directory for our code and the stubs generated by
> the IDL compiler. Actually we have something like this:
>
> +- src
> +- java
> +- idlgenerated
> +- test
>
> Apparently maven don't support this, even i read some posting saying that
> several sourcepath are evil!.
>
> So the question is: what would be the best practice for this type of
> environment?
Take a look at the Antlr plugin but generally you keep your grammar, or
IDL files in your case, in a separate directory and then your generated
sources can be output to a directory like ${basedir/target/idlgenerated
and then you can use the <addPath/> to hook in the sources. So you might
have something like this:
<preGoal name="java:compile">
<!--
Run JacORB performing any uptodate checks you want.
Your IDL is stored in ${basedir}/src/idl and this process
will output to ${basedir}/target/idlgenerated.
-->
<ant:path
id="maven.idl.compile.src.set"
location="${basedir}/target/idlgenerated"/>
<maven:addPath
id="maven.compile.src.set"
refid="maven.idl.compile.src.set"/>
</preGoal>
So before the java:compile goal is attained the above preGoal will be
attained which will generate your sources from IDL, then you create a
path for your generated sources and then add that path to the standard
'maven.compile.src.set' path reference and they will be picked up and
compiled along with your non-generated sources.
> Thanks in Advance
>
> Nelson Arapé
>
> PS: Sorry for my English, it is not my native language
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
--
jvz.
Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org