Forum Discussion

rpatrick00's avatar
rpatrick00
Contributor
5 years ago

Maven archetype build errors

It seems that the 4.22 archetype is generating code that is failing its own generated unit tests… ☹️

d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack>mvn clean verify
[INFO] Scanning for projects...
[INFO]
[INFO] -----< com.tylertech.courtsandjustice.snaps:odyssey-api-snappack >------
[INFO] Building odyssey-api-snappack 1-0001
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from github_snapv4: https://maven.pkg.github.com/SnapLogic/Snap_v4/net/minidev/json-smart/maven-metadata.xml
Downloading from github_tectonic: https://maven.pkg.github.com/SnapLogic/Tectonic/net/minidev/json-smart/maven-metadata.xml
[WARNING] Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to github_tectonic (https://maven.pkg.github.com/SnapLogic/Tectonic): Authentication failed for https://maven.pkg.github.com/SnapLogic/Tectonic/net/minidev/json-smart/maven-metadata.xml 401 Unauthorized
[WARNING] Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to github_snapv4 (https://maven.pkg.github.com/SnapLogic/Snap_v4): Authentication failed for https://maven.pkg.github.com/SnapLogic/Snap_v4/net/minidev/json-smart/maven-metadata.xml 401 Unauthorized
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ odyssey-api-snappack ---
[INFO] Deleting d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack\target
[INFO]
[INFO] --- properties-maven-plugin:1.0.0:read-project-properties (default) @ odyssey-api-snappack ---
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (generate files) @ odyssey-api-snappack ---
[INFO] Executing tasks

main:
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ odyssey-api-snappack ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ odyssey-api-snappack ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 12 source files to d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack\target\classes
[INFO]
[INFO] --- snappack-installer:4.22.8136:generate-schema (default) @ odyssey-api-snappack ---
[INFO] Found lint com.snaplogic.expression.classes.Date.DATE_PARSE_TS_NON_UTC; ordinal=0
[INFO] Initializing e-lang version: {initTime=2020-08-21T20:49:41.546Z, langVersion=4.0-SNAPSHOT}
[INFO] Found lint com.snaplogic.expression.methods.object.HasOwnProperty.INVALID_VALUE; ordinal=1
[INFO] Found lint com.snaplogic.expression.methods.object.HasOwnProperty.NULL_VALUE; ordinal=2
[INFO] Found lint com.snaplogic.expression.methods.date.DateMethod.INVALID_TZ; ordinal=3
[INFO] Found lint com.snaplogic.expression.methods.date.DateMethod.UNKNOWN_OPTION; ordinal=4
[INFO] Found lint com.snaplogic.expression.methods.date.DateMethod.JSON_FORMAT_ARG; ordinal=5
[INFO] Found lint com.snaplogic.jsonpath.ReadVisitor.REPORT_THROW_ON_BRANCH; ordinal=6
[INFO] Successfully compiled schema: account/com-snaplogic-account-template_2
log4j:WARN No appenders could be found for logger  (org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO] Found lint com.snaplogic.jsonpath.WriteVisitor.SHARED_WRITE; ordinal=7
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ odyssey-api-snappack ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 29 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ odyssey-api-snappack ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 10 source files to d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ odyssey-api-snappack ---
[INFO] Surefire report directory: d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.tylertech.courtsandjustice.snaps.CharacterCounterTest
[main] INFO com.snaplogic.api.Notifications - Found lint  com.snaplogic.expression.classes.Date.DATE_PARSE_TS_NON_UTC; ordinal=0
[main] INFO com.snaplogic.expression.classes.SnapLogicExpressionClass - Initializing e-lang version: {initTime=2020-08-21T20:49:44.997Z, langVersion=4.0-SNAPSHOT}
[main] INFO com.snaplogic.api.Notifications - Found lint com.snaplogic.expression.methods.object.HasOwnProperty.INVALID_VALUE; ordinal=1
[main] INFO com.snaplogic.api.Notifications - Found lint com.snaplogic.expression.methods.object.HasOwnProperty.NULL_VALUE; ordinal=2
[main] INFO com.snaplogic.api.Notifications - Found lint com.snaplogic.expression.methods.date.DateMethod.INVALID_TZ; ordinal=3
[main] INFO com.snaplogic.api.Notifications - Found lint com.snaplogic.expression.methods.date.DateMethod.UNKNOWN_OPTION; ordinal=4
[main] INFO com.snaplogic.api.Notifications - Found lint com.snaplogic.expression.methods.date.DateMethod.JSON_FORMAT_ARG; ordinal=5
[main] INFO com.snaplogic.api.Notifications - Found lint com.snaplogic.jsonpath.ReadVisitor.REPORT_THROW_ON_BRANCH; ordinal=6
[main] INFO com.snaplogic.schema.validator2.ValidatorRegistry - Successfully compiled schema: com-snaplogic-snap-template_2
[main] INFO com.snaplogic.api.Notifications - Found lint com.snaplogic.jsonpath.WriteVisitor.SHARED_WRITE; ordinal=7
[main] INFO com.snaplogic.api.Notifications - Found lint com.snaplogic.document.lineage.SimpleLineageEntry.COPY_ACKED; ordinal=8
[main] INFO com.snaplogic.api.Notifications - Found lint com.snaplogic.document.lineage.SimpleLineageEntry.ACK_COPY; ordinal=9
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.308 sec
Running com.tylertech.courtsandjustice.snaps.CurrencyConverterTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.148 sec
Running com.tylertech.courtsandjustice.snaps.DocConsumerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 sec
Running com.tylertech.courtsandjustice.snaps.DocGeneratorTest
[main] ERROR com.snaplogic.snap.api.ErrorViewsImpl - Error view with behavior continue received a new type of error: reason=Value of count property cannot be negative
com.snaplogic.snap.api.SnapDataException: Invalid count value -2
        at com.tylertech.courtsandjustice.snaps.DocGenerator.execute(DocGenerator.java:75)
        at com.snaplogic.snap.test.harness.TestSetupImpl.tryExecution(TestSetupImpl.java:316)
        at com.snaplogic.snap.test.harness.SnapExecutor.executeTest(SnapExecutor.java:843)
        at com.snaplogic.snap.test.harness.SnapExecutor.evaluate(SnapExecutor.java:640)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at com.snaplogic.snap.test.harness.SnapTestRunner$TestMethodRunner.runChild(SnapTestRunner.java:206)
        at com.snaplogic.snap.test.harness.SnapTestRunner$TestMethodRunner.runChild(SnapTestRunner.java:110)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:27)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Actual output file differs from expected, update by running:
    $ rsync -avz C:\Users\ROBERT~1.PAT\AppData\Local\Temp\data\doc_generator\expected\docGenerator_WithExpectedErrorPath_OutputsErrorDocumentCorrectly-err.json d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack\src\test\resources\data\doc_generator\expected/
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.115 sec <<< FAILURE!

docGenerator_WithExpectedErrorPath_OutputsErrorDocumentCorrectly(com.tylertech.courtsandjustice.snaps.DocGeneratorTest) Time elapsed: 0.028 sec <<< FAILURE!
org.junit.ComparisonFailure: expected:<…valid count value -2"
} ]
}> but was:<…valid count value -2[\r]"
} ]
}>
at com.snaplogic.snap.test.harness.SnapExecutor.evaluate(SnapExecutor.java:716)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at com.snaplogic.snap.test.harness.SnapTestRunner$TestMethodRunner.runChild(SnapTestRunner.java:206)
at com.snaplogic.snap.test.harness.SnapTestRunner$TestMethodRunner.runChild(SnapTestRunner.java:110)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Running com.tylertech.courtsandjustice.snaps.PropertyTypesTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec
Running com.tylertech.courtsandjustice.snaps.SchemaExampleTest
[main] INFO com.snaplogic.snap.test.harness.SnapExecutor$MutableExecutionUtil - Unhandled SnapDataException: SchemaExample: Data map does not contain key:colC
[main] ERROR com.snaplogic.snap.api.ErrorViewsImpl - Error view with behavior continue received a new type of error: reason=null
com.snaplogic.snap.api.SnapDataException: Data map does not contain key:colC
        at com.tylertech.courtsandjustice.snaps.SchemaExample.validate(SchemaExample.java:107)
        at com.tylertech.courtsandjustice.snaps.SchemaExample.process(SchemaExample.java:93)
        at com.snaplogic.snap.api.ExecutionUtil.process(ExecutionUtil.java:106)
        at com.snaplogic.snap.test.harness.SnapExecutor$MutableExecutionUtil.process(SnapExecutor.java:1160)
        at com.snaplogic.snap.api.ExecutionUtil.executeForDocument(ExecutionUtil.java:118)
        at com.snaplogic.snap.api.ExecutionUtil.execute(ExecutionUtil.java:81)
        at com.snaplogic.snap.api.SimpleSnap.execute(SimpleSnap.java:70)
        at com.snaplogic.snap.test.harness.TestSetupImpl.tryExecution(TestSetupImpl.java:316)
        at com.snaplogic.snap.test.harness.SnapExecutor.executeTest(SnapExecutor.java:843)
        at com.snaplogic.snap.test.harness.SnapExecutor.evaluate(SnapExecutor.java:640)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at com.snaplogic.snap.test.harness.SnapTestRunner$TestMethodRunner.runChild(SnapTestRunner.java:206)
        at com.snaplogic.snap.test.harness.SnapTestRunner$TestMethodRunner.runChild(SnapTestRunner.java:110)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:27)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Actual output file differs from expected, update by running:
    $ rsync -avz C:\Users\ROBERT~1.PAT\AppData\Local\Temp\data\schema_example\expected\schemaExample_WithInvalidData_OutputsErrorDocumentOnly-err.json d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack\src\test\resources\data\schema_example\expected/
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.054 sec <<< FAILURE!

