You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Julien Nioche (JIRA)" <ji...@apache.org> on 2014/07/17 14:23:04 UTC

[jira] [Updated] (NUTCH-1818) deps-test task for plugins used at deployment time

     [ https://issues.apache.org/jira/browse/NUTCH-1818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Nioche updated NUTCH-1818:
---------------------------------

    Description: 
>From email thread : 

[After ant clean] the target "compile-test" of lib-regex-filter which fails.
Should it be really called for target "runtime"?
  <target name="deps-jar">
    <ant target="jar" inheritall="false" dir="../lib-regex-filter"/>
    <ant target="compile-test" inheritall="false" dir="../lib-regex-filter"/>
  </target>

This is the source of the problem indeed, the second line should not be there : the test classes are not required at that stage. Both urlfilter-automaton and urlfilter-regex have the same problem, which was not apparent until I introduced a cleaner separation between the compilation and test deps.

I've fixed that for trunk in revision 1611303.

------------------------------------------------

This revealed another hidden issue which is that the test classes for the dependency plugins (e.g. lib-regex-filter) are not compiled anymore in the deps-jar step and we can't refer to them in the classpath.

There actually is a task deps-test which gets overriden by the plugins but this is not used by compile-test and despite its name has nothing to do with the tests but with the deployment of the dependency plugins. 

The best approach is to add a new overridable tasks for the plugins 'deps-test-compile' and trigger the compilation of the test classes for the dep plugins from there. 



  was:
>From email thread : 

[After ant clean] the target "compile-test" of lib-regex-filter which fails.
Should it be really called for target "runtime"?
  <target name="deps-jar">
    <ant target="jar" inheritall="false" dir="../lib-regex-filter"/>
    <ant target="compile-test" inheritall="false" dir="../lib-regex-filter"/>
  </target>

This is the source of the problem indeed, the second line should not be there : the test classes are not required at that stage. Both urlfilter-automaton and urlfilter-regex have the same problem, which was not apparent until I introduced a cleaner separation between the compilation and test deps.

I've fixed that for trunk in revision 1611303.

------------------------------------------------

This revealed another hidden issue which is that the test classes for the dependency plugins (e.g. lib-regex-filter) are not compiled anymore in the deps-jar step and we can't refer to them in the classpath.

There actually is a task deps-test which gets overriden by the plugins but this is not used by compile-test and despite its name has nothing to do with the tests but with the deployment of the dependency plugins. 

The simplest solution is to add : 

    <ant target="compile-test" inheritall="false" dir="../lib-regex-filter"/>

to the   <target name="deps-test"> 

and make so that compile-test in plugins depends on deploy. This way  deps-test will be called prior to compiling the test. 





> deps-test task for plugins used at deployment time
> --------------------------------------------------
>
>                 Key: NUTCH-1818
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1818
>             Project: Nutch
>          Issue Type: Bug
>          Components: build
>            Reporter: Julien Nioche
>            Assignee: Julien Nioche
>             Fix For: 1.9
>
>
> From email thread : 
> [After ant clean] the target "compile-test" of lib-regex-filter which fails.
> Should it be really called for target "runtime"?
>   <target name="deps-jar">
>     <ant target="jar" inheritall="false" dir="../lib-regex-filter"/>
>     <ant target="compile-test" inheritall="false" dir="../lib-regex-filter"/>
>   </target>
> This is the source of the problem indeed, the second line should not be there : the test classes are not required at that stage. Both urlfilter-automaton and urlfilter-regex have the same problem, which was not apparent until I introduced a cleaner separation between the compilation and test deps.
> I've fixed that for trunk in revision 1611303.
> ------------------------------------------------
> This revealed another hidden issue which is that the test classes for the dependency plugins (e.g. lib-regex-filter) are not compiled anymore in the deps-jar step and we can't refer to them in the classpath.
> There actually is a task deps-test which gets overriden by the plugins but this is not used by compile-test and despite its name has nothing to do with the tests but with the deployment of the dependency plugins. 
> The best approach is to add a new overridable tasks for the plugins 'deps-test-compile' and trigger the compilation of the test classes for the dep plugins from there. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)