Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-1021

Build numbers are incremented when they shouldn't

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta-1
    • 2.0 (RC)
    • None
    • None
    • Fedora 4, JDK 1.5.0_04, Maven 2 beta 1

    Description

      I have a project built using m2. I want the project to install/deploy
      a source-code JAR along with the binaries JAR (on both the install and
      deploy phases). I've added the following section in the pom.xml file:

      <build>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-source-plugin</artifactId>
      <executions>
      <execution>
      <goals>
      <goal>jar</goal>
      </goals>
      </execution>
      </executions>
      </plugin>
      </plugins>
      </build>

      It works very nice, except for one problem: the sources JAR always
      gets a new build number. For instance, assuming I clean my local repo,
      and then run "m2 install", the local repo will contain:
      myproject-20050925.155953-1.jar
      myproject-20050925.155953-2-sources.jar

      Shouldn't they have the same build number?

      This causes a problem because the maven-metadata.xml file specifies
      that the current build number is 2, and so, projects depending on that
      project can't find the file (since there's no binary JAR for build
      number 2, only for build 1).

      Attachments

        1. pom.xml
          5 kB
          Arik Kfir

        Issue Links

          Activity

            People

              jdcasey John Dennis Casey
              arikkfir Arik Kfir
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 3h Original Estimate - 3h
                  3h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h