javaapachemavendirectory-server

Apache directory-server maven packaging


I've checked out the latest Apache Directory-server trunk and am trying to get packaging working. I made a trivial change (i.e. added a new class) in protocol-ntp. When I run mvn package in protocol-ntp, the resulting jar in target contains the new class.

However, I'm having trouble getting the new class to be present in the jar containing all the projects. When I run mvn package inside the all folder, it "successfully" packages but the jar file (which does have an updated timestamp) contains only the old projects, without the new class. Running mvn package in the trunk root directory yields the following error:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.directory.ldap.client.template.LdapConnectionTemplateTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.718 sec - in org.apache.directory.ldap.client.template.LdapConnectionTemplateTest
Running org.apache.directory.shared.client.api.AdsSchemaLoaderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.378 sec - in org.apache.directory.shared.client.api.AdsSchemaLoaderTest
Running org.apache.directory.shared.client.api.LdapConnectionPoolTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 5.171 sec - in org.apache.directory.shared.client.api.LdapConnectionPoolTest
Running org.apache.directory.shared.client.api.LdapConnectionTest
Tests run: 13, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 64.625 sec <<< FAILURE! - in org.apache.directory.shared.client.api.LdapConnectionTest
testConnectionWrongHost(org.apache.directory.shared.client.api.LdapConnectionTest)  Time elapsed: 30.056 sec  <<< FAILURE!
java.lang.AssertionError: Expected exception: org.apache.directory.ldap.client.api.exception.InvalidConnectionException
    at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:32)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.apache.directory.server.core.integ.FrameworkRunner.runChild(FrameworkRunner.java:391)
    at org.apache.directory.server.core.integ.FrameworkRunner.runChild(FrameworkRunner.java:64)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.apache.directory.server.core.integ.FrameworkRunner.run(FrameworkRunner.java:164)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Running org.apache.directory.shared.client.api.LdapSSLConnectionTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.409 sec - in org.apache.directory.shared.client.api.LdapSSLConnectionTest
Running org.apache.directory.shared.client.api.LightweightLdapConnectionPoolTest
Max Active connections =: 8
Tests run: 6, Failures: 0, Errors: 0, Skipped: 5, Time elapsed: 3.851 sec - in org.apache.directory.shared.client.api.LightweightLdapConnectionPoolTest
Running org.apache.directory.shared.client.api.operations.bind.SimpleBindRequestTest
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.147 sec - in org.apache.directory.shared.client.api.operations.bind.SimpleBindRequestTest
Running org.apache.directory.shared.client.api.operations.ClientAbandonRequestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 36.442 sec - in org.apache.directory.shared.client.api.operations.ClientAbandonRequestTest
Running org.apache.directory.shared.client.api.operations.ClientAddRequestTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.067 sec - in org.apache.directory.shared.client.api.operations.ClientAddRequestTest
Running org.apache.directory.shared.client.api.operations.ClientCompareRequestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.913 sec - in org.apache.directory.shared.client.api.operations.ClientCompareRequestTest
Running org.apache.directory.shared.client.api.operations.ClientDeleteRequestTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 4.525 sec - in org.apache.directory.shared.client.api.operations.ClientDeleteRequestTest
Running org.apache.directory.shared.client.api.operations.ClientExtendedRequestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.875 sec - in org.apache.directory.shared.client.api.operations.ClientExtendedRequestTest
Running org.apache.directory.shared.client.api.operations.ClientModifyDnRequestTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 4.896 sec - in org.apache.directory.shared.client.api.operations.ClientModifyDnRequestTest
Running org.apache.directory.shared.client.api.operations.ClientModifyRequestTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.234 sec - in org.apache.directory.shared.client.api.operations.ClientModifyRequestTest
Running org.apache.directory.shared.client.api.operations.ConcurrentSearchAndUnbindTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 4.257 sec - in org.apache.directory.shared.client.api.operations.ConcurrentSearchAndUnbindTest
Running org.apache.directory.shared.client.api.operations.GetRootDseTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.234 sec - in org.apache.directory.shared.client.api.operations.GetRootDseTest
Running org.apache.directory.shared.client.api.operations.search.AnonymousClientSearchRequestTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.928 sec - in org.apache.directory.shared.client.api.operations.search.AnonymousClientSearchRequestTest
Running org.apache.directory.shared.client.api.operations.search.ClientSearchRequestTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 5.169 sec - in org.apache.directory.shared.client.api.operations.search.ClientSearchRequestTest
Running org.apache.directory.shared.client.api.operations.search.OperationWithIndexTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 21.043 sec - in org.apache.directory.shared.client.api.operations.search.OperationWithIndexTest
Running org.apache.directory.shared.client.api.operations.search.SearchRequestReturningAttributesTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.254 sec - in org.apache.directory.shared.client.api.operations.search.SearchRequestReturningAttributesTest
Running org.apache.directory.shared.client.api.operations.search.SearchWithReferralsTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.803 sec - in org.apache.directory.shared.client.api.operations.search.SearchWithReferralsTest
Running org.apache.directory.shared.client.api.ServerSchemaLoaderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.399 sec - in org.apache.directory.shared.client.api.ServerSchemaLoaderTest
Running org.apache.directory.shared.client.api.ValidatingLdapConnectionPoolTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.835 sec - in org.apache.directory.shared.client.api.ValidatingLdapConnectionPoolTest

