Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [buckminster-dev] Updating the classpath when the cspec changes

Carlos Sanchez wrote:
I think that it shouldn't be a problem if the project is a Maven2
project (pom.xml is present)

If it's a maven2 project AND a OSGi bundle the manifest generation would
be in the pom.xml so everything should work.

Doesn't that complicate things further? To me it sounds like Buckminster must recognize the fact that in some cases a manifest will be generated from the pom and thus, not add it's own classpath container.

I think we should explore these use-cases a bit more. For instance, in what order will things happen? A component is downloaded, perhaps some actions are executed, the resulting project is bound to the Eclipse workspace. When is the manifest generated by Maven? When would Buckminster modify the classpath if that's called for?

- thomas




Thomas Hallgren wrote:
Hi Carlos,
Yes, we could of course add the classpath container automatically when
pom file is added (or discovered). I see a couple of problems with that
approach though. Assume that the project is an OSGi bundle and the pom
dependencies reflect jars that the bundle must have in order to
function. Such jars must be added to the manifest.mf and when they are,
they will be automatically included in the PDE classpath container and
any attempt to also add the Buckminster classpath container will result
in a collision.

Perhaps an interim solution until we've worked out all possible cases
would be to add the Buckminster classpath container in case no other
classpath container is present.

What do you think?

- thomas


Carlos Sanchez wrote:
After Thomas change, every time a pom.xml file in a maven project is
updated the CSpec is also updated with the dependencies from the pom.

Would it be possible to also update the project classpath?

My .classpath look like this

<classpath>
  <classpathentry kind="src" path="src/main/java"/>
  <classpathentry kind="src" output="target/test-classes"
    path="src/test/java"/>
  <classpathentry kind="con"
    path="org.eclipse.buckminster.jdt.requiredComponents"/>
  <classpathentry kind="con"
    path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  <classpathentry kind="output" path="target/classes"/>
</classpath>

I added by hand the buckminster classpathentry
_______________________________________________
buckminster-dev mailing list
buckminster-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/buckminster-dev



Back to the top