On 2 Aug 2011, at 14:43, Matt Madhavan wrote: > Hi Stuart, > I moved the "extension=true" to the apache-felix-plugin. It solved my issue. > > I still do not know why the pax-plugin will clobber the .classes file and > mess the JDK version!
It doesn't - but m2e might be getting confused by the custom pax lifecycle, which would explain why switching back to the Felix lifecycle helped ( the custom pax lifecycle has slightly modified compile/test-compile steps that support compiling against OSGi bundles with embedded jars ) > Thanks a lot! > Matt > > On Mon, Aug 1, 2011 at 7:06 PM, Stuart McCulloch <[email protected]> wrote: > On 2 August 2011 01:02, Matt Madhavan <[email protected]> wrote: > HI Stuart, > I re did the steps and did a Generic Import (not Maven import existing maven > project). It looks ok! > > But I had to import the child bundles and the parent separately! > > I don't tend to import full hierarchies into Eclipse, only certain bundles > > How do fold generally import maven (parent/child) projects? > > Just wondering! Also I'm wondering if I follow the General Import for a maven > project, if it may cause any unknown issues! > > Only that it'll be missing some of the special Eclipse-Maven integration > > If you want to import it as a Maven project make sure the old Eclipse project > files are removed with mvn pax:clean > ( and also try moving the <extensions>true</extensions> line down in the > poms/pom.xml file, in case that helps ) > > Thanks > Matt > > > On Mon, Aug 1, 2011 at 6:51 PM, Matt Madhavan <[email protected]> wrote: > HI Stuart, > Thanks for the reply! > > I'm not sure how you imported a maven hierarchical project to Eclipse? I > usually do Import-->Maven -->Existing Maven Projects! > > Do you see the parent project and the child bundle projects in Eclipse by > Generic Import? > > > Can you please let me know the exact steps you followed? > > Thanks > Matt > > > On Mon, Aug 1, 2011 at 6:33 PM, Stuart McCulloch <[email protected]> wrote: > On 1 Aug 2011, at 23:38, Matt Madhavan wrote: > >> Hello, >> I have posted this issue at least couple of before. >> >> Anytime when we do a Import maven projects, all the classpath entries are >> wiped out and the project becomes a JDK 1.4 (both in eclipse library setting >> and eclipse compiler setting). >> >> Its easy to reproduce. >> >> 1. Create an OSGi project using : >> mvn org.ops4j:maven-pax-plugin:create-project >> -DgroupId=com.pax.jdkversiontest -DartifactId=com.pax.jdkversiontest >> -Dversion=1.0.0 >> cd com.hcsc.ccsp.bd.jdkversiontest >> >> 2. update the parent pom.xml to add maven-compiler-plugin >> <build> >> <plugins> >> <plugin> >> <groupId>org.apache.maven.plugins</groupId> >> <artifactId>maven-compiler-plugin</artifactId> >> <version>2.3.1</version> >> <configuration> >> <source>1.6</source> >> <target>1.6</target> >> </configuration> >> </plugin> >> <plugin> >> <groupId>org.ops4j</groupId> >> <artifactId>maven-pax-plugin</artifactId> >> <version>1.5</version> >> </plugin> >> </plugins> >> </build> >> >> 3. Create a bundle project: >> mvn pax:create-bundle -Dpackage=com.pax.jdkversiontest.bundle1 >> -Dversion=1.0.0 >> >> 4.import the projects to eclipse: >> >> 5. Check the JDc version of the bundle project - Its 1.4 >> >> Even if you update the project using mvn pax:eclipse check it into CVS and >> re-import in a fresh workspace all the claapath(.classpth) entries are wiped >> out and the JDK version becomes 1.4. >> >> Its really excruciating and starting to appear that the whole thing might be >> stopped because of this issue becoming a show stopper! >> >> Any ideas please. Its so easy to reproduce also > > unfortunately I can't reproduce it here - if I re-generate the Eclipse > project files using: > > mvn pax:clean pax:eclipse > > and import the project using "Import... -> General -> Existing projects into > workspace" then the compiler version is set to 1.6 as expected > > the only thing I can suggest is that you could try moving this line: > > <extensions>true</extensions> > > from the maven-pax-plugin section in "poms/pom.xml" down to the > maven-bundle-plugin, in case the custom lifecycle is affecting the import > >> Thanks in advance! >> >> Matt >> >> _______________________________________________ >> general mailing list >> [email protected] >> http://lists.ops4j.org/mailman/listinfo/general > > > _______________________________________________ > general mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/general > > > > > _______________________________________________ > general mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/general > > > > > -- > Cheers, Stuart > > _______________________________________________ > general mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/general > > > _______________________________________________ > general mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________ general mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/general
