You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Crossley, Jim" <Jc...@tandbergtv.com> on 2006/11/28 02:54:14 UTC

Generating source from a plugin

I'm in the midst of converting some fairly complex ant-based J2EE
projects to Maven2.  One thing I need to do is generate some Java source
from some Flavor source files (http://flavor.sf.net) in the
'generate-sources' phase, so a Maven plugin for doing so seems the right
course.

But here's the rub:  the Flavor compiler -- the thing that turns *.fl
files into *.java -- doesn't have a Java interface.  It's a C++
executable.  So I have two questions...

1) Can I distribute the Flavor executable with my plugin?  I'm pretty
sure the license allows it, but I don't understand the Maven mechanism
for distributing plugin resources.
2) How do I reference the location of the exe (in order to invoke it)
from the plugin when the generate-sources phase fires?

Thanks so much!
Jim

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


Re: Delay in posting

Posted by Brett Porter <br...@apache.org>.
moderation. I only just let this one through. I'll try and remember  
to add you to the allow list next time, but you can also post from  
the subscribed addres to get it through straight away

On 29/11/2006, at 1:58 AM, Mark Donszelmann wrote:

> Hi
>
> I just wondered why there is a ~5 hour delay between posting my  
> message to this list and
> its appearance? Is the list that big, or is this on purpose to  
> prevent spam?
>
> This was posted at 7:00 AM in California.
>
> Regards
> Mark Donszelmann
>
>
> ---------------------------------------------------------------------
> 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


Delay in posting

Posted by Mark Donszelmann <Ma...@slac.stanford.edu>.
Hi

I just wondered why there is a ~5 hour delay between posting my  
message to this list and
its appearance? Is the list that big, or is this on purpose to  
prevent spam?

This was posted at 7:00 AM in California.

Regards
Mark Donszelmann


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


Re: Archiva: 507 Insufficient Storage

Posted by Brett Porter <br...@apache.org>.
Are you deploying to a windows machine? maybe the path is too long?

You might like to post to archiva-users in future.

Cheers,
Brett


On 29/11/2006, at 12:16 AM, Aaron.Digulla@Globus.ch wrote:

> Hello,
>
> Every now and then, I get the error " 507 Insufficient Storage"  
> during mvn
> deploy. Is this a known error?
>
> I'd like to debug this. Where in the server code is this error  
> generated?
>
> [INFO] Uploading repository metadata for: 'artifact
> statcvs:maven-statcvs-plugin'
> Connecting to http://.../archiva/repository/...
> 28.11.2006 14:13:41 org.apache.commons.httpclient.HttpMethodBase
> processRedirectResponse
> INFO: Redirect requested but followRedirects is disabled
> [INFO]
> ---------------------------------------------------------------------- 
> --
> [ERROR] BUILD ERROR
> [INFO]
> ---------------------------------------------------------------------- 
> --
> [INFO] Error installing artifact's metadata: Error while deploying
> metadata: Failed to transfer file:
> http://.../archiva/repository/.../statcvs/maven-statcvs-plugin/ 
> maven-metadata.xml.
> Return code is: 507 Insufficient Storage
>
> Regards,
>
> -- 
> Aaron Digulla
>
>
> ---------------------------------------------------------------------
> 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


Archiva: 507 Insufficient Storage

Posted by Aa...@Globus.ch.
Hello,

Every now and then, I get the error " 507 Insufficient Storage" during mvn 
deploy. Is this a known error?

I'd like to debug this. Where in the server code is this error generated?

[INFO] Uploading repository metadata for: 'artifact 
statcvs:maven-statcvs-plugin'
Connecting to http://.../archiva/repository/...
28.11.2006 14:13:41 org.apache.commons.httpclient.HttpMethodBase 
processRedirectResponse
INFO: Redirect requested but followRedirects is disabled
[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
[INFO] Error installing artifact's metadata: Error while deploying 
metadata: Failed to transfer file: 
http://.../archiva/repository/.../statcvs/maven-statcvs-plugin/maven-metadata.xml. 
Return code is: 507 Insufficient Storage

Regards,

-- 
Aaron Digulla


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


RE: Generating source from a plugin

Posted by "Crossley, Jim" <Jc...@tandbergtv.com>.
Mark, these appear to be great examples of exactly what I'm looking to
do.

Thanks to both you and Jason for quick, helpful advice.  :-)
Jim

-----Original Message-----
From: Mark Donszelmann [mailto:Mark.Donszelmann@slac.stanford.edu] 
Sent: Tuesday, November 28, 2006 1:14 AM
To: Maven Developers List
Subject: Re: Generating source from a plugin

Hi

