Maven 1.x Eclipse Plugin
  1. Maven 1.x Eclipse Plugin
  2. MPECLIPSE-66

Custom eclipse variables in .classpath generation

    Details

    • Type: New Feature New Feature
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      WSAD 5.1.2, maven 1.0.2
    • Number of attachments :
      0

      Description

      I miss a feature to be able to add custom Eclipse environment variables to the .classpath file. The maven.eclipse.classpath.include property only works with source directories that are relative to the project root, and cannot be used for this puprpose. Maybe a new maven.eclipse.classpath.variable would solve this.

        Activity

        Hide
        David Eric Pugh added a comment -

        Can you provide more detail on what you are trying to accomplish? What would be a use case for more variables?

        Show
        David Eric Pugh added a comment - Can you provide more detail on what you are trying to accomplish? What would be a use case for more variables?
        Hide
        Nils-Helge Garli added a comment -

        For instance, in our current project, we need to have an external folder with some property files in the classpath. In Eclipse 2.1, one would solve this by adding a environment variable that points to this folder, and add it to the build path of the project. We could solve this by copying the required property files into the project source folder, but this is not what we want, as it can be multiple property files, and they are shared between projects.

        Show
        Nils-Helge Garli added a comment - For instance, in our current project, we need to have an external folder with some property files in the classpath. In Eclipse 2.1, one would solve this by adding a environment variable that points to this folder, and add it to the build path of the project. We could solve this by copying the required property files into the project source folder, but this is not what we want, as it can be multiple property files, and they are shared between projects.
        Hide
        David Eric Pugh added a comment -

        This is what we use:

        maven.eclipse.classpath.include=src/conf,src/test-resources

        That adds the src/conf and src/test-resources to the classpath and then everything works!

        Show
        David Eric Pugh added a comment - This is what we use: maven.eclipse.classpath.include=src/conf,src/test-resources That adds the src/conf and src/test-resources to the classpath and then everything works!
        Hide
        Nils-Helge Garli added a comment -

        Yes, and we do that already for project local properties that reside in a project relative folder. But this is for system wide property files in folders that are referred to with eclipse classpath variables which are outside the project.

        Show
        Nils-Helge Garli added a comment - Yes, and we do that already for project local properties that reside in a project relative folder. But this is for system wide property files in folders that are referred to with eclipse classpath variables which are outside the project.
        Hide
        David Eric Pugh added a comment -

        Okay.. I see, so you are pulling in system wide property files. Now, my question is, how (if you aren't using Eclipse, but instead using Maven) and running goals like maven test or jar, how do those property files get pulled into the classpath?

        Show
        David Eric Pugh added a comment - Okay.. I see, so you are pulling in system wide property files. Now, my question is, how (if you aren't using Eclipse, but instead using Maven) and running goals like maven test or jar, how do those property files get pulled into the classpath?
        Hide
        Nils-Helge Garli added a comment -

        They don't. It's only inside eclipse for integration test clients that we run manually. So it's only relevant for setting up the eclipse project correctly, not for building the project with maven.

        Show
        Nils-Helge Garli added a comment - They don't. It's only inside eclipse for integration test clients that we run manually. So it's only relevant for setting up the eclipse project correctly, not for building the project with maven.
        Hide
        Nils-Helge Garli added a comment -

        I do realise that it might sound a bit out of scope of a maven-plugin, but reality is that we cannot use the eclipse goals if this is not implemented, as we would have to manually add this after every run.

        Show
        Nils-Helge Garli added a comment - I do realise that it might sound a bit out of scope of a maven-plugin, but reality is that we cannot use the eclipse goals if this is not implemented, as we would have to manually add this after every run.

          People

          • Assignee:
            Unassigned
            Reporter:
            Nils-Helge Garli
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: