You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Karl Wright (JIRA)" <ji...@apache.org> on 2011/07/14 11:48:59 UTC

[jira] [Created] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Tests in project hierarchy do not adhere to maven conventions
-------------------------------------------------------------

                 Key: CONNECTORS-223
                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
             Project: ManifoldCF
          Issue Type: Bug
          Components: Build
    Affects Versions: ManifoldCF 0.2, ManifoldCF 0.1, ManifoldCF 0.3
            Reporter: Karl Wright


Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068343#comment-13068343 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

If a dependency is not in your repository, you need to install in manually.
For installing jdbcpool into your local repository try
{code}
mvn install:install-file -Dfile=<path-to-file> -DgroupId=com.bitmechanic \
    -DartifactId=jdbcpool -Dversion=0.99 -Dpackaging=jar
{code}

We use a repository manager to proxy all dependency requests.
So it is possible to use many remote repositories at the same time (maven cental, sonatype, apache, ...). 
This dependency was already manually deployed to our maven repository.

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Rübner updated CONNECTORS-223:
-------------------------------------

    Attachment: CONNECTORS-223_jetty-runner.patch

I deleted mcf modules installed in my local repo and run into the same issue.

The jetty-runner is something like the final product and has a lot of dependencies from both the framework and the connectors. So, it must be build as the last module.

Maybe it should be separated from the framework to a single toplevel module (webapp?).

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Wright updated CONNECTORS-223:
-----------------------------------

    Attachment: test_reset.patch

This code should allow a test to reset the process, at least partially


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065748#comment-13065748 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

Please go ahead, and attach the patch to this ticket; I'll commit it right away.



> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068213#comment-13068213 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

I looked in the documentation of the maven surefire plugin, which executes the tests.
Per default, maven also runs the tests in a separate process.
The execution procedure is sequential. Each tests runs to the whole lifecycle, before an other test starts.  

I synced with the repository and run the tests again.
Now I get a timeout exception (I also tried a larger values).

Here is the error stack trace:
{code}
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.manifoldcf.filesystem_tests.ExpirationTest
Configuration file successfully read
2011-07-20 09:26:50.333:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2011-07-20 09:26:50.385:INFO::jetty-6.1.26
2011-07-20 09:26:50.436:INFO::Extract ../../framework/dist/web/war/mcf-crawler-ui.war to /tmp/Jetty_0_0_0_0_8346_mcf.crawler.ui.war__mcf.crawler.ui__b94r7w/webapp
2011-07-20 09:26:51.565:INFO::Extract ../../framework/dist/web/war/mcf-authority-service.war to /tmp/Jetty_0_0_0_0_8346_mcf.authority.service.war__mcf.authority.service__.3vgkks/webapp
2011-07-20 09:26:52.237:INFO::Extract ../../framework/dist/web/war/mcf-api-service.war to /tmp/Jetty_0_0_0_0_8346_mcf.api.service.war__mcf.api.service__.67gzyk/webapp
2011-07-20 09:26:52.953:INFO::Started SocketConnector@0.0.0.0:8346
2011-07-20 09:29:39.757:INFO::Stopped SocketConnector@0.0.0.0:8346
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 176.237 sec
Running org.apache.manifoldcf.filesystem_tests.APISanityTest
Configuration file successfully read
2011-07-20 09:29:43.742:INFO::jetty-6.1.26
2011-07-20 09:29:43.747:INFO::Extract ../../framework/dist/web/war/mcf-crawler-ui.war to /tmp/Jetty_0_0_0_0_8346_mcf.crawler.ui.war__mcf.crawler.ui__b94r7w/webapp
2011-07-20 09:29:44.798:INFO::Extract ../../framework/dist/web/war/mcf-authority-service.war to /tmp/Jetty_0_0_0_0_8346_mcf.authority.service.war__mcf.authority.service__.3vgkks/webapp
2011-07-20 09:29:45.422:INFO::Extract ../../framework/dist/web/war/mcf-api-service.war to /tmp/Jetty_0_0_0_0_8346_mcf.api.service.war__mcf.api.service__.67gzyk/webapp
2011-07-20 09:29:46.086:INFO::Started SocketConnector@0.0.0.0:8346
org.apache.manifoldcf.core.interfaces.ManifoldCFException: ManifoldCF did not terminate in the allotted time of 180000 milliseconds
        at org.apache.manifoldcf.filesystem_tests.APISanityTest.waitJobInactive(APISanityTest.java:386)
        at org.apache.manifoldcf.filesystem_tests.APISanityTest.sanityCheck(APISanityTest.java:225)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
        at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
        at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
{code}

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068658#comment-13068658 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

