Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example archetype doesn't build unless POM is manually changed #61

Closed
binarymax opened this issue Oct 16, 2018 · 6 comments
Closed

Example archetype doesn't build unless POM is manually changed #61

binarymax opened this issue Oct 16, 2018 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@binarymax
Copy link
Contributor

Hi again! At first I was unable to get the example archetype to build after generation. So I needed to modify the POM manually.

Here was my command: mvn archetype:generate -Psease -B -DarchetypeGroupId=io.sease -DarchetypeArtifactId=rre-maven-elasticsearch-archetype -DarchetypeVersion=1.0 -DgroupId=com.osc.rretest -DartifactId=elasticsearch-project-rretest -Dversion=1.0 -DesVersion=6.4.2

Here is the generated pom.xml (which is incorrect):

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.osc.rretest</groupId>
    <artifactId>elasticsearch-project-rretest</artifactId>
    <version>1.0</version>
    <packaging>pom</packaging>
    <build>
        <plugins>
            <plugin>
                <groupId>io.sease</groupId>
                <artifactId>rre-maven-elasticsearch-plugin</artifactId>
                <version>6.4.2</version>
                <!-- the configuration below is provided just for example, as it perfectly matches default values -->
                <configuration>
                    <configurations-folder>src/etc/configuration_sets</configurations-folder>
                    <corpora-folder>src/etc/corpora</corpora-folder>
                    <ratings-folder>src/etc/ratings</ratings-folder>
                    <templates-folder>src/etc/templates</templates-folder>
                    <fields>*,score</fields>
                    <metrics>
                        <param>io.sease.rre.core.domain.metrics.impl.Precision</param>
                        <param>io.sease.rre.core.domain.metrics.impl.Recall</param>
                        <param>io.sease.rre.core.domain.metrics.impl.ReciprocalRank</param>
                        <param>io.sease.rre.core.domain.metrics.impl.AveragePrecision</param>
                        <param>io.sease.rre.core.domain.metrics.impl.NDCGAtTen</param>
                        <param>io.sease.rre.core.domain.metrics.impl.PrecisionAtOne</param>
                        <param>io.sease.rre.core.domain.metrics.impl.PrecisionAtTwo</param>
                        <param>io.sease.rre.core.domain.metrics.impl.PrecisionAtThree</param>
                        <param>io.sease.rre.core.domain.metrics.impl.PrecisionAtTen</param>
                    </metrics>
                </configuration>
                <executions>
                    <execution>
                        <id>search-quality-evaluation</id>
                        <phase>package</phase>
                        <goals>
                            <goal>evaluate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.sease</groupId>
                <artifactId>rre-maven-report-plugin</artifactId>
                <version>1.0</version>
                <configuration>
                    <formats>
                        <param>spreadsheet</param>
                        <!-- IMPORTANT: uncomment the following line if you're running the RRE server -->
                        <!--
                            <param>rre-server</param>
                        -->
                    </formats>
                </configuration>
                <executions>
                    <execution>
                        <id>search-quality-evaluation-reporting</id>
                        <phase>package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

