You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Alex Karasulu <ao...@bellsouth.net> on 2004/09/24 10:08:29 UTC

[idea plugin] trying to muck with plugin to use antlr sources

Hiya,

I've been playing with the idea plugin to see if I can get it to include
the antlr generated path.  Here's the change I made by the way does not
work:

(cvs diff inside maven-plugins/idea in trunk)

Index: src/plugin-resources/templates/v4/module.jelly
===================================================================
RCS file:
/home/cvspublic/maven-plugins/idea/src/plugin-resources/templates/v4/module.jelly,v
retrieving revision 1.7
diff -r1.7 module.jelly
123a124,127
>         <j:if test="${antlrSourcesPresent}">
>           <maven:makeRelativePath var="value" basedir="${basedir}"
path="${maven.antlr.target.dir}" separator="/" />
>           <sourceFolder url="file://$$MODULE_DIR$$/${value}"
isTestSource="true"/>
>         </j:if>

Now this does not work because I did not know if there was an equivalent
to sourcesPresent for antlr.  I made up 'antlrSourcesPresent' above as a
place holder.  Was wondering what I should use here instead or does no
equivalent property exist for antlr sources?

Thanks,
Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [idea plugin] trying to muck with plugin to use antlr sources

Posted by Alex Karasulu <ao...@bellsouth.net>.
Hi Brett,

On Fri, 2004-09-24 at 06:05, Brett Porter wrote:
> I think it was David Jencks that attached a patch to MPIDEA-10 today for 
> generated sources. I haven't looked at it yet, but if you want to check 
> it out and see if it does the job for you, let me know. I'll probably 
> apply it in the next few days once I've had a chance to look anyway.

Yeah looks like he's got a nice generic way for enabling generated
source directories to be included like so:

+        <j:forEach var="genSource"
items="${context.getVariable('maven.idea.generated.source')}">
+          <sourceFolder url="file://$$MODULE_DIR$$/target/${genSource}" isTestSource="false"/>
+        </j:forEach>

I think it will work for me when specifing this list of generated idea
source directories.  Also this patch fixes another annoying issue
altogether having to do with how the idea plugin presumes all maven
projects in the groupId are automatically incuded as modules rather than
as jar deps.

Overall this is an awesome patch.  Thanks David!

Brett I'd love to see this applied whenever you get the chance.  

<snip/>

Thanks,
Alex

> Alex Karasulu wrote:
> 
> >Hiya,
> >
> >I've been playing with the idea plugin to see if I can get it to include
> >the antlr generated path.  Here's the change I made by the way does not
> >work:
> >
> >(cvs diff inside maven-plugins/idea in trunk)
> >
> >Index: src/plugin-resources/templates/v4/module.jelly
> >===================================================================
> >RCS file:
> >/home/cvspublic/maven-plugins/idea/src/plugin-resources/templates/v4/module.jelly,v
> >retrieving revision 1.7
> >diff -r1.7 module.jelly
> >123a124,127
> >  
> >
> >>        <j:if test="${antlrSourcesPresent}">
> >>          <maven:makeRelativePath var="value" basedir="${basedir}"
> >>    
> >>
> >path="${maven.antlr.target.dir}" separator="/" />
> >  
> >
> >>          <sourceFolder url="file://$$MODULE_DIR$$/${value}"
> >>    
> >>
> >isTestSource="true"/>
> >  
> >
> >>        </j:if>
> >>    
> >>
> >
> >Now this does not work because I did not know if there was an equivalent
> >to sourcesPresent for antlr.  I made up 'antlrSourcesPresent' above as a
> >place holder.  Was wondering what I should use here instead or does no
> >equivalent property exist for antlr sources?
> >
> >Thanks,
> >Alex
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> >
> >
> >  
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [idea plugin] trying to muck with plugin to use antlr sources

Posted by Brett Porter <br...@apache.org>.
I think it was David Jencks that attached a patch to MPIDEA-10 today for 
generated sources. I haven't looked at it yet, but if you want to check 
it out and see if it does the job for you, let me know. I'll probably 
apply it in the next few days once I've had a chance to look anyway.

If not, we can take a closer look - we'd need to review the antlr code 
to figure how it determines if sources are present and whether it sets a 
variable, but I would definitely NOT be adding that to the idea plugin 
(that's a nasty cross dependency...)

It would be much better for the idea plugin to parse the 
maven.compile.src.set instead.

- Brett

Alex Karasulu wrote:

>Hiya,
>
>I've been playing with the idea plugin to see if I can get it to include
>the antlr generated path.  Here's the change I made by the way does not
>work:
>
>(cvs diff inside maven-plugins/idea in trunk)
>
>Index: src/plugin-resources/templates/v4/module.jelly
>===================================================================
>RCS file:
>/home/cvspublic/maven-plugins/idea/src/plugin-resources/templates/v4/module.jelly,v
>retrieving revision 1.7
>diff -r1.7 module.jelly
>123a124,127
>  
>
>>        <j:if test="${antlrSourcesPresent}">
>>          <maven:makeRelativePath var="value" basedir="${basedir}"
>>    
>>
>path="${maven.antlr.target.dir}" separator="/" />
>  
>
>>          <sourceFolder url="file://$$MODULE_DIR$$/${value}"
>>    
>>
>isTestSource="true"/>
>  
>
>>        </j:if>
>>    
>>
>
>Now this does not work because I did not know if there was an equivalent
>to sourcesPresent for antlr.  I made up 'antlrSourcesPresent' above as a
>place holder.  Was wondering what I should use here instead or does no
>equivalent property exist for antlr sources?
>
>Thanks,
>Alex
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org
>
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [idea plugin] trying to muck with plugin to use antlr sources

Posted by David Jencks <dj...@gluecode.com>.
I don't think there is a future in specific properties for each  
plugin:-)  What happens when I write another one?  I'm not going to  
remember to update the idea plugin...

My solution for idea/xmlbeans is to include an additional property

maven.idea.generated.source=xmlbeans

which adds target/xmlbeans to the idea sources.

This is similar to what the eclipse plugin does.

See http://jira.codehaus.org/browse/MPIDEA-10

thanks
david jencks

On Sep 24, 2004, at 1:08 AM, Alex Karasulu wrote:

> Hiya,
>
> I've been playing with the idea plugin to see if I can get it to  
> include
> the antlr generated path.  Here's the change I made by the way does not
> work:
>
> (cvs diff inside maven-plugins/idea in trunk)
>
> Index: src/plugin-resources/templates/v4/module.jelly
> ===================================================================
> RCS file:
> /home/cvspublic/maven-plugins/idea/src/plugin-resources/templates/v4/ 
> module.jelly,v
> retrieving revision 1.7
> diff -r1.7 module.jelly
> 123a124,127
>>         <j:if test="${antlrSourcesPresent}">
>>           <maven:makeRelativePath var="value" basedir="${basedir}"
> path="${maven.antlr.target.dir}" separator="/" />
>>           <sourceFolder url="file://$$MODULE_DIR$$/${value}"
> isTestSource="true"/>
>>         </j:if>
>
> Now this does not work because I did not know if there was an  
> equivalent
> to sourcesPresent for antlr.  I made up 'antlrSourcesPresent' above as  
> a
> place holder.  Was wondering what I should use here instead or does no
> equivalent property exist for antlr sources?
>
> Thanks,
> Alex
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org