r1148946 for the documentation update.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068397#comment-13068397 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

Did you applied my patch (CONNECTORS-223_jetty-runner.patch) for restructuring the build order?

Thereafter the build order should be
{code}
[INFO] Reactor Summary:
[INFO]
[INFO] ManifoldCF ........................................ SUCCESS [0.543s]
[INFO] ManifoldCF - Framework ............................ SUCCESS [0.010s]
[INFO] ManifoldCF - Framework - Core ..................... SUCCESS [5.906s]
[INFO] ManifoldCF - Framework - UI Core .................. SUCCESS [1.113s]
[INFO] ManifoldCF - Framework - Agents ................... SUCCESS [7.232s]
[INFO] ManifoldCF - Framework - Pull Agent ............... SUCCESS [12.588s]
[INFO] ManifoldCF - Framework - Authority Servlet ........ SUCCESS [0.808s]
[INFO] ManifoldCF - Framework - API Servlet .............. SUCCESS [0.834s]
[INFO] ManifoldCF - Framework - Authority Service ........ SUCCESS [1.667s]
[INFO] ManifoldCF - Framework - API Service .............. SUCCESS [1.070s]
[INFO] ManifoldCF - Framework - Crawler UI ............... SUCCESS [1.207s]
[INFO] ManifoldCF - Connectors ........................... SUCCESS [0.006s]
[INFO] ManifoldCF - Connectors - Active Directory ........ SUCCESS [0.957s]
[INFO] ManifoldCF - Connectors - Filesystem .............. SUCCESS [9.259s]
[INFO] ManifoldCF - Connectors - MetaCarta GTS ........... SUCCESS [1.394s]
[INFO] ManifoldCF - Connectors - jCIFS ................... SUCCESS [1.838s]
[INFO] ManifoldCF - Connectors - JDBC .................... SUCCESS [1.339s]
[INFO] ManifoldCF - Connectors - Null Authority .......... SUCCESS [0.725s]
[INFO] ManifoldCF - Connectors - Null Output ............. SUCCESS [0.727s]
[INFO] ManifoldCF - Connectors - RSS ..................... SUCCESS [1.835s]
[INFO] ManifoldCF - Connectors - Solr .................... SUCCESS [1.483s]
[INFO] ManifoldCF - Connectors - Web ..................... SUCCESS [2.553s]
[INFO] ManifoldCF - Tests ................................ SUCCESS [0.011s]
[INFO] ManifoldCF - Test - Filesystem .................... SUCCESS [9:34.805s]
[INFO] ManifoldCF - Test - Sharepoint .................... SUCCESS [0.121s]
[INFO] ManifoldCF - Framework - Jetty Runner ............. SUCCESS [2.217s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

{code}

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065301#comment-13065301 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

That is no problem for maven. You should leave the TestBase classes in their modules.
While building the module, I can add an additional instruction to include the test-classes to an xxx-test.jar. 
On the module depending on those test-classes, I can include the test package to the test lifecycle.

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Issue Comment Edited] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068363#comment-13068363 ] 

Karl Wright edited comment on CONNECTORS-223 at 7/20/11 1:24 PM:
-----------------------------------------------------------------

With that import and a few other similar imports, I was able to get further.  Now I am stopped by the following error, which looks like something new:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:
2.1:copy (copy-war) on project mcf-jettyrunner: Unable to find artifact. Could n
ot find artifact org.apache.manifoldcf:mcf-api-service:war:0.3.0-SNAPSHOT
[ERROR]

This is the result of "mvn test".

