You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Markus Wiederkehr <ma...@gmail.com> on 2007/03/19 17:23:26 UTC

Eclipse PDE questions/suggestions

I have a two questions regarding the Maven Eclipse plugin and
especially its PDE mode...

1) I would like to use ${groupId}.${artifactId} instead of the
artifact ID alone as project name in .project and (more importantly)
as Bundle-SymbolicName in META-INF/MANIFEST.MF. Is this possible?

2) In PDE mode the plugin creates <linkedResources> in the .project
file.. At this point it uses the absolute path of the jar file for the
<location> element. I think a better solution would be to define a
path variable (similar to M2_REPO) under
"Preferences/General/Workspace/Linked Resources" and make the location
relative to that path variable. "mvn eclipse:add-maven-repo" should
also add this variable to the workspace.

The absolute path should be removed from source attachments in
.classpath too. One way to accomplish this would be to create another
link in .project and use it as sourcepath in .classpath.

Here's an example that seems to work:

.project:
  <linkedResources>
    <link>
      <name>ognl-2.6.9.jar</name>
      <type>1</type>
      <location>M2/ognl/ognl/2.6.9/ognl-2.6.9.jar</location>
    </link>
    <link>
      <name>ognl-2.6.9-sources.jar</name>
      <type>1</type>
      <location>M2/ognl/ognl/2.6.9/ognl-2.6.9-sources.jar</location>
    </link>
  </linkedResources>

.classpath:
  <classpathentry kind="lib" path="ognl-2.6.9.jar"
sourcepath="ognl-2.6.9-sources.jar"/>

where M2 is a path variable defined under
"Preferences/General/Workspace/Linked Resources" or in
~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
respectively.

Thanks
Markus

-- 
Always remember you're unique. Just like everyone else.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Eclipse PDE questions/suggestions

Posted by Ole Ersoy <ol...@gmail.com>.
Hi Markus,

I need to play with the  PDE feature of the eclipse plugin more,
but I did write an archetype for generating baseline eclipse 
documentation plugins
that you can see here:

https://svn.apache.org/repos/asf/directory/sandbox/oersoy/documentation.checklist.parent

It's actually a checklist / recipe documentation generator, but if you
run the archetype it will generate a baseline eclipse project with
${groupId}.${artifactId} in plugin.xml

So one way you could get things going is to just modify the archetype, 
add a few templates
maybe, and just use the archetype plugin to generate the baseline for 
your project.

Cheers,
- Ole




Markus Wiederkehr wrote:
> I have a two questions regarding the Maven Eclipse plugin and
> especially its PDE mode...
>
> 1) I would like to use ${groupId}.${artifactId} instead of the
> artifact ID alone as project name in .project and (more importantly)
> as Bundle-SymbolicName in META-INF/MANIFEST.MF. Is this possible?
>
> 2) In PDE mode the plugin creates <linkedResources> in the .project
> file.. At this point it uses the absolute path of the jar file for the
> <location> element. I think a better solution would be to define a
> path variable (similar to M2_REPO) under
> "Preferences/General/Workspace/Linked Resources" and make the location
> relative to that path variable. "mvn eclipse:add-maven-repo" should
> also add this variable to the workspace.
>
> The absolute path should be removed from source attachments in
> .classpath too. One way to accomplish this would be to create another
> link in .project and use it as sourcepath in .classpath.
>
> Here's an example that seems to work:
>
> .project:
>  <linkedResources>
>    <link>
>      <name>ognl-2.6.9.jar</name>
>      <type>1</type>
>      <location>M2/ognl/ognl/2.6.9/ognl-2.6.9.jar</location>
>    </link>
>    <link>
>      <name>ognl-2.6.9-sources.jar</name>
>      <type>1</type>
>      <location>M2/ognl/ognl/2.6.9/ognl-2.6.9-sources.jar</location>
>    </link>
>  </linkedResources>
>
> .classpath:
>  <classpathentry kind="lib" path="ognl-2.6.9.jar"
> sourcepath="ognl-2.6.9-sources.jar"/>
>
> where M2 is a path variable defined under
> "Preferences/General/Workspace/Linked Resources" or in
> ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs 
>
> respectively.
>
> Thanks
> Markus
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org