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

Quickstart example not working #97

Closed
dmsilver2 opened this issue Feb 20, 2019 · 11 comments
Closed

Quickstart example not working #97

dmsilver2 opened this issue Feb 20, 2019 · 11 comments

Comments

@dmsilver2
Copy link

Hi,

I am unable to complete the quickstart tutorial.

My environment
Java 8
mvn: 3.6.0

I have cloned the entire project
On step run "mvn verify" I receive the below error. Please advise

mvn verify
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] quickstart [pom]
[INFO] rest [jar]
[INFO] app [jar]
[INFO]
[INFO] ----------< org.osgi.enroute.examples.quickstart:quickstart >-----------
[INFO] Building quickstart 0.0.2-SNAPSHOT [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] -------------< org.osgi.enroute.examples.quickstart:rest >--------------
[INFO] Building rest 0.0.2-SNAPSHOT [2/3]
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.osgi.enroute:osgi-api:pom:7.0.1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.osgi.enroute:enterprise-api:pom:7.0.1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.osgi.enroute:test-bundles:pom:7.0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for quickstart 0.0.2-SNAPSHOT:
[INFO]
[INFO] quickstart ......................................... SUCCESS [ 0.026 s]
[INFO] rest ............................................... FAILURE [ 0.184 s]
[INFO] app ................................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.397 s
[INFO] Finished at: 2019-02-20T16:56:55-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project rest: Could not resolve dependencies for project org.osgi.enroute.examples.quickstart:rest:jar:0.0.2-SNAPSHOT: The following artifacts could not be resolved: org.osgi.enroute:osgi-api:pom:7.0.1-SNAPSHOT, org.osgi.enroute:enterprise-api:pom:7.0.1-SNAPSHOT, org.osgi.enroute:test-bundles:pom:7.0.1-SNAPSHOT: Failure to find org.osgi.enroute:osgi-api:pom:7.0.1-SNAPSHOT in https://oss.sonatype.org/content/groups/osgi was cached in the local repository, resolution will not be reattempted until the update interval of OSGi has elapsed or updates are forced -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :rest

timothyjward pushed a commit to timothyjward/osgi.enroute that referenced this issue Feb 22, 2019
For some reason the OSGi group does not seem to be providing access to snapshots properly in the build. Fixes eclipse-osgi-technology#97

Signed-off-by: Tim Ward <tim.ward@paremus.com>
@timothyjward
Copy link
Contributor

Hi.

I believe this is a simple issue with the Sonatype OSS repo no longer correctly making things available from the OSGi group. If you have an opportunity to try the patch from PR #98 (you can get it as text here or follow the instructions in the PR to check out the branch) then that would be great.

@dmsilver2
Copy link
Author

Thank you Timothy. Your fix worked!

timothyjward added a commit that referenced this issue Feb 23, 2019
…98)

For some reason the OSGi group does not seem to be providing access to snapshots properly in the build. Fixes #97

Signed-off-by: Tim Ward <tim.ward@paremus.com>
@djradon
Copy link

djradon commented Aug 2, 2019

I'm getting the same error above, but I have the updated version of pom.xml. :(

@laurentiumagureanu
Copy link

I'm getting the same error above, but I have the updated version of pom.xml. :(

Same problem here

@timothyjward
Copy link
Contributor

This issue is occurring because the snapshots in the Sonatype repository have been deleted (there hasn't been a need to update them in a while). This has (in turn) caused me to see that Travis has broken our build image. I'll get on with fixing that, however you have two options:

  • Do a full local build - if you do mvn clean install at the top level of the checkout then that will build everything and doesn't need the published snapshots (tested locally with a clean repo)
  • Use the release tag to build - if you git checkout 7.0.0 then this will reset your source tree to the released 7.0.0 and you should be able to build against released artefacts.

@djradon
Copy link

djradon commented Aug 14, 2019

mvn clean install gives me:

[INFO] rest-service-test 0.0.1 ............................ FAILURE [ 7.471 s]
...
[ERROR] Failed to execute goal biz.aQute.bnd:bnd-testing-maven-plugin:4.1.0:testing (default) on project rest-service-test: 1 errors found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal biz.aQute.bnd:bnd-testing-maven-plugin:4.1.0:testing (default) on project rest-service-test: 1 errors found
at org.apache...

@timothyjward
Copy link
Contributor

mvn clean install gives me:

[INFO] rest-service-test 0.0.1 ............................ FAILURE [ 7.471 s]
...
[ERROR] Failed to execute goal biz.aQute.bnd:bnd-testing-maven-plugin:4.1.0:testing (default) on project rest-service-test: 1 errors found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal biz.aQute.bnd:bnd-testing-maven-plugin:4.1.0:testing (default) on project rest-service-test: 1 errors found
at org.apache...

Are you using Java 8? If you're using a Java version higher than 8 then you'll need to set it appropriately in the bndruns for the application. For example here for that test. Unfortunately Java made breaking changes to remove things like JAXB from the base JVM in Java 9.

@readilychen
Copy link

already changed repsitory to https://oss.sonatype.org/content/repositories/osgi-snapshots/ , still can NOT get right

got errors as follow:

`
/gitlab/osgi.enroute/examples/quickstart
$ mvn verify
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] quickstart
[INFO] rest
[INFO] app
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building quickstart 0.0.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building rest 0.0.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.osgi.enroute:osgi-api:pom:7.0.1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.osgi.enroute:enterprise-api:pom:7.0.1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.osgi.enroute:test-bundles:pom:7.0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] quickstart ........................................ SUCCESS [0.002s]
[INFO] rest .............................................. FAILURE [0.193s]
[INFO] app ............................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.360s
[INFO] Finished at: Thu Aug 15 09:37:10 CST 2019
[INFO] Final Memory: 8M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project rest: Could not resolve dependencies for project org.osgi.enroute.examples.quickstart:rest:jar:0.0.2-SNAPSHOT: The following artifacts could not be resolved: org.osgi.enroute:osgi-api:pom:7.0.1-SNAPSHOT, org.osgi.enroute:enterprise-api:pom:7.0.1-SNAPSHOT, org.osgi.enroute:test-bundles:pom:7.0.1-SNAPSHOT: Failure to find org.osgi.enroute:osgi-api:pom:7.0.1-SNAPSHOT in https://oss.sonatype.org/content/repositories/osgi-snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of OSGi Snapshots has elapsed or updates are forced -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :rest

`

@shazbat4
Copy link

shazbat4 commented Oct 9, 2019

Still unable to build examples - though this issue is marked closed it is still not fixed.
Even changed version in POMS to 0.0.1 and STILL could not get it to work.

@timothyjward
Copy link
Contributor

timothyjward commented Oct 9, 2019

The current problem is explained in #104 - I hadn't realised the originator had closed their issue, which isn't solved, but can be worked around by checking out the release tag (which pulls from Maven Central, not the OSGi Snapshots).

The OSGi team are still chasing up with Sonatype as to why the OSGi group has been taken out of service.

@shazbat4
Copy link

shazbat4 commented Oct 9, 2019

Thank you, Timothy for the follow-up. I pulled the 7.0.0 flavour - works now!

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

No branches or pull requests

6 participants