we use the FreeHEP-NAR-Plugin
(http://java.freehep.org/freehep-nar-plugin)
to wrap the SWIG (http://www.swig.org) compiler and make it usable (for
java) in maven with the FreeHEP-SWIG-Plugin
(http://java.freehep.org/freehep-swig-plugin).

The SWIG plugin in collaboration with the NAR plugin handles the
download of a platform dependent swig binary, unpacks it in maven's
local repository, and calls the executable in te generate-sources phase.

For configuration you can look at our G4Java project
(http://java.freehep.org/sandbox/G4Java)
which needs SWIG to create a Java wrapper around a C++ program.

Regards
Mark Donszelmann
Stanford Linear Accelerator Center

----- Original Message -----
From: "Jason Dillon" <ja...@planet57.com>
To: "Maven Developers List" <de...@maven.apache.org>
Sent: Monday, November 27, 2006 6:05 PM
Subject: Re: Generating source from a plugin


> You could include the compiler in the plugin's jar, then extract it
into 
> /tmp (or something) to execute it.  But, unless you include a  bunch
of 
> platform binaries its not going to be very portable.  Easier  to
expect 
> the compiler to be on the system search path and execute  it... or
expose 
> the location of the compiler as configuration (or both).
>
> --jason
>
>
> On Nov 27, 2006, at 5:54 PM, Crossley, Jim wrote:
>
>> I'm in the midst of converting some fairly complex ant-based J2EE
>> projects to Maven2.  One thing I need to do is generate some Java
source
>> from some Flavor source files (http://flavor.sf.net) in the
>> 'generate-sources' phase, so a Maven plugin for doing so seems the
right
>> course.
>>
>> But here's the rub:  the Flavor compiler -- the thing that turns *.fl
>> files into *.java -- doesn't have a Java interface.  It's a C++
>> executable.  So I have two questions...
>>
>> 1) Can I distribute the Flavor executable with my plugin?  I'm pretty
>> sure the license allows it, but I don't understand the Maven
mechanism
>> for distributing plugin resources.
>> 2) How do I reference the location of the exe (in order to invoke it)
>> from the plugin when the generate-sources phase fires?
>>
>> Thanks so much!
>> Jim
>>
>> ---------------------------------------------------------------------
>> 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

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


Re: Generating source from a plugin

Posted by Mark Donszelmann <Ma...@slac.stanford.edu>.
Hi

we use the FreeHEP-NAR-Plugin (http://java.freehep.org/freehep-nar-plugin)
to wrap the SWIG (http://www.swig.org) compiler and make it usable (for
java) in maven with the FreeHEP-SWIG-Plugin 
(http://java.freehep.org/freehep-swig-plugin).

The SWIG plugin in collaboration with the NAR plugin handles the download
of a platform dependent swig binary, unpacks it in maven's local repository, 
and
calls the executable in te generate-sources phase.

For configuration you can look at our G4Java project 
(http://java.freehep.org/sandbox/G4Java)
which needs SWIG to create a Java wrapper around a C++ program.

Regards
Mark Donszelmann
Stanford Linear Accelerator Center

----- Original Message ----- 
From: "Jason Dillon" <ja...@planet57.com>
To: "Maven Developers List" <de...@maven.apache.org>
Sent: Monday, November 27, 2006 6:05 PM
Subject: Re: Generating source from a plugin


> You could include the compiler in the plugin's jar, then extract it  into 
> /tmp (or something) to execute it.  But, unless you include a  bunch of 
> platform binaries its not going to be very portable.  Easier  to expect 
> the compiler to be on the system search path and execute  it... or expose 
> the location of the compiler as configuration (or both).
>
> --jason
>
>
> On Nov 27, 2006, at 5:54 PM, Crossley, Jim wrote:
>
>> I'm in the midst of converting some fairly complex ant-based J2EE
>> projects to Maven2.  One thing I need to do is generate some Java  source
>> from some Flavor source files (http://flavor.sf.net) in the
>> 'generate-sources' phase, so a Maven plugin for doing so seems the  right
>> course.
>>
>> But here's the rub:  the Flavor compiler -- the thing that turns *.fl
>> files into *.java -- doesn't have a Java interface.  It's a C++
>> executable.  So I have two questions...
>>
>> 1) Can I distribute the Flavor executable with my plugin?  I'm pretty
>> sure the license allows it, but I don't understand the Maven mechanism
>> for distributing plugin resources.
>> 2) How do I reference the location of the exe (in order to invoke it)
>> from the plugin when the generate-sources phase fires?
>>
>> Thanks so much!
>> Jim
>>
>> ---------------------------------------------------------------------
>> 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: Generating source from a plugin

Posted by Jason Dillon <ja...@planet57.com>.
You could include the compiler in the plugin's jar, then extract it  
into /tmp (or something) to execute it.  But, unless you include a  
bunch of platform binaries its not going to be very portable.  Easier  
to expect the compiler to be on the system search path and execute  
it... or expose the location of the compiler as configuration (or both).

--jason


On Nov 27, 2006, at 5:54 PM, Crossley, Jim wrote:

> I'm in the midst of converting some fairly complex ant-based J2EE
> projects to Maven2.  One thing I need to do is generate some Java  
> source
> from some Flavor source files (http://flavor.sf.net) in the
> 'generate-sources' phase, so a Maven plugin for doing so seems the  
> right
> course.
>
> But here's the rub:  the Flavor compiler -- the thing that turns *.fl
> files into *.java -- doesn't have a Java interface.  It's a C++
> executable.  So I have two questions...
>
> 1) Can I distribute the Flavor executable with my plugin?  I'm pretty
> sure the license allows it, but I don't understand the Maven mechanism
> for distributing plugin resources.
> 2) How do I reference the location of the exe (in order to invoke it)
> from the plugin when the generate-sources phase fires?
>
> Thanks so much!
> Jim
>
> ---------------------------------------------------------------------
> 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