schemaExample_WithInvalidData_OutputsErrorDocumentOnly(com.tylertech.courtsandjustice.snaps.SchemaExampleTest) Time elapsed: 0.022 sec <<< FAILURE!
org.junit.ComparisonFailure: expected:<…not contain key:colC"
} ]
}> but was:<…not contain key:colC[\r]"
} ]
}>
at com.snaplogic.snap.test.harness.SnapExecutor.evaluate(SnapExecutor.java:716)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at com.snaplogic.snap.test.harness.SnapTestRunner$TestMethodRunner.runChild(SnapTestRunner.java:206)
at com.snaplogic.snap.test.harness.SnapTestRunner$TestMethodRunner.runChild(SnapTestRunner.java:110)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Running com.tylertech.courtsandjustice.snaps.SingleDocGeneratorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Running com.tylertech.courtsandjustice.snaps.SnapWithAccountTest
[main] INFO com.snaplogic.schema.validator2.ValidatorRegistry - Successfully compiled schema: account/com-snaplogic-account-template_2
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec
Running com.tylertech.courtsandjustice.snaps.SuggestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.037 sec
Running com.tylertech.courtsandjustice.snaps.TwoInputsTwoOutputsTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec

Results :

Failed tests:   docGenerator_WithExpectedErrorPath_OutputsErrorDocumentCorrectly(com.tylertech.courtsandjustice.snaps.DocGeneratorTest): expected:<...valid count value -2[]"(..)
  schemaExample_WithInvalidData_OutputsErrorDocumentOnly(com.tylertech.courtsandjustice.snaps.SchemaExampleTest): expected:<...not contain key:colC[]"(..)

