You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mario Ivankovits <ma...@ops.co.at> on 2006/03/13 14:13:16 UTC
exclude -source.jar from deployment
Hi!
Is it possible to avoid the -source.jar from being deployed to the
repository?
Thanks!
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: exclude -source.jar from deployment
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> Is it possible to avoid the -source.jar from being deployed to the
> repository?
>
Ok, I solved it using profiles.
They trigger if a -source.jar should be created or not and use a
different repository.
It can be changed using -DbuildFor=inhouse or -DbuildFor=public.
If someone is interested here is the pom.xml
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-source</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<attach>${attach.source}</attach>
</configuration>
</plugin>
<distributionManagement>
<repository>
<id>ops</id>
<name>ops</name>
<url>${repos.url}</url>
</repository>
<snapshotRepository>
<id>ops-snapshot</id>
<name>ops snapshots</name>
<url>${repos.url}</url>
</snapshotRepository>
</distributionManagement>
<profiles>
<profile>
<id>inhouse</id>
<activation>
<property>
<name>buildFor</name>
<value>inhouse</value>
</property>
</activation>
<properties>
<attach.source>true</attach.source>
<repos.url>XXXX-private-repository-XXXX</repos.url>
</properties>
</profile>
<profile>
<id>public</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<attach.source>false</attach.source>
<repos.url>XXXX-public-repository-XXXX</repos.url>
</properties>
</profile>
</profiles>
Ciao,
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org