Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLING-7935 - Move launchpad-testing module into the main starter repository #66

Merged
merged 2 commits into from May 11, 2022

Conversation

rombert
Copy link
Contributor

@rombert rombert commented Apr 29, 2022

Execute the launchpad-testing test suite in the regular starter build.

@rombert
Copy link
Contributor Author

rombert commented Apr 29, 2022

@rombert
Copy link
Contributor Author

rombert commented May 4, 2022

@kwin - it seems that the bnd-indexer-maven-plugin is unable to resolve the new SNAPSHOT dependencies we have for tests

[ERROR] Failed to determine the artifact URI for artifact org.apache.sling:org.apache.sling.launchpad.test-fragment:jar:13-20220429.031819-11
java.io.FileNotFoundException: Unable to index artifact org.apache.sling:org.apache.sling.launchpad.test-fragment:jar:13-20220429.031819-11. The repository Nexus is not known to this resolver
    at aQute.bnd.maven.indexer.plugin.IndexerMojo$RepositoryURLResolver.resolver (IndexerMojo.java:343)
    at aQute.bnd.maven.indexer.plugin.IndexerMojo.execute (IndexerMojo.java:177)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

This is probably because of the references to the test content from https://github.com/apache/sling-org-apache-sling-starter/pull/66/files#diff-809481c400c1abb16967b7e08ab0865fbc81c685c9a6b21c40f770529cc48492 . I can (and probably should) make the test-fragment bundle a standalone module not tied to the starter, but there is nothing I can do about the test-services.

Do you have an idea about how to fix this?

@rombert
Copy link
Contributor Author

rombert commented May 4, 2022

FWIW the bnd indexer works for me locally, even if I delete ~/.m2/repository/org/apache/sling/org.apache.sling.launchpad.test-fragment/13-SNAPSHOT/ before running the build.

@rombert
Copy link
Contributor Author

rombert commented May 4, 2022

After enabling Maven debugging information I can see the following in the logs:

[DEBUG] Located an artifact repository maven-default-http-blocker
[DEBUG] Located an artifact repository central
[DEBUG] Located a deployment repository apache.snapshots.https

which is coming from https://github.com/bndtools/bnd/blob/d18830aad84a55fc8b446a7c30209ada8546ef53/maven/bnd-indexer-maven-plugin/src/main/java/aQute/bnd/maven/indexer/plugin/IndexerMojo.java#L149-L158 .

However, the SNAPSHOT artifacts are configured to be downloaded from an artifact repository named 'Nexus', which probably comes from the ASF Infra config:

[INFO] Downloading from Nexus: http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.launchpad.integration-tests/13-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded from Nexus: http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.launchpad.integration-tests/13-SNAPSHOT/maven-metadata.xml (1.0 kB at 2.1 kB/s)
[INFO] Downloading from Nexus: http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.launchpad.integration-tests/13-SNAPSHOT/org.apache.sling.launchpad.integration-tests-13-20220504.132057-21.pom
[INFO] Downloaded from Nexus: http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.launchpad.integration-tests/13-SNAPSHOT/org.apache.sling.launchpad.integration-tests-13-20220504.132057-21.pom (14 kB at 42 kB/s)
[INFO] Downloading from Nexus: http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.launchpad.test-services/13-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded from Nexus: http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.launchpad.test-services/13-SNAPSHOT/maven-metadata.xml (1.0 kB at 3.1 kB/s)
[INFO] Downloading from Nexus: http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.launchpad.test-services/13-SNAPSHOT/org.apache.sling.launchpad.test-services-13-20220430.192420-11.pom
[INFO] Downloaded from Nexus: http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.launchpad.test-services/13-SNAPSHOT/org.apache.sling.launchpad.test-services-13-20220430.192420-11.pom (7.2 kB at 22 kB/s)

@rombert
Copy link
Contributor Author

rombert commented May 4, 2022

And the ASF infra part seems to come from https://github.com/apache/infrastructure-p6/blob/1a2f462dd2eda1befe223c7ca3493dc68081033a/modules/build_nodes/templates/m2_settings.erb ( might not be available from outside the Apache org )

@sonarcloud
Copy link

sonarcloud bot commented May 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

…sitory

- execute the launchpad-testing test suite in the regular starter build.
- add a workaround for bndtools/bnd#5247,
  present only on the ASF Jenkins
…sitory

Copy over Jenkins configuration from the launchpad-testing module.
@rombert rombert merged commit 154a25e into master May 11, 2022
@rombert rombert deleted the issue/SLING-7935 branch May 11, 2022 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant