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)

@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.

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.

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.

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

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

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

Not sure why the maven artifacts that went out Friday didn’t help, but the GA will be this Saturday.

As a work around I’ll provide the jar and you can download and install that into your .m2 cache. To do that use this command, but substitute your path for the one I used in -Dfile=<path to downloaded jar>. I was able to build the demo snap pack after installing this, but let me know if you have more issues.

$ mvn install:install-file -Dfile=/Users/tim/Downloads/commons-csv-1.0-SNAPSHOT.jar.zip -DgroupId=org.apache.commons -DartifactId=commons-csv -Dpackaging=jar -Dversion=1.0-SNAPSHOT

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] Installing /Users/tim/Downloads/commons-csv-1.0-SNAPSHOT.jar to /Users/tim/.m2/repository/org/apache/commons/commons-csv/1.0-SNAPSHOT/commons-csv-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.463s
[INFO] Finished at: Tue Nov 06 10:18:56 EST 2018
[INFO] Final Memory: 7M/309M
[INFO] ------------------------------------------------------------------------

commons-csv-1.0-SNAPSHOT.jar.zip (34.1 KB)

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

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?

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.

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.

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.

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

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

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.

Happy to hear from you, Thank you.