Results :

Failed tests: 
  LdapConnectionTest.testConnectionWrongHost Expected exception: org.apache.directory.ldap.client.api.exception.InvalidConnectionException

Tests run: 162, Failures: 1, Errors: 0, Skipped: 14

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] ApacheDS Protocol Ntp .............................. SUCCESS [  4.451 s]
[INFO] Apacheds Server Annotations ........................ SUCCESS [ 34.057 s]
[INFO] ApacheDS Server Config ............................. SUCCESS [ 12.769 s]
[INFO] ApacheDS Server JNDI ............................... SUCCESS [  1.720 s]
[INFO] ApacheDS Test Framework ............................ SUCCESS [01:09 min]
[INFO] ApacheDS All ....................................... SUCCESS [  3.743 s]
[INFO] ApacheDS Logger Interceptor ........................ SUCCESS [  1.962 s]
[INFO] ApacheDS Password Hashing Interceptor .............. SUCCESS [  1.046 s]
[INFO] ApacheDS Core Integration .......................... SUCCESS [14:02 min]
[INFO] ApacheDS Protocol Kerberos Test .................... SUCCESS [ 27.092 s]
[INFO] ApacheDS Server Integration ........................ SUCCESS [10:50 min]
[INFO] ApacheDS DirectoryService-WebApp bridge ............ SUCCESS [  0.723 s]
[INFO] ApacheDS Jetty HTTP Server Integration ............. SUCCESS [  1.341 s]
[INFO] ApacheDS Service Builder ........................... SUCCESS [  3.739 s]
[INFO] Apache Directory LDAP Client API test .............. FAILURE [03:44 min]
[INFO] kerberos-client .................................... SKIPPED
[INFO] ApacheDS Service ................................... SKIPPED
[INFO] ApacheDS Wrapper ................................... SKIPPED
[INFO] ApacheDS Installers Maven Plugin ................... SKIPPED
[INFO] ApacheDS Installers ................................ SKIPPED
[INFO] ApacheDS OSGi Integration Tests .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31:21 min
[INFO] Finished at: 2017-04-25T21:53:52-04:00
[INFO] Final Memory: 118M/1407M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project ldap-client-test: There are test failures.
[ERROR] 
[ERROR] Please refer to /media/DataDrive/Projects/Parclock/git-repos/directory-server/ldap-client-test/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :ldap-client-test

Any ideas on how I can get this working?


Solution

  • I was able to solve the problem by running mvn package in the root project directory with -Dmaven.test.skip=true