On 9/20/12 13:27 , Chris Koeritz wrote:
Unfortunately, I have a requirement to support Java 7. Is Apache Felix unusable on Java 7 until something is fixed?

You just need to recompile the source yourself and re-target to whichever Java platform you want. The next release of the framework will no longer target jsr14, but this still won't help the example build with Java 7, since it depends on OSGi JAR files that target jsr14.

-> richard

Thanks,
Chris.

On 09/20/2012 01:16 PM, Richard S. Hall wrote:
I think the issue is that you are compiling with Java 7 and the OSGi dependencies have been compiled to target jsr14 (fake generic support for older JVMs). This used to work prior to Java 7, but support for jsr14 was removed from Java 7 so now it fails.

Try to build using Java 6 and see if it works.

-> richard

On 9/20/12 13:02 , Chris Koeritz wrote:
Dear Felix,
I am having problems building the examples at this page: http://felix.apache.org/site/apache-felix-application-demonstration.html The maven command (mvn clean install) is failing with a lot of complaints. I'll attach the log from building extenderbased.host. The other example parts (circle, triangle, etc) give similar error messages. I believe I am using the default maven for ubuntu 12.04, which is version 3.0.4-2 now. Is there a dependency on maven2 or is something else going wrong? I suspect it's something else... Due to the warnings at the top of the log trace, I tried installing the maven project-info-report and site-plugin packages, but neither of those warnings disappeared afterwards. Those are just warnings though, and the failures seem related to the BundleTracker or other classes having changed since the demo was created?
Thanks,
Chris.

=== example build failure ===

[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.felix.example:extenderbased.host:bundle:1.0.0 [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-site-plugin is missing. @ org.apache.felix:felix:1.0.4, /home/fred/.m2/repository/org/apache/felix/felix/1.0.4/felix-1.0.4.pom, line 427, column 15 [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. @ org.apache.felix:felix:1.0.4, /home/fred/.m2/repository/org/apache/felix/felix/1.0.4/felix-1.0.4.pom, line 435, column 15 [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-jxr-plugin is missing. @ org.apache.felix:felix:1.0.4, /home/fred/.m2/repository/org/apache/felix/felix/1.0.4/felix-1.0.4.pom, line 439, column 15 [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-project-info-reports-plugin is missing. @ org.apache.felix:felix:1.0.4, /home/fred/.m2/repository/org/apache/felix/felix/1.0.4/felix-1.0.4.pom, line 443, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Felix Extender-Based Host 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ extenderbased.host --- [WARNING] The POM for org.codehaus.plexus:plexus-utils:jar:1.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ extenderbased.host --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] Copying 0 resource to META-INF
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ extenderbased.host --- [INFO] Compiling 8 source files to /home/fred/demo_felix/extenderbased.host/target/classes [INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.624s
[INFO] Finished at: Thu Sep 20 12:37:16 EDT 2012
[INFO] Final Memory: 11M/226M
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project extenderbased.host: Compilation failure: Compilation failure: [ERROR] /home/fred/demo_felix/extenderbased.host/src/main/java/org/apache/felix/example/extenderbased/host/ShapeBundleTracker.java:[21,53] error: type BundleTracker does not take parameters
[ERROR]
[ERROR] /home/fred/demo_felix/extenderbased.host/src/main/java/org/apache/felix/example/extenderbased/host/Activator.java:[77,30] error: cannot find symbol
[ERROR]
[ERROR] could not parse error message:   symbol:   method open()
[ERROR] location: variable m_shapetracker of type ShapeBundleTracker
[ERROR] /home/fred/demo_felix/extenderbased.host/src/main/java/org/apache/felix/example/extenderbased/host/Activator.java:94: error: cannot find symbol
[ERROR] m_shapetracker.close();
[ERROR] ^
[ERROR]
[ERROR] could not parse error message:   symbol:   method close()
[ERROR] location: variable m_shapetracker of type ShapeBundleTracker
[ERROR] /home/fred/demo_felix/extenderbased.host/src/main/java/org/apache/felix/example/extenderbased/host/ShapeBundleTracker.java:41: error: method does not override or implement a method from a supertype
[ERROR] @Override
[ERROR] ^
[ERROR]
[ERROR] /home/fred/demo_felix/extenderbased.host/src/main/java/org/apache/felix/example/extenderbased/host/ShapeBundleTracker.java:[100,4] error: method does not override or implement a method from a supertype
[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.
[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/MojoFailureException
fred@khandroma $ mvn -version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_07, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-30-generic", arch: "amd64", family: "unix"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to