You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Robin Chesterman <ro...@gmail.com> on 2012/12/23 13:30:36 UTC

Build error

Hi everyone, I'm just starting out with Mahout - just bought Mahout in
Action!

I'm using IntelliJ idea and got the latest Mahout from git, but it comes up
with about a hundred or so errors when I build the project (exclusively in
the 'math' section), such as:

import org.apache.mahout.math.set.OpenIntHashSet;

"Cannot resolve symbol OpenIntHashSet"

Similar problems exist for DoubleArrayList, DoubleDoubleProcedure, and
others.


Sure enough, none of these classes exist. I must be making a basic error...


Thanks,


Robin

Re: Build error

Posted by Robin Chesterman <ro...@gmail.com>.
Thanks for shedding some light on this. I tried with NetBeans and had no trouble (once I skipped tests) and then when I opened in subsequently in IntelliJ, it worked as well. I guess IJ does struggle with the first build as you describe. Cheers.



On 24 Dec 2012, at 04:48, Ted Dunning <te...@gmail.com> wrote:

> I didn't mean to give the impression that IntelliJ doesn't work.  It does.
> 
> The issue is that it doesn't understand the custom source generation plugin
> that Mahout math uses.  That means that you have to do the first build
> using maven.  From there, you should be good.  You may need to regenerate
> code if you change the templates (very, very rare).
> 
> On Sun, Dec 23, 2012 at 7:41 PM, Marty Kube <
> martykube@beavercreekconsulting.com> wrote:
> 
>> I've been using eclipse for many years and gave up using it on pom based
>> projects for the same issues you raise.  IMHO NetBeans works really well
>> for maven projects.
>> 
>> On 12/23/2012 04:42 PM, Ted Dunning wrote:
>> 
>>> To amplify others comments, make sure that when you open the Mahout
>>> project, you actually just open the pom.xml file at the top-level.  It is
>>> a
>>> bad idea to try to do anything like import existing sources because a
>>> significant amount of the code is generate which would make a naively
>>> configured. compilation break.
>>> 
>>> IntelliJ is smart enough to treat a pom as a project and will mostly do
>>> the
>>> right thing.  One thing that it tends not to do is to actually generate
>>> the
>>> code in the math library.  I would recommend doing one build using maven
>>> before depending completely on IntelliJ's internal build.  Using
>>> -DskipTests can save a lot of time on that build.
>>> 
>>> On Sun, Dec 23, 2012 at 4:30 AM, Robin Chesterman <
>>> robinchesterman@gmail.com
>>> 
>>>> wrote:
>>>> Hi everyone, I'm just starting out with Mahout - just bought Mahout in
>>>> Action!
>>>> 
>>>> I'm using IntelliJ idea and got the latest Mahout from git, but it comes
>>>> up
>>>> with about a hundred or so errors when I build the project (exclusively
>>>> in
>>>> the 'math' section), such as:
>>>> 
>>>> import org.apache.mahout.math.set.**OpenIntHashSet;
>>>> 
>>>> "Cannot resolve symbol OpenIntHashSet"
>>>> 
>>>> Similar problems exist for DoubleArrayList, DoubleDoubleProcedure, and
>>>> others.
>>>> 
>>>> 
>>>> Sure enough, none of these classes exist. I must be making a basic
>>>> error...
>>>> 
>>>> 
>>>> Thanks,
>>>> 
>>>> 
>>>> Robin
>>>> 
>>>> 
>> 

Re: Build error

Posted by Ted Dunning <te...@gmail.com>.
I didn't mean to give the impression that IntelliJ doesn't work.  It does.

The issue is that it doesn't understand the custom source generation plugin
that Mahout math uses.  That means that you have to do the first build
using maven.  From there, you should be good.  You may need to regenerate
code if you change the templates (very, very rare).

On Sun, Dec 23, 2012 at 7:41 PM, Marty Kube <
martykube@beavercreekconsulting.com> wrote:

> I've been using eclipse for many years and gave up using it on pom based
> projects for the same issues you raise.  IMHO NetBeans works really well
> for maven projects.
>
> On 12/23/2012 04:42 PM, Ted Dunning wrote:
>
>> To amplify others comments, make sure that when you open the Mahout
>> project, you actually just open the pom.xml file at the top-level.  It is
>> a
>> bad idea to try to do anything like import existing sources because a
>> significant amount of the code is generate which would make a naively
>> configured. compilation break.
>>
>> IntelliJ is smart enough to treat a pom as a project and will mostly do
>> the
>> right thing.  One thing that it tends not to do is to actually generate
>> the
>> code in the math library.  I would recommend doing one build using maven
>> before depending completely on IntelliJ's internal build.  Using
>> -DskipTests can save a lot of time on that build.
>>
>> On Sun, Dec 23, 2012 at 4:30 AM, Robin Chesterman <
>> robinchesterman@gmail.com
>>
>>> wrote:
>>> Hi everyone, I'm just starting out with Mahout - just bought Mahout in
>>> Action!
>>>
>>> I'm using IntelliJ idea and got the latest Mahout from git, but it comes
>>> up
>>> with about a hundred or so errors when I build the project (exclusively
>>> in
>>> the 'math' section), such as:
>>>
>>> import org.apache.mahout.math.set.**OpenIntHashSet;
>>>
>>> "Cannot resolve symbol OpenIntHashSet"
>>>
>>> Similar problems exist for DoubleArrayList, DoubleDoubleProcedure, and
>>> others.
>>>
>>>
>>> Sure enough, none of these classes exist. I must be making a basic
>>> error...
>>>
>>>
>>> Thanks,
>>>
>>>
>>> Robin
>>>
>>>
>