Tests run: 18, Failures: 2, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.460 s
[INFO] Finished at: 2020-08-21T15:49:46-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test     (default-test) on project odyssey-api-snappack: There are test failures.
[ERROR]
[ERROR] Please refer to d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack>

11 Replies

  • Hi @rpatrick00.

    We’ve patched a couple of bugs in the test harness:

    To use the patched version, update these properties in your project’s pom.xml:

    <snaplogic.platform.version>4.22.8138</snaplogic.platform.version>
    <snaplogic.snaps.version>4.22.6586</snaplogic.snaps.version>
    

    I also deployed a minor revision to the maven archetype (4.22.1) which will generate a pom with these updated property values.

    Please note that the build warnings you noted in your last comment here are not fixed yet, but they are also not anything to worry about. They are ugly but innocuous. We’ll be fixing them soon.

  • Hi @rpatrick00. I’m testing the 4.22 archetype right now and those failures are not happening on my system. Note that the stack traces in the output should happen, but those tests are designed to expect those errors, so they should succeed. I’m wondering if this is could be a Windows issue. I’ve been testing on a Mac. Let me take a closer look to see if I can spot what’s happening. Stay tuned.

      • rpatrick00's avatar
        rpatrick00
        Contributor
        d:\src\snaplogic-poc\snap-dev\odyssey-api-snappack>java -version
        openjdk version "1.8.0_212"
        OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
        OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)
        
  • @ptaylor, it certainly appears to be a windows issue. Note the \r in errors:

    docGenerator_WithExpectedErrorPath_OutputsErrorDocumentCorrectly(com.tylertech.courtsandjustice.snaps.DocGeneratorTest) Time elapsed: 0.028 sec <<< FAILURE!
    org.junit.ComparisonFailure: expected:<…valid count value -2"
    } ]
    }> but was:<…valid count value -2[\r]"
    } ]
    }>

    schemaExample_WithInvalidData_OutputsErrorDocumentOnly(com.tylertech.courtsandjustice.snaps.SchemaExampleTest) Time elapsed: 0.022 sec <<< FAILURE!
    org.junit.ComparisonFailure: expected:<…not contain key:colC"
    } ]
    }> but was:<…not contain key:colC[\r]"
    } ]
    }>

  • Exactly. We saw that at the same time. 🙂

    Ok, let me work on that bug in our unit test harness. For now, add an @Ignore to those two tests and let me know if you have any other trouble with the archetype-constructed snap project. At the moment I’m also fixing a maven issue someone else had related to download of transitive dependencies but it looks like you did not encounter those.

  • @ptaylor, I am seeing similar issues:

    [INFO] Building odyssey-api-snappack 1-0001
    [INFO] --------------------------------[ jar ]---------------------------------
    Downloading from github_tectonic: https://maven.pkg.github.com/SnapLogic/Tectonic/net/minidev/json-smart/maven-metadata.xml
    Downloading from github_snapv4: https://maven.pkg.github.com/SnapLogic/Snap_v4/net/minidev/json-smart/maven-metadata.xml
    [WARNING] Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to github_tectonic (https://maven.pkg.github.com/SnapLogic/Tectonic): Authentication failed for https://maven.pkg.github.com/SnapLogic/Tectonic/net/minidev/json-smart/maven-metadata.xml 401 Unauthorized
    [WARNING] Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to github_snapv4 (https://maven.pkg.github.com/SnapLogic/Snap_v4): Authentication failed for https://maven.pkg.github.com/SnapLogic/Snap_v4/net/minidev/json-smart/maven-metadata.xml 401 Unauthorized

  • jdgarzon's avatar
    jdgarzon
    New Contributor

    I am new to Snap Development. I am setting up dev environment in Linux. After following the instructions from https://developer.snaplogic.com. I was able to create a new project template from the Maven archetype but it does not build. I get: java: package com.google.inject does not exist and the same error for all other packages com.snaplogic.api, com.snaplogic.common, com.snaplogic.common.properties, com.snaplogic.snap.api, etc. The instructions talk about downloading the BOM file which has the different library versions, where should I copy that file? or how to fix this build errors?

    I am using IntelliJ. I installed java version 11 and configured that version in: File >> Settings >> Build, Execution, Deployment >> Java Compiler:
    Selec Project bycode version: 11: and also on: File >> Project Structure >> Modules: Language level: 11

    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:13:25
    java: package com.google.inject does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:14:25
    java: package com.snaplogic.api does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:15:28
    java: package com.snaplogic.common does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:16:39
    java: package com.snaplogic.common.properties does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:17:48
    java: package com.snaplogic.common.properties.builders does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:18:30
    java: package com.snaplogic.snap.api does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:19:30
    java: package com.snaplogic.snap.api does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:20:30
    java: package com.snaplogic.snap.api does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:21:30
    java: package com.snaplogic.snap.api does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:22:30
    java: package com.snaplogic.snap.api does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:23:43
    java: package com.snaplogic.snap.api.capabilities does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:24:43
    java: package com.snaplogic.snap.api.capabilities does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:25:43
    java: package com.snaplogic.snap.api.capabilities does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:26:43
    java: package com.snaplogic.snap.api.capabilities does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:27:43
    java: package com.snaplogic.snap.api.capabilities does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:28:43
    java: package com.snaplogic.snap.api.capabilities does not exist
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:44:36
    java: cannot find symbol
      symbol: class SimpleSnap
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:38:2
    java: cannot find symbol
      symbol: class General
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:40:2
    java: cannot find symbol
      symbol: class Category
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:41:2
    java: cannot find symbol
      symbol: class Version
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:42:2
    java: cannot find symbol
      symbol: class Inputs
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:43:2
    java: cannot find symbol
      symbol: class Outputs
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:58:13
    java: cannot find symbol
      symbol:   class DocumentUtility
      location: class com.snaplogic.snaps.PropertyTypes
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:66:40
    java: cannot find symbol
      symbol:   class PropertyBuilder
      location: class com.snaplogic.snaps.PropertyTypes
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:114:27
    java: cannot find symbol
      symbol:   class PropertyValues
      location: class com.snaplogic.snaps.PropertyTypes
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:114:65
    java: cannot find symbol
      symbol:   class ConfigurationException
      location: class com.snaplogic.snaps.PropertyTypes
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:128:56
    java: cannot find symbol
      symbol:   class PropertyValues
      location: class com.snaplogic.snaps.PropertyTypes
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:152:58
    java: cannot find symbol
      symbol:   class PropertyValues
      location: class com.snaplogic.snaps.PropertyTypes
    Documents/snapLogic/demosnappack/src/main/java/com/snaplogic/snaps/PropertyTypes.java:178:25
    java: cannot find symbol
      symbol:   class Document
      location: class com.snaplogic.snaps.PropertyTypes
    
    • viktor_n's avatar
      viktor_n
      Contributor II

      Hi @jdgarzon,

      How do you try to build the project ?

      I am not sure does it will help you this command. I build my projects like this and it works.
      mvn clean install -Dsl_build=0001 -DskipTests=true
      Every time when you build the project, sl_build need to be incremented by one.

      Regards,
      Viktor

    • ptaylor's avatar
      ptaylor
      Employee

      Hi Juan,

      Sorry you’re having trouble. To help you with this, let me better understand what you tried to do.

      First, you created a new custom snap project using our Maven archetype, like this, correct?

      mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=http://maven.clouddev.snaplogic.com:8080/nexus/content/repositories/thirdparty/

      I’m unclear on exactly what you did next, so let me ask a few questions:

      • Did you try to first build the new project from the command line using Maven? To do this, you would execute a command like mvn clean package from the project’s root directory. If not, please try that now and let me know the result.

      • What version of Maven are you using? To find out, execute: mvn --version

      • When you created the IntelliJ project, how exactly did you do it? To be more specific, what did you select at this point of project creation?
        Screen Shot 2021-11-22 at 12.21.18 PM.png
        The best way to answer this prompt is with the highlighted answer: “Import project from external model: Maven.” If you didn’t do it that way, please try that now.

      I’ll wait for your response to this.

      Thank you.