Announcement Announcement Module
Collapse
No announcement yet.
please help! more (maven) build problems Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • please help! more (maven) build problems

    Hi,

    I'm trying to do the strict minimum of getting things working like hinted in the "suggested steps". This should be a simple process, am I wrong?

    I've downloaded the source from svn at:

    https://svn.sourceforge.net/svnroot/acegisecurity

    First I've tried to build the core, and there after loads of unit tests output (seemingly successfully passed), I got the following message:

    [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 0,23 sec
    [junit] Running org.acegisecurity.intercept.web.FilterSecurityInte rceptorTes
    ts
    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0,511 sec
    [junit] Running org.acegisecurity.intercept.web.PathBasedFilterDef initionMap
    Tests
    [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0,19 sec
    [junit] Running org.acegisecurity.intercept.web.RegExpBasedFilterD efinitionM
    apTests
    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0,211 sec
    [junit] Running org.acegisecurity.intercept.web.WebInvocationPrivi legeEvalua
    torTests
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0,561 sec

    BUILD FAILED
    File...... C:\Documents and Settings\Candide\.maven\cache\maven-test-plugin-1.6.
    2\plugin.jelly
    Element... junit
    Line...... 133
    Column.... 41
    java.lang.NoClassDefFoundError
    Total time: 55 seconds
    Finished at: Fri May 19 22:28:26 CEST 2006


    Again, it doesn't seem like the problem comes from the tests. These seem to pass. It's like maven doesn't know how to "print the summary" of those tests:

    I've checked the aforementioned .jelly at line 133, and this is what's in there:

    <junit printSummary="${maven.junit.printSummary}"
    failureProperty="maven.test.failure"
    fork="${maven.junit.fork}">

    This was with maven-1.0.2. Now I've tried with maven-2.0.4. Things are even worse there:

    C:\dev\my-workspace\acegisecurity\core>mvn jar:install
    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'jar'.
    [INFO] org.apache.maven.plugins: checking for updates from central
    [INFO] org.codehaus.mojo: checking for updates from central
    [INFO] artifact org.apache.maven.plugins:maven-jar-plugin: checking for updates
    from central
    Downloading: http://repo1.maven.org/maven2/org/ap...s/maven-jar-pl
    ugin/2.0/maven-jar-plugin-2.0.pom
    737b downloaded
    Downloading: http://repo1.maven.org/maven2/org/ap...s/maven-plugin
    -parent/2.0/maven-plugin-parent-2.0.pom
    6K downloaded
    Downloading: http://repo1.maven.org/maven2/org/ap...s/maven-jar-pl
    ugin/2.0/maven-jar-plugin-2.0.jar
    7K downloaded
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Required goal not found: jar:install
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 8 seconds
    [INFO] Finished at: Fri May 19 22:44:16 CEST 2006
    [INFO] Final Memory: 1M/3M
    [INFO] ------------------------------------------------------------------------

    C:\dev\my-workspace\acegisecurity\core>mvn jar:install
    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'jar'.
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Required goal not found: jar:install
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: < 1 second
    [INFO] Finished at: Fri May 19 22:44:26 CEST 2006
    [INFO] Final Memory: 1M/4M
    [INFO] ------------------------------------------------------------------------


    Please I really don't know what to do. I've used maven extensively in the past (with an andromda project), but I've always found that debugging build problems with this tool was horrible...

    I'm confused, please help.

    Thanks a lot in advance,

    Candide

  • #2
    "jar:install" isn't a valid maven 2 goal (as it says). Use "mvn install" instead.

    Alternatively, just download the binaries:

    http://forum.springframework.org/showthread.php?t=25154

    Comment


    • #3
      Originally posted by ckemmler

      Please I really don't know what to do. I've used maven extensively in the past (with an andromda project), but I've always found that debugging build problems with this tool was horrible...
      Use the -X option to get more output from maven to debug problems. Maven 2 is much better in this respect.

      Comment


      • #4
        making progress (but still...)

        I'm getting a bit farther now (using maven-2.0.4), but things are still strangely complicated:

        1) I had to manually download jta-1.0.1B, which is bundled as a zip of classes. This I renamed to jta-1.0.1B.jar and added a default MANIFEST. Not sure if it really is the best thing to do...

        2) the build now stops with the following complaints:


        [INFO] [compiler:compile]
        [INFO] Nothing to compile - all classes are up to date
        [INFO] [resources:testResources]
        [INFO] Using default encoding to copy filtered resources.
        Downloading: http://mirrors.playboy.com/apache/ma...dbm/jdbm/1.0/j
        dbm-1.0.jar
        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD ERROR
        [INFO] ------------------------------------------------------------------------
        [INFO] Failed to resolve artifact.

        Error transferring file
        jdbm:jdbm:jar:1.0

        from the specified remote repositories:
        central (http://repo1.maven.org/maven2),
        mirrormax.mirror (http://apache.mirrormax.net/apache/maven-repository/),
        apache-maven-snapshots (http://svn.apache.org/maven-snapshot-repository),
        safehaus (http://m2.safehaus.org),
        apache.snapshots (http://cvs.apache.org/maven-snapshot-repository),
        seekmeup.mirror (http://apache.seekmeup.com/apache/maven-repository/),
        acegi-snapshot (http://acegisecurity.sourceforge.net...ory/snapshots),
        playboy.mirror (http://mirrors.playboy.com/apache/maven-repository/)
        Path to dependency:
        1) org.acegisecurity:acegi-security:jar:1.0.0-SNAPSHOT
        2) org.apache.directory.server:apacheds-core:jar:1.0-RC1
        3) jdbm:jdbm:jar:1.0



        Caused by I/O exception: Connection timed out: connect

        [INFO] ------------------------------------------------------------------------
        [INFO] For more information, run Maven with the -e switch
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 2 minutes 36 seconds
        [INFO] Finished at: Sat May 20 19:58:51 CEST 2006
        [INFO] Final Memory: 5M/10M
        [INFO] ------------------------------------------------------------------------


        I suspect a subtle developer joke here (http://mirrors.playboy.com/apache/maven-repository...) hem... well, ok

        So here I am, stuck again.

        Yes, I know I could download the nightly snapshots, but you know, I'd really like to be able to build the thing myself. As publicized by acegi, this is one of the advantages of opensource, particularly when it comes to security.

        Thank you for the hint on mvn!

        Candide

        Comment


        • #5
          Looks like a straightforward failure to dowload the jdbm dependency (which is used by apache-ds for the ldap tests). I've had this kind of probelm before and solved it by just repeatedly running the build until I had all the necessary depndencies in my local repo.

          I've wondered about the playboy.com thing myself....

          Comment


          • #6
            Playboy got turned down by Eclipse for mirroring (http://blogs.zdnet.com/Burnette/wp-m...hp?p=24&more=1) but I guess they have a Maven repository mirror

            Comment


            • #7
              playboy still down

              OK, like you recommended I have been very patient, and tried repeatedly to have the build continue, until all dependencies are downloaded.

              But that didn't help at all until now.

              I know I could probably work around this problem, but IMHO I think it's important that this open source project secures a coherent build process...

              The description of the problem is still valid, and dates from my last post...

              Comment


              • #8
                We do have a "coherent build system" as is indicated by the fact that the authmated build runs on my server twice a day and produces the acegisecurity.org web site, as well as the binary and source archive uploads.

                If you need more than that then you'll have to be prepared to get to grips with maven, daunting as that may be - or you could just compile the source in eclipse or intellij, for example, to produce a usable jar.

                The output below seems fairly clear - it can't transfer jdbm jar from the Url


                http://mirrors.playboy.com/apache/ma...0/jdbm-1.0.jar


                Caused by I/O exception: Connection timed out: connect

                Have you:

                a) Checked that playboy.com isn't blocked by your firewall
                b) Tried downloading the file manually from the supplied url and copying it to your local maven repository

                Comment


                • #9
                  more errors

                  OK I downloaded the missing jars.

                  I've got more: that one really puzzles me:

                  [INFO] [surefire:test]
                  [INFO] Surefire report directory: C:\dev\my-workspace\acegisecurity\core\target\
                  surefire-reports
                  Working directory is C:\DOCUME~1\Candide\LOCALS~1\Temp\apacheds-work
                  org.apache.maven.surefire.booter.SurefireExecution Exception: org.acegisecurity.l
                  dap.DefaultInitialDirContextFactoryTests; nested exception is java.lang.Exceptio
                  nInInitializerError: null; nested exception is org.apache.maven.surefire.testset
                  .TestSetFailedException: org.acegisecurity.ldap.DefaultInitialDirContextFac toryT
                  ests; nested exception is java.lang.ExceptionInInitializerError: null
                  org.apache.maven.surefire.testset.TestSetFailedExc eption: org.acegisecurity.ldap
                  .DefaultInitialDirContextFactoryTests; nested exception is java.lang.ExceptionIn
                  InitializerError: null
                  java.lang.ExceptionInInitializerError
                  at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)

                  at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstruct
                  orAccessorImpl.java:39)
                  at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingC
                  onstructorAccessorImpl.java:27)
                  at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
                  at junit.framework.TestSuite.createTest(TestSuite.jav a:131)
                  at junit.framework.TestSuite.addTestMethod(TestSuite. java:114)
                  at junit.framework.TestSuite.<init>(TestSuite.java:75 )
                  at sun.reflect.GeneratedConstructorAccessor1.newInsta nce(Unknown Source)

                  at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingC
                  onstructorAccessorImpl.java:27)
                  at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
                  at org.apache.maven.surefire.junit.JUnitTestSet.const ructTestObject(JUni
                  tTestSet.java:148)
                  at org.apache.maven.surefire.junit.JUnitTestSet.getTe stCount(JUnitTestSe
                  t.java:244)
                  at org.apache.maven.surefire.suite.AbstractDirectoryT estSuite.locateTest
                  Sets(AbstractDirectoryTestSuite.java:101)
                  at org.apache.maven.surefire.Surefire.createSuiteFrom Definition(Surefire
                  .java:147)
                  at org.apache.maven.surefire.Surefire.run(Surefire.ja va:108)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.apache.maven.surefire.booter.SurefireBooter.ru nSuitesInProcess(Su
                  refireBooter.java:225)
                  at org.apache.maven.surefire.booter.SurefireBooter.ma in(SurefireBooter.j
                  ava:747)
                  Caused by: jdbm.helper.WrappedRuntimeException: org.apache.ldap.server.partition
                  .impl.btree.jdbm.JdbmMasterTable$1
                  at jdbm.helper.DefaultSerializer.deserialize(DefaultS erializer.java:99)
                  at jdbm.recman.BaseRecordManager.fetch(BaseRecordMana ger.java:341)
                  at jdbm.recman.CacheRecordManager.fetch(CacheRecordMa nager.java:263)
                  at jdbm.recman.CacheRecordManager.fetch(CacheRecordMa nager.java:242)
                  at jdbm.btree.BTree.load(BTree.java:276)
                  at org.apache.directory.server.core.partition.impl.bt ree.jdbm.JdbmTable.
                  <init>(JdbmTable.java:119)
                  at org.apache.directory.server.core.partition.impl.bt ree.jdbm.JdbmTable.
                  <init>(JdbmTable.java:152)
                  at org.apache.directory.server.core.partition.impl.bt ree.jdbm.JdbmMaster
                  Table.<init>(JdbmMasterTable.java:76)
                  at org.apache.directory.server.core.partition.impl.bt ree.jdbm.JdbmDirect
                  oryPartition.init(JdbmDirectoryPartition.java:149)
                  at org.apache.directory.server.core.partition.Default DirectoryPartitionN
                  exus.initializeSystemPartition(DefaultDirectoryPar titionNexus.java:261)
                  at org.apache.directory.server.core.partition.Default DirectoryPartitionN
                  exus.init(DefaultDirectoryPartitionNexus.java:188)
                  at org.apache.directory.server.core.DefaultDirectoryS ervice.initialize(D
                  efaultDirectoryService.java:849)
                  at org.apache.directory.server.core.DefaultDirectoryS ervice.startup(Defa
                  ultDirectoryService.java:226)
                  at org.apache.directory.server.core.jndi.AbstractCont extFactory.getIniti
                  alContext(AbstractContextFactory.java:103)
                  at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:6
                  67)
                  at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:247
                  )
                  at javax.naming.InitialContext.init(InitialContext.ja va:223)
                  at javax.naming.InitialContext.<init>(InitialContext. java:197)
                  at javax.naming.directory.InitialDirContext.<init>(In itialDirContext.jav
                  a:82)
                  at org.acegisecurity.ldap.LdapTestServer.startLdapSer ver(LdapTestServer.
                  java:89)
                  at org.acegisecurity.ldap.LdapTestServer.<init>(LdapT estServer.java:64)
                  at org.acegisecurity.ldap.AbstractLdapServerTestCase. <clinit>(AbstractLd
                  apServerTestCase.java:40)
                  ... 21 more
                  [INFO] ------------------------------------------------------------------------
                  [ERROR] BUILD FAILURE
                  [INFO] ------------------------------------------------------------------------
                  [INFO] There are test failures.
                  [INFO] ------------------------------------------------------------------------
                  [INFO] Trace
                  org.apache.maven.BuildFailureException: There are test failures.
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoals(Defa
                  ultLifecycleExecutor.java:555)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalWithLi
                  fecycle(DefaultLifecycleExecutor.java:475)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoal(Defau
                  ltLifecycleExecutor.java:454)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalAndHan
                  dleFailures(DefaultLifecycleExecutor.java:306)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeTaskSegmen
                  ts(DefaultLifecycleExecutor.java:273)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.execute(DefaultLi
                  fecycleExecutor.java:140)
                  at org.apache.maven.DefaultMaven.doExecute(DefaultMav en.java:322)
                  at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:115)
                  at org.apache.maven.cli.MavenCli.main(MavenCli.java:2 56)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.codehaus.classworlds.Launcher.launchEnhanced(L auncher.java:315)
                  at org.codehaus.classworlds.Launcher.launch(Launcher. java:255)
                  at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430)

                  at org.codehaus.classworlds.Launcher.main(Launcher.ja va:375)
                  Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures
                  .
                  at org.apache.maven.plugin.surefire.SurefirePlugin.ex ecute(SurefirePlugi
                  n.java:403)
                  at org.apache.maven.plugin.DefaultPluginManager.execu teMojo(DefaultPlugi
                  nManager.java:412)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoals(Defa
                  ultLifecycleExecutor.java:534)
                  ... 16 more
                  [INFO] ------------------------------------------------------------------------
                  [INFO] Total time: 4 seconds
                  [INFO] Finished at: Tue May 23 19:09:49 CEST 2006
                  [INFO] Final Memory: 5M/10M
                  [INFO] ------------------------------------------------------------------------



                  Sorry to ask again... this is the last time. After that, I'll stick to the binaries, promised. Sorry for being rude about the "consistent build system" thing. I'm sure the system is "consistent". Only it is not user-friendly, to say the least.

                  Comment


                  • #10
                    Originally posted by ckemmler
                    I had to manually download jta-1.0.1B
                    See Guide to Coping with Sun JARs

                    Originally posted by ckemmler
                    I'd really like to be able to build the thing myself.
                    And so you should.

                    Originally posted by ckemmler
                    As publicized by acegi, this is one of the advantages of opensource, particularly when it comes to security.
                    Exactly. Every person who can build the system becomes another developer.

                    Originally posted by Luke
                    I've had this kind of probelm before and solved it by just repeatedly running the build until I had all the necessary depndencies in my local repo.
                    This didn't work for me. I'm on cable, have tried the build multiple times over several days from different locations, but I ended up having to download about 10 JARs manually myself.

                    I tried setting up mirrors (http://maven.apache.org/guides/mini/...-settings.html) that I knew had the JARs.

                    Originally posted by Luke
                    We do have a "coherent build system"
                    I'm sure it is, but it would be nice if other potential developers could get started more easily. For example, I can build and test Spring from CVS with little trouble.

                    Originally posted by ckemmler
                    Sorry to ask again... this is the last time. After that, I'll stick to the binaries, promised.
                    Don't be sorry. Keep trying. All contribution helps. You've highlighted a problem that others may experience. The problem seems to lie in Maven2 however, so Luke is right when saying you have to come to grips with that. Maven is the future and will only improve with time.


                    I got through the JAR downloading, with some hassle, but now get:
                    Code:
                    2006-05-30 10:25:48,781 DEBUG org.acegisecurity.acl.basic.AbstractBasicAclEntry- Valid permission:   -RWCD ...........................1111. (30)
                    Working directory is c:\DOCUME~1\USER\LOCALS~1\Temp\apacheds-work
                    java.lang.reflect.InvocationTargetException
                            at sun.reflect.GeneratedConstructorAccessor12.newInstance(Unknown Source)
                            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                            at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
                            at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:145)
                            at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
                            at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
                            at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
                            at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
                            at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                            ....
                    Caused by: jdbm.helper.WrappedRuntimeException: org.apache.ldap.server.partition.impl.btree.jdbm.JdbmMasterTable$1
                            at jdbm.helper.DefaultSerializer.deserialize(DefaultSerializer.java:99)
                            at jdbm.recman.BaseRecordManager.fetch(BaseRecordManager.java:341)
                            at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:263)
                            at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:242)
                            at jdbm.btree.BTree.load(BTree.java:276)
                            at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.<init>(JdbmTable.java:119)
                            at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.<init>(JdbmTable.java:152)
                            at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmMasterTable.<init>(JdbmMasterTable.java:76)
                            at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmDirectoryPartition.init(JdbmDirectoryPartition.java:149)
                            at org.apache.directory.server.core.partition.DefaultDirectoryPartitionNexus.initializeSystemPartition(DefaultDirectoryPartitionNexus.java:261)
                            at org.apache.directory.server.core.partition.DefaultDirectoryPartitionNexus.init(DefaultDirectoryPartitionNexus.java:188)
                            at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:849)
                            at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:226)
                            at org.apache.directory.server.core.jndi.AbstractContextFactory.getInitialContext(AbstractContextFactory.java:103)
                            at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
                            at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
                            at javax.naming.InitialContext.init(InitialContext.java:223)
                            at javax.naming.InitialContext.<init>(InitialContext.java:197)
                            at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
                            at org.acegisecurity.ldap.LdapTestServer.startLdapServer(LdapTestServer.java:226)
                            at org.acegisecurity.ldap.LdapTestServer.<init>(LdapTestServer.java:62)
                            at org.acegisecurity.ldap.AbstractLdapServerTestCase.<clinit>(AbstractLdapServerTestCase.java:45)
                    Luke, I'm trying this on Win32 - do you build on multiple platforms? Gotten this error before?
                    Last edited by katentim; May 29th, 2006, 09:04 PM.

                    Comment


                    • #11
                      This is a problem with the test Ldap DB becoming corrupted or incompatible with different versions. Dust delete the contents of the temp/apache-ds directory. At some point I will try to change the code to write it relative to the build directory.

                      I have improved my maven download success rate by locally adding http://www.ibiblio.org/maven2 as a specific repository in the pom.xml file. This prevents it trying falky mirrors such as playboy.com.

                      Comment

                      Working...
                      X