You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Arik Kfir <ar...@gmail.com> on 2005/09/25 18:07:09 UTC

[m2] source:jar, phase-binding, and build numbers

Hi all,

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).

Am I doing something wrong?

Thanks,
  Arik.

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


Re: [m2] source:jar, phase-binding, and build numbers

Posted by Brett Porter <br...@gmail.com>.
It's a bug, please put it in JIRA.

- Brett

On 9/26/05, Arik Kfir <ar...@gmail.com> wrote:
> Hi all,
>
> 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).
>
> Am I doing something wrong?
>
> Thanks,
>   Arik.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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