You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Oleg Ignatenko (JIRA)" <ji...@apache.org> on 2018/08/29 10:58:00 UTC

[jira] [Comment Edited] (IGNITE-9396) ML Examples: can't run examples, not enough dependencies in pom.xml

    [ https://issues.apache.org/jira/browse/IGNITE-9396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16596190#comment-16596190 ] 

Oleg Ignatenko edited comment on IGNITE-9396 at 8/29/18 10:57 AM:
------------------------------------------------------------------

I think I managed to reproduce the problem on my machine using IntelliJ Idea (Ultimate 2018.1).

For that, I first checked what is the documented way to build examples per [README.txt|https://github.com/apache/ignite/blob/master/examples/README.txt]: "to start running you simply need to import provided `pom.xml` file into your favourite IDE." In order to reproduce clean start I removed everything that was cashed in my local maven repo and invalidated Idea caches. After that I tried to build and launch an example and got compile errors similar to reported here (specific example tested was {{KMeansClusterizationExample}} but it probably doesn't really matter).

To find out how this can be corrected I decided to re-check how we build [examples at Teamcity|https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_Examples] because this way has proven to be clean and reliably working. Checking build settings at Teamcity it turned out that prior to building examples they run a maven (install) build for the Ignite. I tried the same on my machine and after I did the install build of Ignite as described in [DEVNOTES.txt|https://github.com/apache/ignite/blob/master/DEVNOTES.txt] examples successfully loaded and built in my IDE and started working as expected.

So far it looks like root issue is that README instructions in examples are somewhat incomplete, possibly these can be expanded as follows (text for adding is in _italic_ font):

{quote}...to start running you simply need to import provided `pom.xml` file into your favourite IDE.

_Note working with examples assumes that you have Ignite already installed. If you use source bundle this means it has built as described in DEVNOTES.txt in Ignite project root._{quote}

[~dmagda] kindly agreed to discuss these matters on Thursday.


was (Author: oignatenko):
I think I managed to reproduce the problem on my machine using IntelliJ Idea (Ultimate 2018.1).

For that, I first checked what is the documented way to build examples per {{README.txt}}: "to start running you simply need to import provided `pom.xml` file into your favourite IDE." In order to reproduce clean start I removed everything that was cashed in my local maven repo and invalidated Idea caches. After that I tried to build and launch an example and got compile errors similar to reported here (specific example tested was {{KMeansClusterizationExample}} but it probably doesn't really matter).

To find out how this can be corrected I decided to re-check how we build [examples at Teamcity|https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_Examples] because this way has proven to be clean and reliably working. Checking build settings at Teamcity it turned out that prior to building examples they run a maven (install) build for the Ignite. I tried the same on my machine and after I did the install build of Ignite as described in [DEVNOTES.txt|https://github.com/apache/ignite/blob/master/DEVNOTES.txt] examples successfully loaded and built in my IDE and started working as expected.

So far it looks like root issue is that README instructions in examples are somewhat incomplete, possibly these can be expanded as follows (text for adding is in _italic_ font):

{quote}...to start running you simply need to import provided `pom.xml` file into your favourite IDE.

_Note working with examples assumes that you have Ignite already installed. If you use source bundle this means it has built as described in DEVNOTES.txt in Ignite project root._{quote}

[~dmagda] kindly agreed to discuss these matters on Thursday.

> ML Examples: can't run examples, not enough dependencies in pom.xml
> -------------------------------------------------------------------
>
>                 Key: IGNITE-9396
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9396
>             Project: Ignite
>          Issue Type: Bug
>          Components: ml
>    Affects Versions: 2.7
>            Reporter: Stepan Pilschikov
>            Assignee: Oleg Ignatenko
>            Priority: Major
>
> Trying to run ml-examples and can't compile example project because several dependencies didn't added in pom.xml
> Execution:
>  Using JB IDEA Run->Run class to execute current class
>  or 
>  `java -classpath [all classpaths which are listed in pom file] class name`
>  or compile with maven also failed
>  `mvn clean compile`
> Exception:
>  Can't compile project. not enough dependencies
> Missing dependencies:
> {code:xml}
> <dependency>
>     <groupId>com.github.fommil.netlib</groupId>
>     <artifactId>core</artifactId>
> </dependency>
> <dependency>
>     <groupId>org.springframework.data</groupId>
>     <artifactId>spring-data-commons</artifactId>
> </dependency>
> <dependency>
>     <groupId>org.springframework</groupId>
>     <artifactId>spring-beans</artifactId>
> </dependency>
> <dependency>
>     <groupId>org.springframework</groupId>
>     <artifactId>spring-context</artifactId>
> </dependency>
> <dependency>
>     <groupId>com.h2database</groupId>
>     <artifactId>h2</artifactId>
> </dependency>
> {code}
> com.github.fommil.netlib, springframework.* and h2 need to run - org.apache.ignite.examples.ml.dataset.AlgorithmSpecificDatasetExample



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)