And here is how I fixed it (by manually adding pluginRepositories and removing the version which did not exist):

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.osc.rretest</groupId>
    <artifactId>elasticsearch-project-rretest</artifactId>
    <version>1.0</version>
    <packaging>pom</packaging>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <pluginRepositories>
       <pluginRepository>
          <id>sease</id>
          <url>https://raw.github.com/SeaseLtd/rated-ranking-evaluator/mvn-repo</url>
       </pluginRepository>
    </pluginRepositories>        

    <build>
        <plugins>
            <plugin>
                <groupId>io.sease</groupId>
                <artifactId>rre-maven-elasticsearch-plugin</artifactId>
                <!--<version>6.4.2</version>-->
                <!-- the configuration below is provided just for example, as it perfectly matches default values -->
                <configuration>
                    <configurations-folder>src/etc/configuration_sets</configurations-folder>
                    <corpora-folder>src/etc/corpora</corpora-folder>
                    <ratings-folder>src/etc/ratings</ratings-folder>
                    <templates-folder>src/etc/templates</templates-folder>
                    <fields>*,score</fields>
                    <metrics>
                        <param>io.sease.rre.core.domain.metrics.impl.Precision</param>
                        <param>io.sease.rre.core.domain.metrics.impl.Recall</param>
                        <param>io.sease.rre.core.domain.metrics.impl.ReciprocalRank</param>
                        <param>io.sease.rre.core.domain.metrics.impl.AveragePrecision</param>
                        <param>io.sease.rre.core.domain.metrics.impl.NDCGAtTen</param>
                        <param>io.sease.rre.core.domain.metrics.impl.PrecisionAtOne</param>
                        <param>io.sease.rre.core.domain.metrics.impl.PrecisionAtTwo</param>
                        <param>io.sease.rre.core.domain.metrics.impl.PrecisionAtThree</param>
                        <param>io.sease.rre.core.domain.metrics.impl.PrecisionAtTen</param>
                    </metrics>
                </configuration>
                <executions>
                    <execution>
                        <id>search-quality-evaluation</id>
                        <phase>package</phase>
                        <goals>
                            <goal>evaluate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.sease</groupId>
                <artifactId>rre-maven-report-plugin</artifactId>
                <version>1.0</version>
                <configuration>
                    <formats>
                        <param>spreadsheet</param>
                        <!-- IMPORTANT: uncomment the following line if you're running the RRE server -->
                        <!--
                            <param>rre-server</param>
                        -->
                    </formats>
                </configuration>
                <executions>
                    <execution>
                        <id>search-quality-evaluation-reporting</id>
                        <phase>package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

I'm not really a java programmer, so am not sure how to best contribute a fix for this. I am happy to modify the archetype instructions though if you like.

@agazzarini
Copy link
Member

Hi @binarymax many thansk for entering this. The issue is already a great help, indeed.
Sorry for such delay in response, as these days we are quite busy.

I'll fix that as soon as possible. In the meantime, were you able to use RRE?

@binarymax
Copy link
Contributor Author

Hi @agazzarini, thanks for the response. Yes, I've been using it and can now generate evaluation json files! As per the above issue - the version does work when it is 6.3.2. It is unclear to me how I can find out which versions of elastic are officially supported. Also I get an exception when I try to enable sending an evaluation to the report server. I will open a separate issue for that - but I didn't want to overwhelm you since I'm sure you are busy. Thanks again.

@agazzarini
Copy link
Member

Hi @binarymax no problem at all, I'm happy to help you.
The supported version are listed here [1], if some of them is not working, please raise an issue.

Which exception you get about the report server?

[1] https://github.com/SeaseLtd/rated-ranking-evaluator/wiki/Supported%20Versions

@agazzarini agazzarini self-assigned this Oct 20, 2018
@agazzarini agazzarini added the bug Something isn't working label Oct 20, 2018
@agazzarini agazzarini modified the milestones: 1.1, 1.0 Oct 20, 2018
@agazzarini
Copy link
Member

Hi @binarymax I put your changes (many thanks again) in the archetype pom.xml.
So I think now everything should work. I'm saying "should" because the other issue you had should be related with the unsupported ES version (see my link above for supported versions).

Generally speaking, the self-hosted Maven repository is quite a nightmare, if you get some other issue, please give me a shout.

Many thanks again,
Andrea

BTW: great to see you again Max (we met at the London Haystack), sorry I didn't have a look at your profile photo.

@binarymax
Copy link
Contributor Author

Thanks @agazzarini ...I don't know how I missed that version file. Indeed setting it to the latest supported ES version worked.

I've been busy but am planning to open a separate issue with the report server. I'll try to do that soon.

Also good to see you at Haystack, hope to see you again at future events!

@binarymax
Copy link
Contributor Author

Just tested the example generated project again and with the new pom it builds fine without any manual changes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants