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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to