Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By Hategrin

Thread: Build works, then doesn't, then it does, then it doesn't....

  1. #1
    Hategrin is offline Member
    Join Date
    Mar 2014
    Posts
    3
    Rep Power
    0

    Default Build works, then doesn't, then it does, then it doesn't....

    I'm ripping my hair out as we speak. I can't figure out what's going on. The problem started from the begining. I pulled an svn repository, ran "sudo mvn package" and 6/7 of my "projects" built. Then I did "sudo mvn clean package", only 1 built this time. Then "sudo mvn package" again, and all 8 built.

    So I copied the repo to a user under /home. Lets just say /home/user/workspace/sources. I copied the whole .m2/ directory from /root/.m2 to /home/user/.m2. The experience getting it to build in the home directory was much the same. Then I copied the repo to another directory in the same /home environment. Same thing, failed 3 times, 4th time it all built. Running sudo mvn package in eclipse seems to be hit and miss. Sometimes only one "project" will build, sometimes 6/7 will. Sometimes none at all.

    Oh, i forgot to mention I had to "rm -R" my .m2/repository/ directory a few times in each environment. Evidently the smallest internet hickup corrupts Maven's downloads. This is nuts. I want to like Maven, but she's kind of a crazy b*#@. Is this normal Maven behavior or is there something I'm missing.
    Last edited by Hategrin; 03-01-2014 at 03:14 PM.

  2. #2
    Hategrin is offline Member
    Join Date
    Mar 2014
    Posts
    3
    Rep Power
    0

    Default Re: Build works, then doesn't, then it does, then it doesn't....

    Just an update. I'm thinking I might be having some file permission issues. I ran the appriate "chown -R user" command after I coped all the files over, but looking at them with "ls -l", some of them are "stuck" with root ownership. Some of my errors were permission related, so some wackey things might be happening cause of that. Ugh, I just need to bring some sanity to this environment before I start writing code.
    gimbal2 likes this.

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,030
    Rep Power
    6

    Default Re: Build works, then doesn't, then it does, then it doesn't....

    Quote Originally Posted by Hategrin View Post
    Ugh, I just need to bring some sanity to this environment before I start writing code.
    Best conclusion ever. Especially because you by extension stop blaming the tools.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    Hategrin is offline Member
    Join Date
    Mar 2014
    Posts
    3
    Rep Power
    0

    Default Re: Build works, then doesn't, then it does, then it doesn't....

    Issue was dependency related. The projects depend on previously built projects, but they only get recognized (by maven) on re-runs of maven. Odd, but running mvn package 3x in a row builds my project every single time. The build kept failing because I would run mvn clean package before the third run of maven package, which would wipe out whatever dependencies the project needed. This also explains why it was working, then it wasn't, then working again, the times it was working were 3rd 4th 5th etc.. runs of mvn package, the times it wasn't, those were because the build files were "cleaned". Of course it doesn't help that the sources I'm working on were abandoned when Oracle took over Sun and all the documentation is 404 not found.

    It's likely that the pom.xml format has changed and/or the proper build procedures were on one of the dead links of the sourceforge wiki. If only Sun had leveraged Java better and held on for just a few more years, they'd have made a killing off the smartphone revolution, and the sources I'm working on would likely still be in active development.
    Last edited by Hategrin; 03-03-2014 at 11:35 AM.

Similar Threads

  1. chat applications works and doesn't
    By willemjav in forum Networking
    Replies: 9
    Last Post: 09-16-2013, 12:41 PM
  2. import java.util.* doesn't works
    By Martino Milani in forum New To Java
    Replies: 6
    Last Post: 01-24-2012, 02:05 AM
  3. Replies: 5
    Last Post: 06-02-2011, 06:59 AM
  4. Replies: 3
    Last Post: 04-15-2010, 02:41 AM
  5. one works, mine doesn't
    By psychop in forum Java Applets
    Replies: 0
    Last Post: 01-25-2010, 11:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •