egeria icon indicating copy to clipboard operation
egeria copied to clipboard

Build failure in analytics modelling & design model if tests skipped

Open planetf1 opened this issue 2 years ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

When building from scratch (ie empty m2) and without any connection to a snapshot repo, using mvn clean package -Dmaven.test.skip -DskipTests -Drat.skip=true -Dmaven.javadoc.skip=true -X -U the build of egeria fails with:

[ERROR] Failed to execute goal on project analytics-modeling-server: Could not resolve dependencies for project org.odpi.egeria:analytics-modeling-server:jar:3.5-SNAPSHOT: Could not find artifact org.odpi.egeria:analytics-modeling-api:jar:tests:3.5-SNAPSHOT -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project analytics-modeling-server: Could not resolve dependencies for project org.odpi.egeria:analytics-modeling-server:jar:3.5-SNAPSHOT: Could not find artifact org.odpi.egeria:analytics-modeling-api:jar:tests:3.5-SNAPSHOT
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:269)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
    at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:202)
    ```

### Expected Behavior

Build should work

### Steps To Reproduce

As above

### Environment

```markdown
- Egeria:
- OS:
- Java:
- Browser (for UI issues):
- Additional connectors and integration:

Any Further Information?

No response

planetf1 avatar Nov 30 '21 11:11 planetf1

Note: Using additional build flags can cause the build to fail, so the first recommendation is to always build with mvn clean install

However, the build should perform consistently if tests are skipped. the issue here seems to be the test-jar that is build for analytics modelling, and likely some tweak is needed around scope

planetf1 avatar Nov 30 '21 11:11 planetf1

Also user has indicated 'It happens on org.odpi.egeria:design-model-client:jar:3.5-SNAPSHOT' so this may be another area where the build fails with additional test flags

planetf1 avatar Nov 30 '21 12:11 planetf1

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 27 '22 00:03 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 28 '22 00:05 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 30 '22 00:07 github-actions[bot]

As we are moving to gradle, I propose we do not fix this

planetf1 avatar Nov 16 '22 12:11 planetf1