Forum Discussion

nagrajps's avatar
nagrajps
New Contributor
7 years ago

Could not resolve dependencies for project com.snaplogic:demosnappack:jar:1: Failure to find org.apache.commons:commons-csv:jar:1.0-SNAPSHOT

[ERROR] Failed to execute goal on project demosnappack: Could not resolve dependencies for project com.snaplogic:demosnappack:jar:1: Failure to find org.apache.commons:commons-csv:jar:1.0-SNAPSHOT in http://maven.clouddev.snaplogic.com:8080/nexus/content/repositories/thirdparty/ was cached in the local repository, resolution will not be reattempted until the update interval of Snaplogic-ThirdPartyMaven-Repository has elapsed or updates are forced → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project demosnappack: Could not resolve dependencies for project com.snaplogic:demosnappack:jar:1: Failure to find org.apache.commons:commons-csv:jar:1.0-SNAPSHOT in http://maven.clouddev.snaplogic.com:8080/nexus/content/repositories/thirdparty/ was cached in the local repository, resolution will not be reattempted until the update interval of Snaplogic-ThirdPartyMaven-Repository has elapsed or updates are forced
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:249)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:246)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)

17 Replies

  • dmiller's avatar
    dmiller
    Former Employee

    @nagrajps, please provide more information as to what you are trying to do when you get errors and not just the error itself. It would help make diagnosing the issue easier.

  • nagrajps's avatar
    nagrajps
    New Contributor

    I am trying to develop custom snaps for that i have started packaging my code using mvn clean install command in command prompt, however it looks the mvn is not able to find this jar file org.apache.commons:commons-csv:jar:1.0-SNAPSHOT , i am getting this exception.

    [ERROR] Failed to execute goal on project demosnappack: Could not resolve dependencies for project com.snaplogic:demosnappack:jar:1: Failure to find org.apache.commons:commons-csv:jar:1.0-SNAPSHOT in http://maven.clouddev.snaplogic.com:8080/nexus/content/repositories/thirdparty/ was cached in the local repository, resolution will not be reattempted until the update interval of Snaplogic-ThirdPartyMaven-Repository has elapsed or updates are forced -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project demosnappack: Could not resolve dependencies for project com.snaplogic:demosnappack:jar:1: Failure to find org.apache.commons:commons-csv:jar:1.0-SNAPSHOT in http://maven.clouddev.snaplogic.com:8080/nexus/content/repositories/thirdparty/ was cached in the local repository, resolution will not be reattempted until the update interval of Snaplogic-ThirdPartyMaven-Repository has elapsed or updates are forced
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:249)

  • There is a bug affecting 4.14 and earlier that is causing this and the problem should be fixed in 4.15. Let me ask my colleagues if there is a way to build snap packs using the release candidate on UAT so that you can get unblocked.

    • tlikarish's avatar
      tlikarish
      Employee

      There will be a release candidate pushed out tomorrow that should resolve this issue for you.

      EDIT: To clarify, the release candidate will be pushed to the User Acceptance Testing (UAT) servers and along with our maven repository updates. The dependency resolution should not require any action on your part.

      • nagrajps's avatar
        nagrajps
        New Contributor

        Hi, When can i expect the 4.15 build available, hence i can take the latest build and work.

  • nagrajps's avatar
    nagrajps
    New Contributor

    Ok, please let me know when to take the latest update from the repository, and what are the actions i have to perform.

  • nagrajps's avatar
    nagrajps
    New Contributor

    I have taken the latest maven build from the repository, however when i open it from the eclipse, i am getting below exceptions,

    Missing artifact jdk.tools:jdk.tools:jar:1.8 pom.xml /demosnappack line 4 Maven Dependency Problem
    Missing artifact org.apache.commons:commons-csv:jar:1.0-SNAPSHOT p
    .xml /demosnappack line 4 Maven Dependency Problem
    Plugin execution not covered by lifecycle configuration: com.snaplogic.tools:snappack-installer:4.9.0.M1:generate-schema (execution: default, phase: compile) pom.xml /demosnappack line 353 Maven Project Build Lifecycle Mapping Problem
    Project configuration is not up-to-date with pom.xml. Select: Maven->Update Project… from the project context menu or use Quick Fix. demosnappack line 1 Maven Configuration Problem
    The container ‘Maven Dependencies’ references non existing library ‘C:\Users\s771106.m2\repository\org\apache\commons\commons-csv\1.0-SNAPSHOT\commons-csv-1.0-SNAPSHOT.jar’ demosnappack Build path Build Path Problem
  • nagrajps's avatar
    nagrajps
    New Contributor

    Hi tlikarish,
    After following your steps the issue got resolved, however i am getting similar issue for some other jar file as well, can you please share the com.snaplogic:mrjob:jar:4.0 jar file.

    Exception:
    [WARNING] The POM for com.snaplogic:mrjob:jar:4.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

    • tlikarish's avatar
      tlikarish
      Employee

      That’s just a warning and is safe to ignore. SnapLogic will have to clean up it’s dependencies to prevent that from showing up in the future.

      Are you able to deploy the snap pack?

  • nagrajps's avatar
    nagrajps
    New Contributor

    Hi tlikarish,
    I am able to deploy the demo snap pack and the snaps are executing without issue, however when i create a new java code by copy pasting of Doc generator demo code and changed the class name, loaded into snap packs i am error.

    For creating new snap, 4 steps i have followed,

    1. I have copied the Doc generator demo code and changed the name to DoubleDocGenerator.java and didn’t changed any logic inside the code.
    2. The java class name is added into pom.xml file like this(
      <snap.classes>
      com.snaplogic.snaps.CharacterCounter,
      com.snaplogic.snaps.CurrencyConverter,
      com.snaplogic.snaps.DocConsumer,
      com.snaplogic.snaps.DocGenerator,
      com.snaplogic.snaps.DoubleDocGenerator,
      com.snaplogic.snaps.PropertyTypes,
      com.snaplogic.snaps.SchemaExample,
      com.snaplogic.snaps.SingleDocGenerator,
      com.snaplogic.snaps.SnapWithAccount,
      com.snaplogic.snaps.Suggest,
      com.snaplogic.snaps.TwoInputs,
      com.snaplogic.snaps.TwoInputsTwoOutputs
      </snap.classes>)

    step 3: compiled and re created the demo snap pack.zip file using given command (mvn clean install -D skipTests=true)

    step 4: deleted the existing demo snap pack in the manager section and uploaded the newly created demo snap pack.

    After following all the steps, only snap logic given demo snaps are working but not my snap.

    When i am executing DoubleDocGenerator snap, i am getting following error.

    Failure: Cannot find class com.snaplogic.snaps.DoubleDocGenerator in snap pack demosnappack-snap-1-0001.zip, Reason: com.snaplogic.snaps.DoubleDocGenerator, Resolution: Please file a defect against the snap.

    please suggest me, if you have any clues.

    • tlikarish's avatar
      tlikarish
      Employee

      I think you’ll need to bump the version on your snap pack for each build.

      mvn clean install -Dsl_build=0002

      The JCC (thing that is executing pipelines) will only read and load a snap pack once as they generally are immutable if not being developed. By increasing the version number, it should cause the JCC to load the new version.

  • nagrajps's avatar
    nagrajps
    New Contributor

    mvn clean install -Dsl_build=0002

    When i execute the above command, i am getting this exception

    Results :

    Tests in error:
    characterCounter_WithSnapLogicAsInput_CountsOccurrences(com.snaplogic.snaps.CharacterCounterTest): Unable to get schema: com-snaplogic-snap-template_2
    currencyConversion_WithExchangeRatesDataSupplier_ConvertsCorrectly(com.snaplogic.snaps.CurrencyConverterTest): Unable to get schema: com-snaplogic-snap-template_2
    currencyConverstion_WithFieldMockedDirectly_ConvertsCorrectly(com.snaplogic.snaps.CurrencyConverterTest): Unable to get schema: com-snaplogic-snap-template_2
    currencyConversion_WithCustomInjector_ConvertsCorrectly(com.snaplogic.snaps.CurrencyConverterTest): Unable to get schema: com-snaplogic-snap-template_2
    currencyConversion_WithExchangeRatesFromDataFiles_ConvertsCorrectly(com.snaplogic.snaps.CurrencyConverterTest): Unable to get schema: com-snaplogic-snap-template_2
    docConsumer_WithManualTestSetup_UpdatesCounterCorrectly(com.snaplogic.snaps.DocConsumerTest): Unable to get schema: com-snaplogic-snap-template_2
    docGenerator_WithExpectedOutputPath_OutputsDocumentsCorrectly(com.snaplogic.snaps.DocGeneratorTest): Unable to get schema: com-snaplogic-snap-template_2
    docGenerator_WithProperties_OutputsCorrectNumberOfDocuments(com.snaplogic.snaps.DocGeneratorTest): Unable to get schema: com-snaplogic-snap-template_2
    docGenerator_WithPropertyOverrides_OutputsCorrectNumDocuments(com.snaplogic.snaps.DocGeneratorTest): Unable to get schema: com-snaplogic-snap-template_2
    docGenerator_WithExpectedErrorPath_OutputsErrorDocumentCorrectly(com.snaplogic.snaps.DocGeneratorTest): Unable to get schema: com-snaplogic-snap-template_2
    propertyTypes_WithFieldsCompositesAndTables_OutputsEvaluatedValuesDocument(com.snaplogic.snaps.PropertyTypesTest): Unable to get schema: com-snaplogic-snap-template_2
    schemaExample_WithValidData_OutputsDocument(com.snaplogic.snaps.SchemaExampleTest): Unable to get schema: com-snaplogic-snap-template_2
    schemaExample_WithInvalidData_OutputsErrorDocumentOnly(com.snaplogic.snaps.SchemaExampleTest): Unable to get schema: com-snaplogic-snap-template_2
    singleDocGenerator_WithOutputView_OutputsCorrectNumDocuments(com.snaplogic.snaps.SingleDocGeneratorTest): Unable to get schema: com-snaplogic-snap-template_2
    snapWithAccount_WithAccountProperties_OutputsCorrectToken(com.snaplogic.snaps.SnapWithAccountTest): Unable to get schema: com-snaplogic-snap-template_2
    suggest_WithSuggestProperty_WritesResultsToSpecialOutputView(com.snaplogic.snaps.SuggestTest): Unable to get schema: com-snaplogic-snap-template_2
    suggest_WithTestSetupAndSuggest_ReturnsCorrectValue(com.snaplogic.snaps.SuggestTest): Unable to get schema: com-snaplogic-snap-template_2
    twoInputsTwoOutputs_WithParentsAndChildren_GroupsByGender(com.snaplogic.snaps.TwoInputsTwoOutputsTest): Unable to get schema: com-snaplogic-snap-template_2

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

    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 37.273 s
    [INFO] Finished at: 2018-11-07T21:29:37+04:00
    [INFO] Final Memory: 71M/647M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project demosnappack: There are test failures.
    [ERROR]
    [ERROR] Please refer to c:\opt\snaplogic-dev\demosnappack\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.

    • tlikarish's avatar
      tlikarish
      Employee

      Looks like there is a bug in the test code. Does it work when you skip the unit tests?

      mvn clean install -Dsl_build=0002 -DskipTests

  • nagrajps's avatar
    nagrajps
    New Contributor

    When i use this command mvn clean install -Dsl_build=0002 -D skipTests=true i can able to skip the tests and demo snap pack -002 .zip file got created,

    The newly created snaps are working as expected in designer. Thank you for all the support

    • tlikarish's avatar
      tlikarish
      Employee

      Great – I’ve filed a bug for the snap folks to fix the unit test issue you ran into. Appreciate working through our bumps and hope we can make the experience smoother in the future.