Menu

Maven error compiling CZT 1.5

Help
2009-03-14
2013-03-06
  • JohnJackson

    JohnJackson - 2009-03-14

    Hi, I'm trying to compile CZT 1.5 from source in order to use the jEdit plugin. I get an error with maven though:

    [INFO] Failed to resolve artifact.

    Missing:
    ----------
    1) net.sourceforge.czt:util:jar:1.5-SNAPSHOT

      Try downloading the file manually from the project website.

      Then, install it using the command:
          mvn install:install-file -DgroupId=net.sourceforge.czt -DartifactId=util -Dversion=1.5-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

      Alternatively, if you host your own repository you can deploy the file there:
          mvn deploy:deploy-file -DgroupId=net.sourceforge.czt -DartifactId=util -Dversion=1.5-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

      Path to dependency:
          1) net.sourceforge.czt:jaxb:jar:1.5
          2) net.sourceforge.czt:util:jar:1.5-SNAPSHOT

    ----------
    1 required artifact is missing.

    for artifact:
      net.sourceforge.czt:jaxb:jar:1.5

    from the specified remote repositories:
      czt (http://czt.sourceforge.net/maven/repository),
      central (http://repo1.maven.org/maven2)

    I am not familiar with maven and am unable to get past this point, can anyone help? Thanks.

     
    • JohnJackson

      JohnJackson - 2009-03-15

      I have managed to check out the trunk from subversion and compile that fine, so I am not sure where the problem lies.

       
    • Pedro Aragão Henriques

      I have the same problem :(

      I use the maven 2.1.0, but I also tried install with maven 2.0.9.

       
      • JohnJackson

        JohnJackson - 2009-04-21

        You're probably best off getting the latest source code from the Subversion repository, use the following command:

        svn co https://czt.svn.sourceforge.net/svnroot/czt/trunk czt

        See http://sourceforge.net/scm/?type=svn&group_id=86250

         
        • Petra Malik

          Petra Malik - 2009-04-21

          I managed to get it compiling by removing all occurrences of "-SNAPSHOT" from  czt_1_5_0/pom.xml (2 occurrences) and czt_1_5_0/jedit/zeves/pom.xml (1occurrence).

          Cheers,
          Petra

           
    • Marc Gorzala

      Marc Gorzala - 2009-06-03

      I have also the problems the other users have here. Using the trunk, doesn't seem for me to be a good idea, as I am more interessted in something more reliable as the trunk :)

      Also twisting the pom, sounds like a hack.

      Is there a straightforward way to build a 1.5 Version of CZT?

      The binary-Version seems to be no option for me as I want to install the jedit-Plugin and I don't know how to do this with the downloadable binary Version.

      Cheers
      Marc

       
  • Peter C. Chapin

    Peter C. Chapin - 2010-06-07

    Hello. I'm also interested in using the jEdit plug-in (and perhaps the other tools as well). I'm trying to compile the source from Subversion (revision 7260). However, I'm getting a build failure like this:

    Failed to resolve artifact.                                                               

    Missing:

    1) net.sourceforge.czt:typechecker:test-jar:tests:1.6-SNAPSHOT

    As reported earlier in this thread when I attempt to build the released 1.5 source I get a similar sort of error (the same one reported above). I also notice that some tests fail for me. I attempted to move past the testing problem temporarily by redoing the build without testing.

    I'm not against using the lastest revision from Subversion. Is this project still being actively developed? Is this problem with revision 7260 a temporary issue, an issue on my end, or a show stopper? :)

    Note that I'm using Maven 2.2.1 with Java 1.6.0_20

     
  • Petra Malik

    Petra Malik - 2010-06-07

    Yes, CZT is being maintained actively.
    I am using Apache Maven 2.2.1, Java version: 1.6.0_13 and everything seems to work fine for me so I can't really help without knowing more details about your problem.  Which tests fail?  Which subproject reports that the typechecker:test-jar:tests artifact is missing?  What's the command you called in the first place?

    Cheers,
    Petra

     
  • Peter C. Chapin

    Peter C. Chapin - 2010-06-09

    Hi Petra! Thanks for your note. I'm glad CZT is being actively maintained. I wasn't sure because there isn't much recent activity on this forum. Should I be using a different forum instead?

    Anyway, as I said I'm using Maven 2.2.1, Java 1.6.0_20. I'm using the CZT subversion sources at revision 7260. I'm on OpenSUSE Linux 11.1 (32 bit). When I do

    mvn clean install

    I get a test failure in the CoreJava subproject. Here is some more context on that:


    T E S T S

    Running net.sourceforge.czt.circus.jaxb.JaxbXmlWriterReaderTest
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.604 sec
    Running net.sourceforge.czt.z.impl.AstTest
    Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec
    Running net.sourceforge.czt.circuspatt.impl.MockActionLawsTest
    Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 sec
    Running net.sourceforge.czt.z.jaxb.JaxbXmlWriterReaderTest
    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.87 sec <<< FAILURE!
    Running net.sourceforge.czt.z.util.OperatorNameTest
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec

    Results :

    Tests in error:
      testWritingReading(net.sourceforge.czt.z.jaxb.JaxbXmlWriterReaderTest)

    So I thought, "Ok, well I'll skip the tests for now and see how that goes." I ran

    mvn -Dmaven.test.skip=true clean install

    This fails while building the Rules subproject. In that case I get

    ------------------------------------------------                  
    BUILD ERROR                                                                              
    ------------------------------------------------                  
    Failed to resolve artifact.                                                               

    Missing:

    1) net.sourceforge.czt:typechecker:test-jar:tests:1.6-SNAPSHOT

      Try downloading the file manually from the project website.

    Maven invites me to use the -e switch for more information. I'm not very familiar with Maven but I see that -e has something to do with producing error messages. I tried

    mvn -Dmaven.test.skip=true -e install

    This seemed to have produced a bunch of exception tracebacks. I'm not sure what they mean but I have a feeling they aren't too helpful. I can past them here if you would like, though.

    Thanks for any advice you can give!

     
  • Petra Malik

    Petra Malik - 2010-06-11

    Most people use the mailing lists rather than the forum.

    I managed to reproduce your "Failed to resolve artifact." problem.
    The option "-Dmaven.test.skip=true" prevents compiling tests but maven still checks whether the dependencies exist even though it doesn't need them (and I don't know how to fix that).  Try using "-DskipTests" instead, which still compiles the tests but doesn't run them.

    Anyway, we should actually try to find out why a test of yours if failing in the first place (It shouldn't!)
    Could you please rerun the test and check the target/surefire-reports directory whether you can find a report that explains why the test fails?

     
  • Peter C. Chapin

    Peter C. Chapin - 2010-06-16

    Sorry about the delay getting back to you; this week has been a busy one for me. Thanks for the hint about the mailing list. I'm always a bit reluctant to subscribe to a mailing list just to ask one question and before I know if I'm even going to be a user.

    Anyway, here is the juicy part of the failing test:


    Test set: net.sourceforge.czt.z.jaxb.JaxbXmlWriterReaderTest

    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.009 sec <<< FAILURE!
    testWritingReading(net.sourceforge.czt.z.jaxb.JaxbXmlWriterReaderTest)  Time elapsed: 1.006 sec  <
    << ERROR!
    net.sourceforge.czt.base.util.UnmarshalException: javax.xml.bind.UnmarshalException
    - with linked exception:
    [org.xml.sax.SAXParseException: cvc-complex-type.2.4.d: Invalid content was found starting with el
    ement 'AndPred'. No child element '{"http://czt.sourceforge.net/zml":Pred}' is expected at this point.]
            at net.sourceforge.czt.base.jaxb.JaxbXmlReader.read(JaxbXmlReader.java:97)
            at net.sourceforge.czt.base.util.XmlWriterReaderTest.testWritingReading(XmlWriterReaderTes
    t.java:71)

    The traceback continues; if you need the whole thing I can post that as well. Recall that I'm using Java 1.6.0_20.

    Thanks for any insight you can provide!

     
  • Petra Malik

    Petra Malik - 2010-06-17

    Thanks for the information.

    I hope it is fixed now.  Just do a "cvs update" and try again.

    Petra

     
  • Peter C. Chapin

    Peter C. Chapin - 2010-06-17

    Thanks! That appears to have done the trick. I now get a successful build+test.

     

Log in to post a comment.