Thoughts?  (I'm keeping all this information around in order to update the how-to-build-and-deploy page, FWIW.)

      was (Author: kwright@metacarta.com):
    With that import and a few other similar imports, I was able to get further.  Now I am stopped by the following error, which looks like something new:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:
2.1:copy (copy-war) on project mcf-jettyrunner: Unable to find artifact. Could n
ot find artifact org.apache.manifoldcf:mcf-api-service:war:0.3.0-SNAPSHOT
[ERROR]

Thoughts?  (I'm keeping all this information around in order to update the how-to-build-and-deploy page, FWIW.)
  
> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065780#comment-13065780 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

Renaming the tests should not be hard.  But what about the test base classes?  Since they begin with "Test" they will be executed independently, although they do not have any actual tests in them.  They do have expensive setup and teardown methods though.  Thus they should probably also be renamed to something that won't execute on its own.




> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065744#comment-13065744 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

The structure looks good, but the tests need more dependencies.
Currently in maven all tests will fail!

I will create a patch for the maven poms, that includes the dependencies for the maven test lifecycle.

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Wright resolved CONNECTORS-223.
------------------------------------

    Resolution: Fixed

r1151437


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, CONNECTORS-223_tests.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108900#comment-13108900 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

bq. I'm not sure, that packages not available at Maven central, or other repositories, should be used in pom's - in Tika project another approach is used - all needed jars are promoted to repository first, and only after it are used...

If you want to create an example patch that shows how you think we should do it, I'd certainly have a look at it.  But I think you might want to open a new JIRA ticket for this issue first.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, CONNECTORS-223_tests.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068383#comment-13068383 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

For building the framework with maven, you just need to invoke
{{mvn clean install}}

on the root level of the project.

for running the jetty-runner app invoke
{{mvn exec:exec}}

in the jetty-runner module.

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068263#comment-13068263 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

bq. Per default, maven also runs the tests in a separate process.

So does it start the process, run all the tests, and shut the process down?  Or does it start a process for each test?

bq. The execution procedure is sequential. Each tests runs to the whole lifecycle, before an other test starts.

Ok, that's a relief.

Other than trying to run these tests myself under maven, I can't think of any other way to proceed other than to ask you to figure out a way to get at the manifoldcf.log output for the test that fails.  The timeout is happening because the crawl it sets up is never finishing.  This could well be due to some static objects hanging around from one cycle to the next, but I'm never going to be able to tell without some work.  I would have thought using ant with fork="false" would exercise the same path, but clearly Maven is doing something different from that.

Maybe the best way forward is to give me detailed instructions on how to set maven up in the way you have it, so I can debug at length.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Wright resolved CONNECTORS-223.
------------------------------------

    Resolution: Fixed

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067837#comment-13067837 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

I tried to simulate what maven does by changing the ant build's junit invocation from "fork="true"" to "fork="false"".  When I do this without the patch, I get the same symptom as you see under Maven.  With the patch, however, it works fine.

I think perhaps there is a problem with your testing procedure?  I'm going to commit the patch changes now - could you synch up and try them again under maven?

r1148443.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067797#comment-13067797 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

The stuff under jetty-runner won't work fully, because the connectors.xml file needs to be modified based on what connectors you actually build.  That in turn depends on what third party libraries you have.  However, as a lowest-common-denominator solution, I'm willing to commit it.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065753#comment-13065753 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

Maven strongly depends on conventions.
By default, the Maven Surefire Plugin, which executes the tests, will automatically include all test classes with the following wildcard patterns:

* "**/Test*.java" - includes all of its subdirectories and all java filenames that start with "Test".
* "**/*Test.java" - includes all of its subdirectories and all java filenames that end with "Test".
* "**/*TestCase.java" - includes all of its subdirectories and all java filenames that end with "TestCase".

Your test class names do not match this convention.
Now we have 2 choices:
* rename the test classes (e.g. mcf-agents Sanity -> SanityTest)
* change the pattern to include the tests (**/Sanity*.java)

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Alex Ott (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108894#comment-13108894 ] 

Alex Ott commented on CONNECTORS-223:
-------------------------------------

I'm not sure, that packages not available at Maven central, or other repositories, should be used in pom's - in Tika project another approach is used - all needed jars are promoted to repository first, and only after it are used...

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, CONNECTORS-223_tests.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068402#comment-13068402 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

Sorry!  I didn't notice the new patch.

r1148787.



> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Alex Ott (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108922#comment-13108922 ] 

Alex Ott commented on CONNECTORS-223:
-------------------------------------

I created new bug for this issue (https://issues.apache.org/jira/browse/CONNECTORS-258). This is more organizational question than technical

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, CONNECTORS-223_tests.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Wright reopened CONNECTORS-223:
------------------------------------


Still working on this.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067811#comment-13067811 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

bq. Invoking more than one test ends up in a database not found error.

So let me be sure I understand the model.  These tests are all executing in one JVM, correct?  Can you attach a stack trace?  I suspect that the issue has to do with setup/teardown of the database; I believe that each test's cleanup method removes the database, so if the sequence looks like this, for tests A, B, and C:

setup (A)
setup (B)
setup (C)
(A)
(B)
(C)
cleanup (C)
cleanup (B)
cleanup (A)

... then this could happen.  But if the sequence is:

setup (A)
(A)
cleanup (A)
etc.

... then it is a complete mystery.  I should be able to tell what sequence it is from a trace though.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065237#comment-13065237 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

That sounds great.
For the end-to-end tests I would also suggest to make a maven project per test szenario (filesystem, sharepoint, ...).
The test code should be in the "src/test/java" directory.
When you are done, I could update the maven pom's.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066858#comment-13066858 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

Thank you. Now I run into some other problems.
Running the tests creates the databses files in the root directory of the module.
This depends on the test configuration defined in org.apache.manifoldcf.core.tests.BaseHSQLDB.
Maybe we could change that path to the test classpath
{code}
currentPath = new File(".").getCanonicalFile();
//currentPath = new File(this.getClass().getClassLoader().getResource(".").getPath()).getCanonicalFile();
{code}

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067802#comment-13067802 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

r1148417.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066923#comment-13066923 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

The only requirement I have for creation of the test databases and configuration files is that it must be possible to have multiple workareas checked out with on tests running on each so that the tests do not collide with one another.  Setting up paths that depend on resources may therefore not work.

Other than than, I'm open to any patch you want to propose.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068363#comment-13068363 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

With this and similar imports, I was able to get further.  Now I am stopped by the following error, which looks like something new:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:
2.1:copy (copy-war) on project mcf-jettyrunner: Unable to find artifact. Could n
ot find artifact org.apache.manifoldcf:mcf-api-service:war:0.3.0-SNAPSHOT
[ERROR]

Thoughts?  (I'm keeping all this information around in order to update the how-to-build-and-deploy page, FWIW.)

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065853#comment-13065853 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

r1147086.  Let me know if there's anything further you need.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065329#comment-13065329 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

I've created a branch, https://svn.apache.org/repos/asf/incubator/lcf/branches/CONNECTORS-223, where I've started the rearrangement.  If you could have a look at the framework subproject in this branch to see if I have arranged things properly, that would be great.  If that all looks OK, I'm planning to tackle the connectors next, then the end-to-end tests.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065788#comment-13065788 ] 

Tobias Rübner commented on CONNECTORS-223:
------------------------------------------

No, I don't think you have to rename the TestBase classes. They do not have any @Test Annotations and so the code will only be executed when an explicit call was made.

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Reopened] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Wright reopened CONNECTORS-223:
------------------------------------


The dependencies still seem incorrect.  On a fresh checkout, with no ant-built artifacts, I get this when the tests are run:

2011-07-26 09:29:46.423:WARN::Web application not found ../../framework/dist/web
/war/mcf-authority-service.war
2011-07-26 09:29:46.423:WARN::Failed startup of context org.mortbay.jetty.webapp
.WebAppContext@15151aa{/mcf-authority-service,../../framework/dist/web/war/mcf-a
uthority-service.war}
java.io.FileNotFoundException: ../../framework/dist/web/war/mcf-authority-servic
e.war
        at org.mortbay.jetty.webapp.WebAppContext.resolveWebApp(WebAppContext.ja
va:997)
        at org.mortbay.jetty.webapp.WebAppContext.getWebInf(WebAppContext.java:8
32)
        at org.mortbay.jetty.webapp.WebInfConfiguration.configureClassLoader(Web
InfConfiguration.java:62)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489
)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection
.java:152)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
        at org.mortbay.jetty.Server.doStart(Server.java:224)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at org.apache.manifoldcf.filesystem_tests.Base.setUp(Base.java:308)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework
Method.java:44)

... and others, indicating that the war files the tests are looking for are not in place.  We need to figure out how to get that to work under Maven.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068363#comment-13068363 ] 

Karl Wright edited comment on CONNECTORS-223 at 7/20/11 1:24 PM:
-----------------------------------------------------------------

With that import and a few other similar imports, I was able to get further.  Now I am stopped by the following error, which looks like something new:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:
2.1:copy (copy-war) on project mcf-jettyrunner: Unable to find artifact. Could n
ot find artifact org.apache.manifoldcf:mcf-api-service:war:0.3.0-SNAPSHOT
[ERROR]

Thoughts?  (I'm keeping all this information around in order to update the how-to-build-and-deploy page, FWIW.)

      was (Author: kwright@metacarta.com):
    With this and similar imports, I was able to get further.  Now I am stopped by the following error, which looks like something new:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:
2.1:copy (copy-war) on project mcf-jettyrunner: Unable to find artifact. Could n
ot find artifact org.apache.manifoldcf:mcf-api-service:war:0.3.0-SNAPSHOT
[ERROR]

Thoughts?  (I'm keeping all this information around in order to update the how-to-build-and-deploy page, FWIW.)
  
> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068392#comment-13068392 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

mvn clean install produces:

[INFO] Reactor Summary:
[INFO]
[INFO] ManifoldCF ........................................ SUCCESS [0.775s]
[INFO] ManifoldCF - Framework ............................ SUCCESS [0.018s]
[INFO] ManifoldCF - Framework - Core ..................... SUCCESS [9.729s]
[INFO] ManifoldCF - Framework - UI Core .................. SUCCESS [0.875s]
[INFO] ManifoldCF - Framework - Agents ................... SUCCESS [17.479s]
[INFO] ManifoldCF - Framework - Pull Agent ............... SUCCESS [36.954s]
[INFO] ManifoldCF - Connectors ........................... SUCCESS [0.018s]
[INFO] ManifoldCF - Connectors - Solr .................... SUCCESS [1.257s]
[INFO] ManifoldCF - Connectors - Null Output ............. SUCCESS [0.672s]
[INFO] ManifoldCF - Connectors - MetaCarta GTS ........... SUCCESS [1.139s]
[INFO] ManifoldCF - Connectors - Null Authority .......... SUCCESS [0.707s]
[INFO] ManifoldCF - Connectors - Active Directory ........ SUCCESS [0.932s]
[INFO] ManifoldCF - Connectors - Web ..................... SUCCESS [2.185s]
[INFO] ManifoldCF - Connectors - RSS ..................... SUCCESS [1.784s]
[INFO] ManifoldCF - Connectors - JDBC .................... SUCCESS [1.243s]
[INFO] ManifoldCF - Connectors - Filesystem .............. SUCCESS [30.436s]
[INFO] ManifoldCF - Framework - Jetty Runner ............. FAILURE [0.838s]
[INFO] ManifoldCF - Framework - Authority Servlet ........ SKIPPED
[INFO] ManifoldCF - Framework - API Servlet .............. SKIPPED
[INFO] ManifoldCF - Framework - Authority Service ........ SKIPPED
[INFO] ManifoldCF - Framework - API Service .............. SKIPPED
[INFO] ManifoldCF - Framework - Crawler UI ............... SKIPPED
[INFO] ManifoldCF - Connectors - jCIFS ................... SKIPPED
[INFO] ManifoldCF - Tests ................................ SKIPPED
[INFO] ManifoldCF - Test - Filesystem .................... SKIPPED
[INFO] ManifoldCF - Test - Sharepoint .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:47.286s
[INFO] Finished at: Wed Jul 20 09:57:52 EDT 2011
[INFO] Final Memory: 36M/87M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:
2.1:copy (copy-war) on project mcf-jettyrunner: Unable to find artifact. Could n
ot find artifact org.apache.manifoldcf:mcf-api-service:war:0.3.0-SNAPSHOT
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.apache.manifoldcf -DartifactId=mc
f-api-service -Dversion=0.3.0-SNAPSHOT -Dpackaging=war -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file t
here:
[ERROR] mvn deploy:deploy-file -DgroupId=org.apache.manifoldcf -DartifactId=mcf-
api-service -Dversion=0.3.0-SNAPSHOT -Dpackaging=war -Dfile=/path/to/file -Durl=
[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] org.apache.manifoldcf:mcf-api-service:war:0.3.0-SNAPSHOT
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :mcf-jettyrunner

I'm not attempting to run anything but clearly the dependencies don't work consistently at this time, just for building.

The jetty-runner jar can be BUILT right where it is, but it cannot be RUN until the wars are all available.  The directory where all this is assembled under ant is based on jetty-example, and is separate from jetty-runner for this very reason.  Is there a way to make a similar separation in Maven?


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Wright resolved CONNECTORS-223.
------------------------------------

       Resolution: Fixed
    Fix Version/s: ManifoldCF 0.3
         Assignee: Karl Wright

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Rübner updated CONNECTORS-223:
-------------------------------------

    Attachment: CONNECTORS-223_tests.patch

I replaced the hard-coded paths to the war files with system properties. Now all tests work fine, even when no ant build was done before.

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, CONNECTORS-223_jetty-runner.patch, CONNECTORS-223_tests.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068326#comment-13068326 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

I tried running mvn on the pom's currently checked in and I get this:

[ERROR] Failed to execute goal on project mcf-core: Could not resolve dependenci
es for project org.apache.manifoldcf:mcf-core:jar:0.3.0-SNAPSHOT: Could not find
 artifact com.bitmechanic:jdbcpool:jar:0.99 in central (http://repo1.maven.org/m
aven2) -> [Help 1]
[ERROR]

Do you see this error too?


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065416#comment-13065416 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

I went ahead and committed this to trunk.  r1146817.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065257#comment-13065257 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

I just ran into a potential issue.  The framework tests are organized as follows:

- the core test package consists of tests and a TestBase class
- the agents test package consists of tests and a TestBase class that extends the core TestBase class
- the pull-agent test package consists of tests and a TestBase class that extends the agents TestBase class

The question is, where should the TestBase classes live?  Will maven do the right thing if these are all moved, to core/src/test/java, agents/src/test/java, and pull-agent/src/test/java, respectively?  Or do we need specific mcf-core-test, mcf-agents-test, and mcf-pull-agent-test subprojects, for the test base classes?  How is this usually handled in Maven?


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Rübner updated CONNECTORS-223:
-------------------------------------

    Attachment: CONNECTORS-223_forkMode.patch

I overlooked an option that forks each test into a separate process. Now all tests succeed.

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Rübner updated CONNECTORS-223:
-------------------------------------

    Attachment: CONNECTORS-223.patch

This patch includes the updated versions of the maven poms.
I also added minor changes to run the jetty-runner module by invoking "mvn exec:exec" on the command line (or eclipse).

There is still an issue with the end-to-end test, which requires a more detailed look into the code base. Invoking more than one test ends up in a database not found error. Your supplied "test_reset.patch" does not fix the issue. Maybe you can have a look on it.

> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CONNECTORS-223) Tests in project hierarchy do not adhere to maven conventions

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068334#comment-13068334 ] 

Karl Wright commented on CONNECTORS-223:
----------------------------------------

r1148733.


> Tests in project hierarchy do not adhere to maven conventions
> -------------------------------------------------------------
>
>                 Key: CONNECTORS-223
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-223
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-223.patch, CONNECTORS-223_forkMode.patch, test_reset.patch
>
>
> Maven expects unit tests under .../src/test/java, and root-level project tests under tests/xxx/src/test/java (or equivalent, along with their own pom.xml at tests and tests/xxx).  This is basically compatible with the ant build except in location detail.  The proposal is to move stuff around to make the tests work with maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira