Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Accumulo >> mail # dev >> Compiling Under Windows (unable to execute generate-thrift.sh)


+
David Medinets 2013-03-19, 23:40
+
Eric Newton 2013-03-20, 01:33
+
David Medinets 2013-03-20, 01:50
Copy link to this message
-
Re: Compiling Under Windows (unable to execute generate-thrift.sh)
I may have to disagree with your profile names, but your ideas seem sound :)

Actually, I'd rather see the entire plugin be lifted into the profile
(as 99% of the time when you're building, the thrift classes aren't
changing).

So, when someone actually does make changes to the thrift definitions,
they could run:

`mvn package -Pthrift`

to make the build operate as it does now. Activating no thrift profile
could just compile the checked-in thrift java classes. Likewise, why not
make a top-level `windows` profile, which changes the property as you
configured below.

So, in your case in Windows, you could:

`mvn package -Pthrift,windows`

Which would compile the generate the thrift classes using the batch script.

Thoughts? I'd be happy to help get us to that point if this is something
you would find useful.

On 3/19/2013 9:50 PM, David Medinets wrote:
> Using the coberatura profile in my VirtualBox was too slow. I'm in the
> mood to write unit tests so wanted to see how hard it would be to run
> the tests in Windows (i.e., not in my VirtualBox).
>
> I think I have found a solution to this issue. If anyone validates
> this approach, I'll create a JIRA ticket for trunk and commit this
> change:
>
> In the trace, core, and proxy modules, change pom.xml by adding two profiles:
>
>        <profile>
>            <id>thrift-not-windows</id>
>            <activation>
>                <os>
>                    <family>!windows</family>
>                </os>
>            </activation>
>            <properties>
>                <thift.executable>${basedir}/src/main/scripts/generate-thrift.sh</thift.executable>
>            </properties>
>        </profile>
>        <profile>
>            <id>thrift-windows</id>
>            <activation>
>                <os>
>                    <family>windows</family>
>                </os>
>            </activation>
>            <properties>
>                <thift.executable>${basedir}/src/main/scripts/generate-thrift.bat</thift.executable>
>            </properties>
>        </profile>
>
> Then change the generate-thrift section to be:
>
>              <configuration>
>                  <executable>${thift.executable}</executable>
>              </configuration>
>
> I created a very simple batch file:
>
>    rem generate-thrift.bat
>    rem
>    remo placeholder 'do-nothing' script.
>
> Comments?
>
> On Tue, Mar 19, 2013 at 9:33 PM, Eric Newton <[EMAIL PROTECTED]> wrote:
>> Just comment out the module in trace/pom.xml that attempts to run the
>> thrift compiler.
>>
>> I'm curious... why run windows?
>>
>> -Eric
>>
>>
>> On Tue, Mar 19, 2013 at 7:40 PM, David Medinets <[EMAIL PROTECTED]>wrote:
>>
>>> Out of curiosity I tried to compile Accumulo using Netbeans on Windows
>>> and run into the following error. Is it easy (possible) to avoid
>>> executing this script when using Windows?
>>>
>>> Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
>>> (generate-thrift) on project accumulo-trace: Command execution failed.
>>> Cannot run program
>>>
>>> "C:\Users\medined\Documents\NetBeansProjects\accumulo\trunk\trace\src\main\scripts\generate-thrift.sh"
>>> (in directory
>>> "C:\Users\medined\Documents\NetBeansProjects\accumulo\trunk\trace"):
>>> CreateProcess error=193, %1 is not a valid Win32 application -> [Help
>>> 1]
>>>
+
David Medinets 2013-03-20, 02:31
+
Josh Elser 2013-03-20, 10:00