You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rice Yeh <ri...@gmail.com> on 2008/11/11 04:08:45 UTC
How to install a source jar with classifier?
Hi,
I have a artifact with classifer. I want to install source jar with
classifier also. Although I can generate the source jar with classifier. But
I find the source jar installed in local repository is still without
classifier as shown in the following:
<!-- configure plugin to generate classifier -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<finalName>${project.build.finalName}-jdk15</finalName>
</configuration>
</plugin>
* installation still install as-measurement-1.0
.0-SNAPSHOT-jdk15-sources.jar to as-measurement-1.0.0-SNAPSHOT-sources.jar
[INFO] Installing
C:\projects\xsf\jdk15\as-measurement\target\as-measurement-1.0
.0-SNAPSHOT-jdk15-sources.jar to C:\Documents and
Settings\riceyeh\.m2\repositor
y\as\as-measurement\1.0.0-SNAPSHOT\as-measurement-1.0.0-SNAPSHOT-sources.jar
Regards,
Rice
Re: How to install a source jar with classifier?
Posted by Wayne Fay <wa...@gmail.com>.
> I have a artifact with classifer. I want to install source jar with
> classifier also. Although I can generate the source jar with classifier. But
> I find the source jar installed in local repository is still without
> classifier as shown in the following:
I'm not sure that it makes sense to install a source artifact with a
classifier. You should have a single source jar and then use profiles
etc to create various jdk-specific binaries from it. I don't think its
valid to have blah-jdk15-sources.jar and blah-jdk16-sources.jar etc.
You might still find a way to do it, of course.
Also, you should be aware that <finalName> does not apply when
installing things into the repo -- it is a configuration parameter
which is ignored. The finalName configuration only changes the name of
the file created in /target.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to install a source jar with classifier?
Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Nov 11, 2008 at 1:38 PM, Rice Yeh <ri...@gmail.com> wrote:
> Hi,
> I have a artifact with classifer. I want to install source jar with
> classifier also. Although I can generate the source jar with classifier. But
> I find the source jar installed in local repository is still without
> classifier as shown in the following:
>
> <!-- configure plugin to generate classifier -->
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-source-plugin</artifactId>
> <configuration>
> <finalName>${project.build.finalName}-jdk15</finalName>
> </configuration>
> </plugin>
>
> * installation still install as-measurement-1.0
> .0-SNAPSHOT-jdk15-sources.jar to as-measurement-1.0.0-SNAPSHOT-sources.jar
>
> [INFO] Installing
> C:\projects\xsf\jdk15\as-measurement\target\as-measurement-1.0
> .0-SNAPSHOT-jdk15-sources.jar to C:\Documents and
> Settings\riceyeh\.m2\repositor
> y\as\as-measurement\1.0.0-SNAPSHOT\as-measurement-1.0.0-SNAPSHOT-sources.jar
I'm sorry I'm not going to be much help.
Suggestions are:
Have you run with mvn -X to see how the plugin is being configured.
That may give you some clues as to the value being used.
Then you might want to pull out the maven-source-plugin source and see
what it is doing with this value.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org