Re: Build error

Posted by Marty Kube <ma...@beavercreekconsulting.com>.
I've been using eclipse for many years and gave up using it on pom based 
projects for the same issues you raise.  IMHO NetBeans works really well 
for maven projects.

On 12/23/2012 04:42 PM, Ted Dunning wrote:
> To amplify others comments, make sure that when you open the Mahout
> project, you actually just open the pom.xml file at the top-level.  It is a
> bad idea to try to do anything like import existing sources because a
> significant amount of the code is generate which would make a naively
> configured. compilation break.
>
> IntelliJ is smart enough to treat a pom as a project and will mostly do the
> right thing.  One thing that it tends not to do is to actually generate the
> code in the math library.  I would recommend doing one build using maven
> before depending completely on IntelliJ's internal build.  Using
> -DskipTests can save a lot of time on that build.
>
> On Sun, Dec 23, 2012 at 4:30 AM, Robin Chesterman <robinchesterman@gmail.com
>> wrote:
>> Hi everyone, I'm just starting out with Mahout - just bought Mahout in
>> Action!
>>
>> I'm using IntelliJ idea and got the latest Mahout from git, but it comes up
>> with about a hundred or so errors when I build the project (exclusively in
>> the 'math' section), such as:
>>
>> import org.apache.mahout.math.set.OpenIntHashSet;
>>
>> "Cannot resolve symbol OpenIntHashSet"
>>
>> Similar problems exist for DoubleArrayList, DoubleDoubleProcedure, and
>> others.
>>
>>
>> Sure enough, none of these classes exist. I must be making a basic error...
>>
>>
>> Thanks,
>>
>>
>> Robin
>>


Re: Build error

Posted by Ted Dunning <te...@gmail.com>.
To amplify others comments, make sure that when you open the Mahout
project, you actually just open the pom.xml file at the top-level.  It is a
bad idea to try to do anything like import existing sources because a
significant amount of the code is generate which would make a naively
configured. compilation break.

IntelliJ is smart enough to treat a pom as a project and will mostly do the
right thing.  One thing that it tends not to do is to actually generate the
code in the math library.  I would recommend doing one build using maven
before depending completely on IntelliJ's internal build.  Using
-DskipTests can save a lot of time on that build.

On Sun, Dec 23, 2012 at 4:30 AM, Robin Chesterman <robinchesterman@gmail.com
> wrote:

> Hi everyone, I'm just starting out with Mahout - just bought Mahout in
> Action!
>
> I'm using IntelliJ idea and got the latest Mahout from git, but it comes up
> with about a hundred or so errors when I build the project (exclusively in
> the 'math' section), such as:
>
> import org.apache.mahout.math.set.OpenIntHashSet;
>
> "Cannot resolve symbol OpenIntHashSet"
>
> Similar problems exist for DoubleArrayList, DoubleDoubleProcedure, and
> others.
>
>
> Sure enough, none of these classes exist. I must be making a basic error...
>
>
> Thanks,
>
>
> Robin
>

Re: Build error

Posted by Sean Owen <sr...@gmail.com>.
You need to set up your project from the Maven pom.xml files or replicate
most of the config by hand. Otherwise it does not know how these modules
relate.
On Dec 23, 2012 12:31 PM, "Robin Chesterman" <ro...@gmail.com>
wrote:

> Hi everyone, I'm just starting out with Mahout - just bought Mahout in
> Action!
>
> I'm using IntelliJ idea and got the latest Mahout from git, but it comes up
> with about a hundred or so errors when I build the project (exclusively in
> the 'math' section), such as:
>
> import org.apache.mahout.math.set.OpenIntHashSet;
>
> "Cannot resolve symbol OpenIntHashSet"
>
> Similar problems exist for DoubleArrayList, DoubleDoubleProcedure, and
> others.
>
>
> Sure enough, none of these classes exist. I must be making a basic error...
>
>
> Thanks,
>
>
> Robin
>

Re: Build error

Posted by Alex Ott <al...@gmail.com>.
If you're playing with examples from Mahout in Action, please look to
this: http://alexott.blogspot.de/2012/07/getting-started-with-examples-from.html,
although it was written for Eclipse, but it basic things should work
for IDEA

On Sun, Dec 23, 2012 at 1:30 PM, Robin Chesterman
<ro...@gmail.com> wrote:
> Hi everyone, I'm just starting out with Mahout - just bought Mahout in
> Action!
>
> I'm using IntelliJ idea and got the latest Mahout from git, but it comes up
> with about a hundred or so errors when I build the project (exclusively in
> the 'math' section), such as:
>
> import org.apache.mahout.math.set.OpenIntHashSet;
>
> "Cannot resolve symbol OpenIntHashSet"
>
> Similar problems exist for DoubleArrayList, DoubleDoubleProcedure, and
> others.
>
>
> Sure enough, none of these classes exist. I must be making a basic error...
>
>
> Thanks,
>
>
> Robin



-- 
With best wishes,                    Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)
Skype: alex.ott