Menu

maven build error, any idea

Josh James
2008-06-05
2013-05-29
  • Josh James

    Josh James - 2008-06-05

    Hi.  I downloaded maven 2.09, JDK 1.5 update 15, and the JUNG project from CVS. I want to test one of the potential fixes you indicated may be there since JUNG 2 alpha 1 release. 

    I also downloaded the collections jar based on the readme that is at http://sourceforge.net/project/shwofiles.php?group_id=139125. After that, I ran the command to place the jar file in the local repository and it indicates success. 

    I am attempting to run the mvn install command and experiencing a problem related to the collections jar file.  Here is a log showing the file being added and then the install error.  Any suggestions?

    C:\JUNGWorkspace\JUNG_CVS_EXPORT>mvn install:install-file -DgroupId=collections-
    generic -DartifactId=collections-generic -Dversion=4.01 -Dpackaging=jar -Dfile=C
    :/collections-generic-4.01/collections-generic-4.01.jar
    [INFO] Scanning for projects...
    [INFO] Reactor build order:
    [INFO]   jung2
    [INFO]   jung-api
    [INFO]   jung-graph-impl
    [INFO]   jung-algorithms
    [INFO]   jung-visualization
    [INFO]   jung-io
    [INFO]   jung-samples
    [INFO] Searching repository for plugin with prefix: 'install'.
    [INFO] ------------------------------------------------------------------------
    [INFO] Building jung2
    [INFO]    task-segment: [install:install-file] (aggregator-style)
    [INFO] ------------------------------------------------------------------------
    [INFO] [install:install-file]
    [INFO] Installing C:\collections-generic-4.01\collections-generic-4.01.jar to C:
    \Documents and Settings\jjames\.m2\repository\collections-generic\collections-ge
    neric\4.01\collections-generic-4.01.jar
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1 second
    [INFO] Finished at: Thu Jun 05 12:09:50 EDT 2008
    [INFO] Final Memory: 3M/6M
    [INFO] ------------------------------------------------------------------------

    C:\JUNGWorkspace\JUNG_CVS_EXPORT>mvn install
    [INFO] Scanning for projects...
    [INFO] Reactor build order:
    [INFO]   jung2
    [INFO]   jung-api
    [INFO]   jung-graph-impl
    [INFO]   jung-algorithms
    [INFO]   jung-visualization
    [INFO]   jung-io
    [INFO]   jung-samples
    [INFO] ------------------------------------------------------------------------
    [INFO] Building jung2
    [INFO]    task-segment: [install]
    [INFO] ------------------------------------------------------------------------
    [INFO] [site:attach-descriptor]
    [INFO] [install:install]
    [INFO] Installing C:\JUNGWorkspace\JUNG_CVS_EXPORT\pom.xml to C:\Documents and S
    ettings\jjames\.m2\repository\jung\app\app\2.0-alpha3-SNAPSHOT\app-2.0-alpha3-SN
    APSHOT.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] Building jung-api
    [INFO]    task-segment: [install]
    [INFO] ------------------------------------------------------------------------
    [INFO] [resources:resources]
    [INFO] Using default encoding to copy filtered resources.
    [INFO] [compiler:compile]
    Compiling 20 source files to C:\JUNGWorkspace\JUNG_CVS_EXPORT\jung-api\target\cl
    asses
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Compilation failure

    C:\JUNGWorkspace\JUNG_CVS_EXPORT\jung-api\src\main\java\edu\uci\ics\jung\graph\K
    PartiteGraph.java:[16,40] package org.apache.commons.collections15 does not exis
    t

    C:\JUNGWorkspace\JUNG_CVS_EXPORT\jung-api\src\main\java\edu\uci\ics\jung\graph\K
    PartiteGraph.java:[32,37] cannot find symbol
    symbol  : class Predicate
    location: interface edu.uci.ics.jung.graph.KPartiteGraph<V,E>

    C:\JUNGWorkspace\JUNG_CVS_EXPORT\jung-api\src\main\java\edu\uci\ics\jung\graph\K
    PartiteGraph.java:[38,22] cannot find symbol
    symbol  : class Predicate
    location: interface edu.uci.ics.jung.graph.KPartiteGraph<V,E>

    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3 seconds
    [INFO] Finished at: Thu Jun 05 12:09:58 EDT 2008
    [INFO] Final Memory: 8M/16M
    [INFO] ------------------------------------------------------------------------

    C:\JUNGWorkspace\JUNG_CVS_EXPORT>

     
    • Tom Nelson

      Tom Nelson - 2008-06-05

      The groupId for collections-generic is net.sourceforge.collections. That should be used if you install it in your local repo.

      It should be stated that way in all of the pom.xml files where a jung project declares it as a dependency. Did you extract the whole jung2 project from cvs to build?

      Tom Nelson

       
    • Josh James

      Josh James - 2008-06-05

      Tom,

      Thanks for the quick answer. 

      Just to make sure I wasn't crazy, I redownloaded everything for jung2 to a new directory about 5 minutes ago.  I chose to grab evereything from the HEAD using the eclipse cvs project import tool.  I changed the setup as you said to:

      mvn install:install-file -DgroupId=net.sourceforge.collections -DartifactId=collections-generic -Dversion=4.01 -Dpackaging=jar -Dfile=C:/collections-generic-4.01/collections-generic-4.01.jar

      I ran mvn install again and received the exact same error again. If you rerun the command, I am assuming it overwrites the existing value for group ID.

      Any other troubleshooting ideas?

      Thanks,

      Josh

       
      • Joshua O'Madadhain

        Josh:

        I believe that it should no longer be necessary to go and grab the collections-generic stuff separately; it should be automagically imported along with everything else needed to build when you first do mvn install:install.  (It used to be that c-g wasn't in the maven repositories.  If I'm correct and it is now, we should redo the instructions in the top-level README.)

        Or have I misapprehended your problem?  Have you actually tried running any of the JUNG samples?  If you go and look in the repository directory that maven created, do you find the c-g jar?

        Joshua

         
        • Tom Nelson

          Tom Nelson - 2008-06-05

          I see that KPartiteGraph was only added to jung-api 9 days ago. Also, I see that the collections-generic dependency in jung-api/pom.xml is scoped for test only, not for compilation. Its possible that the build is broken. I can't test it now, but later on I will do a clean checkout and see what's up. If the current code was only tested by running it in eclipse, it would not break in the same way as if you build with maven, as eclipse does not differentiate between compile and test time dependencies.

          Tom Nelson

           
      • Tom Nelson

        Tom Nelson - 2008-06-05

        you could also run maven with the -e switch on (per the error) and post that output.

         
        • Josh James

          Josh James - 2008-06-06

          Tom,

          I reran with the -e.  The stacktrace doesn't tell me much, but maybe it means something to you.

          C:\JUNGWorkspace\jung2>mvn -e install
          + Error stacktraces are turned on.
          [INFO] Scanning for projects...
          [INFO] Reactor build order:
          [INFO]   jung2
          [INFO]   jung-api
          [INFO]   jung-graph-impl
          [INFO]   jung-algorithms
          [INFO]   jung-visualization
          [INFO]   jung-io
          [INFO]   jung-samples
          [INFO] ------------------------------------------------------------------------
          [INFO] Building jung2
          [INFO]    task-segment: [install]
          [INFO] ------------------------------------------------------------------------
          [INFO] [site:attach-descriptor]
          [INFO] [install:install]
          [INFO] Installing C:\JUNGWorkspace\jung2\pom.xml to C:\Documents and Settings\jj
          ames\.m2\repository\jung\app\app\2.0-alpha3-SNAPSHOT\app-2.0-alpha3-SNAPSHOT.pom

          [INFO] ------------------------------------------------------------------------
          [INFO] Building jung-api
          [INFO]    task-segment: [install]
          [INFO] ------------------------------------------------------------------------
          [INFO] [resources:resources]
          [INFO] Using default encoding to copy filtered resources.
          [INFO] [compiler:compile]
          Compiling 20 source files to C:\JUNGWorkspace\jung2\jung-api\target\classes
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Compilation failure

          C:\JUNGWorkspace\jung2\jung-api\src\main\java\edu\uci\ics\jung\graph\KPartiteGra
          ph.java:[16,40] package org.apache.commons.collections15 does not exist

          C:\JUNGWorkspace\jung2\jung-api\src\main\java\edu\uci\ics\jung\graph\KPartiteGra
          ph.java:[32,37] cannot find symbol
          symbol  : class Predicate
          location: interface edu.uci.ics.jung.graph.KPartiteGraph<V,E>

          C:\JUNGWorkspace\jung2\jung-api\src\main\java\edu\uci\ics\jung\graph\KPartiteGra
          ph.java:[38,22] cannot find symbol
          symbol  : class Predicate
          location: interface edu.uci.ics.jung.graph.KPartiteGraph<V,E>

          [INFO] ------------------------------------------------------------------------
          [INFO] Trace
          org.apache.maven.BuildFailureException: Compilation failure
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
          ultLifecycleExecutor.java:579)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
          fecycle(DefaultLifecycleExecutor.java:499)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
          ltLifecycleExecutor.java:478)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
          dleFailures(DefaultLifecycleExecutor.java:330)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
          ts(DefaultLifecycleExecutor.java:291)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
          fecycleExecutor.java:142)
                  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
                  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
                  at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
                  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:585)
                  at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.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.java:375)
          Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation fail
          ure
                  at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
          Mojo.java:429)
                  at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:110)
                  at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
          nManager.java:451)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
          ultLifecycleExecutor.java:558)
                  ... 16 more
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 9 seconds
          [INFO] Finished at: Fri Jun 06 08:40:26 EDT 2008
          [INFO] Final Memory: 8M/17M
          [INFO] ------------------------------------------------------------------------

          C:\JUNGWorkspace\jung2>

           
          • Tom Nelson

            Tom Nelson - 2008-06-06

            The build is currently broken. You will need a new version of the jung-api/pom.xml file when it is uploaded and pushed out the the cvs servers.

            I'm really sorry for the inconvenience!

            Tom Nelson

             
    • Josh James

      Josh James - 2008-06-06

      Joshua,

      You noted [mvn install:install].  I have been running [mvn install] based on the readme.  If I run the command you noted, I get the error:

      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] The packaging for this project did not assign a file to the build artifac

      I already had the file in there from my command.  I deleted the file and re-ran [mvn install].  The file was not put in there for me.

      Josh

       
      • Joshua O'Madadhain

        Josh:

        Yeah, 'mvn install:install' was a mistake.  Sorry for the confusion.  Tom is the Maven maven on this project.  :)

        In case anyone cares, what happened is that I added a new interface to jung-api that created a new dependency on collections-generic.  It already sort of had one (which is why it compiled within Eclipse) but from Maven's perspective the dependency was only for the test code, not the actual library.  So I should have told it to change the dependency type, and I failed to do that.

        Joshua

         
    • Josh James

      Josh James - 2008-06-06

      Tom,

      Thanks for the info.  I am familiar with the infamous "the build is broken".  It happens.   Is there a way to know when the CVS has changed (Eg. you fixed it), or do you have to explicity tell us?  If there isn't some way to find it, can you let me know via this post?

      thanks,

      Josh

       
      • Joshua O'Madadhain

        Josh:

        I don't know of any way for you to know when the CVS has changed without attempting to synchronize against it, but Tom might know of a way.

        The fix has been checked in (last night) but sometimes it takes a while for it to be visible to anonymous CVS access, so I'm not sure when you'll be able to see it.  Hopefully by sometime today, at least.

        (Incidentally, I'm the one that broke the build--sorry about that.)

        Joshua

         

Log in to post a comment.