Menu

Maven?

2013-11-17
2019-08-30
1 2 > >> (Page 1 of 2)
  • Stefan Ferstl

    Stefan Ferstl - 2013-11-17

    Hi

    Have you ever considered putting JRecord to Maven Central
    (http://maven.org)? It would be much more convenient for projects that
    use Maven or Gradle as build tool.

    Cheers,
    Stefan

     
  • Bruce Martin

    Bruce Martin - 2013-11-20

    Sorry for the delay responding, I have been doing some investigation on what is involved (I do not currently use Maven (probably past time I started)). From what I can tell I should also add cb2xml to maven.

    Work required

    • Do a new release of cb2xml which incorperates my changes. This will involve setting up Tests for the parts of cb2xml I do not use.
    • Add cb2xml to maven
    • Add JRecord to maven

    Given that

    • I am about to head off on an extended holiday
    • I have work on other projects to do

    It will be a while before it gets added to the maven repositiry

     
  • Brian Reynolds

    Brian Reynolds - 2015-09-30

    Bruce,

    Did you ever get around to doing this? I guess not, since I just did an svn checkout of cb2xml-SVN and I haven't found any pom.xml files.

    So I've created one, and attached it here. I haven't imposed any new directory structures, so it works out of the box with the cb2xml-SVN checkout. The only thing that I had to change to get the tests to pass is rename

    target/test-classes/common/xmlCopybook/xmlCpyBitOfEverything.xml

    to

    target/test-classes/common/xmlCopybook/xmlCpyBitOfEverything.Xml

    The proper fix would be to rename this file in the cb2xml_tests/src/common/xmlCopybook/ directory.

    pom.xml attached. It should be dropped into cb2xml-SVN/source/cb2xml/ directory.

    I haven't included anytyhing (yet) that will faciliate publishing to maven central

     
  • Bruce Martin

    Bruce Martin - 2015-09-30

    No I had a look at was involved before my holiday and have not got back to it since.

    1. I presume the version on line 5 of the pom should be 95.2 and not 92.2 ???
    2. The pom should go in the source directory ???

    anyway that is where I added it:

    https://sourceforge.net/p/cb2xml/SVN/HEAD/tree/source/

     
  • Brian Reynolds

    Brian Reynolds - 2015-10-12
    1. Yes - my mistake
    2. In my experience it's good practice to have a parent pom to represent the overall project and then "child" poms for individual modules. In this case, we only really have one module (cb2xml), and I had broken my own rules (!) by creating only the child pom. So it should be committed at the source/cb2xml level. But before you do that - let me adhere to best practice and create a parent/child pom combination.
     
  • Brian Reynolds

    Brian Reynolds - 2015-10-12

    2 new files attached. Please rename both to "pom.xml"

    parent-pom.xml : Please add to the source directory
    cb2xml-pom.xml: Please add to the source/cb2xml directory

     
    • Bruce Martin

      Bruce Martin - 2015-10-12

      Appologies for my ignorance, Should I rename both files to pom.xml in there respecitive directory.

       
      • Brian Reynolds

        Brian Reynolds - 2015-10-13

        Yes, exactly. Diff attached just in case.

         
  • Brian Reynolds

    Brian Reynolds - 2015-10-12

    I have attached a diff which allows JRecord to be built with maven. A few things to note:

    • I have run "mvn install" in the "cb2xml-SVN/source/cb2xml" directory to put my built cb2xml in my local repository. This step is dependent on the files in my previous post. Therefore the parent pom contains a dependency for "cb2xml_src".
    • I have defaulted to java source level 1.7
    • While "mvn test" will attempt to run tests, a lot are failing on my machine. There seems to be quite a lot of hardcoded paths in the source.
     
    • Bruce Martin

      Bruce Martin - 2015-10-13

      The vast majority use the class TstConstants (package: net.sf.JRecord.zTest.Common).

      One solution would be setup SampleFile, Copybook/Cobol, Copybook/Xml directories under common direcory and calculate the constants in TstConstants

       
    • Bruce Martin

      Bruce Martin - 2015-10-13

      I have updated subversion with this patch and my changes (0.80.8g).

      My changes:

      • RecordException is now a run time expception
      • Enhanced Cobol <--> Xml programs
      • Changes related to CodeGen
       
  • Bruce Martin

    Bruce Martin - 2015-10-15

    Current State of play:

    cb2xml

    • update with pom files
    • my latest changes applied, these include
      • Support for comp/comp-3 etc at group level
      • updates to examples
      • Will create a cb2xml_Jaxb jar (so splitting the pom was a good mov e)

    JRecord

    • pom files added
    • Updated with my latest Code (includes Cobol <--> Xml).
    • I have moved all the Test data files / cobol copybooks into the source directory.
      This should allow Tests to be run without missing files
     
  • Brian Reynolds

    Brian Reynolds - 2015-10-23

    Latest changes attached. I have removed the version variables in the poms, it was obviously too bleeding edge for eclipse (kepler) to figure out. Otherwise, the checkout couldn't be automatically imported into eclipse as maven project. But these can be easily all bumped when it comes to release time with for example

    mvn versions:set -DnewVersion=0.80.8h
    

    I've also ensured files required for testing are being copied to the target correctly. It brings the test pass rate to 91.556%. On first glance, most of the others seem to be related to file encoding. Report ("mvn surefire-report:report") is also attached

     
  • Bruce Martin

    Bruce Martin - 2015-10-23

    I have applied the changes to Subversion.

    Also there are changes that have Hopefuly fixed some of the Failures

     
  • Brian Reynolds

    Brian Reynolds - 2015-10-27

    Getting these errors after latest update.

    [ERROR] /C:/Users/bre/svndev/jrecord-code/jrecord/Source/JRecord_Cbl2Xml/src/net/sf/JRecord/cbl2xml/zTest/xml2cbl/occursDepending/TstReadingWriting1.java:[57,45] cannot find symbol
      symbol:   method generateSalesLine(net.sf.JRecord.Details.AbstractLine,int,int,boolean)
      location: class net.sf.JRecord.zTest.Cobol.occursDependingOn.Code
    [ERROR] /C:/Users/bre/svndev/jrecord-code/jrecord/Source/JRecord_Cbl2Xml/src/net/sf/JRecord/cbl2xml/zTest/xml2cbl/occursDepending/TstReadingWriting1.java:[102,37] cannot find symbol
      symbol:   method checkSalesRecord(net.sf.JRecord.Details.AbstractLine,int,int,boolean)
    
     

    Last edit: Brian Reynolds 2015-10-27
  • Bruce Martin

    Bruce Martin - 2015-10-27

    What I have done is use one of the JRecord-Test classes in the cbl2xml test classes. Which is causing the problem

     
  • Bruce Martin

    Bruce Martin - 2015-10-27

    I have copies relavent class + copybooks to cbl2xml test are, so should work now

     
  • Brian Reynolds

    Brian Reynolds - 2015-10-28

    Looks good, thanks.

     
  • Darius

    Darius - 2019-02-14

    Hi, Searching Maven Central (https://search.maven.org/) I don't see JRecord there, but from the discussion above it sounds like you'd done that at some point.
    Any thoughts on putting newly released versions on Maven Central ?
    Having them there makes it super easy for anyone to point to them, pick up newer versions, and so on.

     
  • Bruce Martin

    Bruce Martin - 2019-02-15

    I am not commited to staying with SVN. I have been thinking about switching to GIT.

    Looks like I better get serious about the switch.

     
  • Darius

    Darius - 2019-02-15

    The good thing about sites like Github, is not just that they're built on top of Git, but also that they make contributions easy. Other people can fork a repo, make changes and then submit pull-requests back to the main repo, for approval.

    Since you're the main (maybe only?) developer, the key question would be your own comfort level with using Git as a repo, and also whether the development tools you use would support it well.

    It may be possible to get people to help make the move, and get things set up somewhere like Github. To move the repository itself should not be a big deal. I'd be willing to help. But, there's also the documentation that you have here on Sourceforge, and the Issue-tracker.

    From what I've seen on other projects, I would suggest not dragging out a move, if you decide to make one. That leaves two things that need to be updated and get out of sync.

    My suggestion would be that your own comfort-level with having this on Git would be the important starting point. Maybe a first step would be to put it on Git within Sourceforge itself and seeing if that works for you. If it does, then the actual technicalities of moving will not be too tough/

     
    • Bruce Martin

      Bruce Martin - 2019-03-03

      I have moved the source to GitHub

      I can already see there would be some advanges in splitting the JRecord source into seperate projects (e.g. JRecord_Common is shared with the RecordEditor).

      Any way I will leave the github setup asis and play with it. When I better understand Git I may change things in Git.

      I will put out new minorSourceforge releases for cb2xml and JRecord shortly

       

      Last edit: Bruce Martin 2019-03-04
  • Darius

    Darius - 2019-03-03

    That's very cool. If you're not used to Git, it can feel a bit odd for the first few months. But, sounds like you still have your IDE hooked up to Sourceforge's SVN for now?

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.