Any model/build changes required for CSVParser?

5 views
Skip to first unread message

Joel Hughes

unread,
Dec 11, 2017, 3:15:57 PM12/11/17
to foam-framework-discuss
Hi
Are there any build changes for the recent CSV Parser?  Didn't notice any changes in pom.xml.  
Or are there new model requirements for java compilation?

Thanks
Joel 

Getting the following on every one of my models:

> Task :compileJava
/Users/jhughes/workspace/jbbmobile/repos/sesad/build/src/java/com/serviceecho/model/SObject.java:35: error: cannot find symbol
        return new foam.lib.csv.CSVStringParser();
                               ^
  symbol:   class CSVStringParser
  location: package foam.lib.csv
/Users/jhughes/workspace/jbbmobile/repos/sesad/build/src/java/com/serviceecho/model/SObject.java:94: error: cannot find symbol
        return new foam.lib.csv.CSVStringParser();

// WARNING: GENERATED CODE, DO NOT MODIFY BY HAND!
package com.serviceecho.model;


public class SObject extends foam.core.AbstractFObject {
  public static foam.core.PropertyInfo LABEL = new foam.core.AbstractStringPropertyInfo() {
      public String getName() {
        return "label";
      }
      public Object get(Object o) {
        return get_(o);
      }
      public String get_(Object o) {
        return ((SObject) o).getLabel();
      }
      public void set(Object o, Object value) {
        ((SObject) o).setLabel(cast(value));
      }
      public String cast(Object o) {
        return (String) o;
      }
      public int compare(Object o1, Object o2) {
        return compareValues(get_(o1), get_(o2));
      }
      public int comparePropertyToObject(Object key, Object o) {
        return foam.util.SafetyUtil.compare(cast(key), get_(o));
      }
      public int comparePropertyToValue(Object key, Object value) {
        return foam.util.SafetyUtil.compare(cast(key), cast(value));
      }
      public foam.lib.parse.Parser jsonParser() {
        return new foam.lib.json.StringParser();
      }
      public foam.lib.parse.Parser csvParser() {
        return new foam.lib.csv.CSVStringParser();
      }



Joel Hughes

unread,
Dec 11, 2017, 10:59:31 PM12/11/17
to foam-framework-discuss
Using the maven build process:
cdsrc;./gen.sh; cd ../build; cp ../tools/pom.xml .; mvn compile; mvn package;

the resulting foam-1.0-SNAPSHOT.jar does not contain lib.csv.CSVStringParser. 

Suspect you are deploying something else, perhaps you could let me know. 

Joel

Adam Van Ymeren

unread,
Dec 12, 2017, 2:14:54 PM12/12/17
to Joel Hughes, foam-framework-discuss

CSVStringParser is defined in
src/foam/lib/csv/CSVStringParser.java

It should be put in your build directory when running gen.sh, is that
not happening?

Joel Hughes

unread,
Dec 12, 2017, 2:31:34 PM12/12/17
to foam-framework-discuss
./gen.sh does copy CSVStringParser.java to 
build/foam/lib/csv

after 'mvn compile'  target/foam-1.0-SNAPSHOT/WEB-INF/classes is empty.

Joel

Adam Van Ymeren

unread,
Dec 12, 2017, 2:43:14 PM12/12/17
to Joel Hughes, foam-framework-discuss
Joel Hughes <joel.l...@gmail.com> writes:

> ./gen.sh does copy CSVStringParser.java to
> build/foam/lib/csv
>
> after 'mvn compile' target/foam-1.0-SNAPSHOT/WEB-INF/classes is empty.

Odd, just tried it locally and it works. I'm pushing a cleaned up
gen.sh, it shouldn't fix your issue but pull and try anyways just in
case.

Joel Hughes

unread,
Dec 12, 2017, 2:52:19 PM12/12/17
to Adam Van Ymeren, foam-framework-discuss
pulled, no change. 
Also, ran mvn clean (which I haven't in some time), and all classes are missing, so this is unrelated to CSVStringParser.  Since I didn't run mvn clean it's hard to say when this really started as I was living on an old snapshot.jar file.  Only the addition of CSV to the generated source revealed the build issue.

Joel

Kevin Greer

unread,
Dec 12, 2017, 4:10:40 PM12/12/17
to Joel Hughes, Adam Van Ymeren, foam-framework-discuss
Did you remove you build directory?

--
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joel Hughes

unread,
Dec 12, 2017, 4:14:57 PM12/12/17
to Kevin Greer, Adam Van Ymeren, foam-framework-discuss
No change.

To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsubscri...@googlegroups.com.

Joel Hughes

unread,
Dec 12, 2017, 10:16:10 PM12/12/17
to foam-framework-discuss
Resolved.
It was a bad merge.
Maven pumps out so much crap it's hard to notice when something is a miss. 

Joel
No change.

To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages