osgi / osgi.enroute

The OSGi enRoute project provides a programming model of OSGi applications. This project contains bundles providing the API for the OSGi enRoute base profile and bundles for the OSGi enRoute project. The base profile establishes a runtime that contains a minimal set of services that can be used as a base for applications.
https://enroute.osgi.org/
Apache License 2.0
123 stars 81 forks source link

Quickstart example not working #97

Closed dmsilver2 closed 5 years ago

dmsilver2 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Thank you Timothy. Your fix worked!

djradon commented 5 years ago

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

laurentiumagureanu commented 5 years ago

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

Same problem here

timothyjward commented 5 years ago

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:

djradon commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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