Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Labels:
      None
    • Number of attachments :
      5

      Description

      Actually maven repository doesn't contain source artifacts, however it would be nice if eclipse users could have a way to handle source for jars and have them added to eclipse .classpath (needed for debug and javadocs).

      The attached path let users store sources in the local maven repository in the same way other artifacts are managed. Through the modification of the jar path the plugin will look for the sources file and, if existing, it will add them to the .classpath file.

      The position of src files is controlled by 2 plugin properties: maven.eclipse.src.dir (directory for source artifact type) and maven.eclipse.src.extension (extension for files). These are temporarely managed as eclipse plugin properties till there is a standard maven default for them.

      As an example, using the default values for these properties:
      MAVEN_REPO/eclipse/jars/eclipse-ui-3.0.0.jar
      will be mapped to
      MAVEN_REPO/eclipse/src/eclipse-ui-3.0.0.zip

      If the source zip is not available, it will not be added to the classpath file, so it will not cause any problem to users who don't have sources in their local repository.

      1. MPECLIPSE-48_updated.diff
        5 kB
        fabrizio giustina
      2. MPECLIPSE-48.3_with_plugin_tests.diff
        12 kB
        fabrizio giustina
      3. MPECLIPSE-48.4_added_tag.diff
        11 kB
        fabrizio giustina
      4. MPECLIPSE-48.5_tag_after_emmanuel_commit.diff
        7 kB
        fabrizio giustina
      5. MPECLIPSE-48.diff
        4 kB
        fabrizio giustina

        Issue Links

          Activity

          Hide
          David Eric Pugh added a comment -

          Did you pick up the changes that Emmanuel Venisse added?

          Show
          David Eric Pugh added a comment - Did you pick up the changes that Emmanuel Venisse added?
          Hide
          David Eric Pugh added a comment -

          I have applied and committed the patch. However, i think this introduced a bug.. the src/java directory is being added multiple times now...

          Show
          David Eric Pugh added a comment - I have applied and committed the patch. However, i think this introduced a bug.. the src/java directory is being added multiple times now...
          Hide
          David Eric Pugh added a comment -

          Discussion on mailing list resolved my last concern.

          Show
          David Eric Pugh added a comment - Discussion on mailing list resolved my last concern.
          Hide
          Andreas Schönknecht added a comment -

          Maven does contain some support for src.zip's already. When running the "dist" goals, a src.zip is built, named <artifactId>-<version>-src.zip.
          This files is stored in the remote repository in a directory called "distributions". It would be nice if the Eclipse-Plugin would look there instead of the local repository, so I dont have to manually copy and rename them. Perhaps the "generate-classpath"-Goal could copy all needed src.zips from the remote repository distributions-directory to the local repository.
          Before version 1.9 of Eclipse-Plug I worked as followed:
          1. Edit the project.xml
          2. Run eclipse:generate-classpath
          3. Attach Sources manually in Eclipse via a Classpath variable that points to our remote-repository and expanding it to the src.zip in the distributions folder.

          Show
          Andreas Schönknecht added a comment - Maven does contain some support for src.zip's already. When running the "dist" goals, a src.zip is built, named <artifactId>-<version>-src.zip. This files is stored in the remote repository in a directory called "distributions". It would be nice if the Eclipse-Plugin would look there instead of the local repository, so I dont have to manually copy and rename them. Perhaps the "generate-classpath"-Goal could copy all needed src.zips from the remote repository distributions-directory to the local repository. Before version 1.9 of Eclipse-Plug I worked as followed: 1. Edit the project.xml 2. Run eclipse:generate-classpath 3. Attach Sources manually in Eclipse via a Classpath variable that points to our remote-repository and expanding it to the src.zip in the distributions folder.
          Hide
          David Eric Pugh added a comment -

          That is actually a good point about the src created by the dist goal. A patch would be appreciated. I was mostly interested in getting a barebones implementation in.

          Show
          David Eric Pugh added a comment - That is actually a good point about the src created by the dist goal. A patch would be appreciated. I was mostly interested in getting a barebones implementation in.

            People

            • Assignee:
              David Eric Pugh
              Reporter:
              fabrizio giustina
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: