spring-osgi-bundle-archetype got problem with org.springframework.osgi.context does not exist
I create a bundle project with
And create a Foo class with BundleContextAwareCode:mvn archetype:create \ -DarchetypeGroupId=org.springframework.osgi \ -DarchetypeArtifactId=spring-osgi-bundle-archetype \ -DarchetypeVersion=1.1.1 \ -Dversion=1.0 \ -DgroupId=test \ -DartifactId=HelloSpringOSGi
Add import header in pom.xmlCode:import org.osgi.framework.BundleContext; import org.springframework.osgi.context.BundleContextAware; public class Foo implements BundleContextAware{ public void setBundleContext(BundleContext ctx) { } }
do mvn package then error occurredCode:<Import-Package>*,org.springframework.osgi.context,org.osgi.framework</Import-Package>
Anybody know how to fix it ?Code:C:\tmp\foooooo\src\main\java\Foo.java:[2,39] package org.springframework.osgi.co ntext does not exist C:\tmp\foooooo\src\main\java\Foo.java:[4,28] cannot find symbol symbol: class BundleContextAware public class Foo implements BundleContextAware{


