I just had a long struggle with tracking down why I got the error message "No primary artifact to install, installing attached artifacts instead." from my product build (<packaging>eclipse-repository</packaging>).
Thought I would mention the cause/solution for anyone else interested.
It turns out that the parent pom had the maven-source-plugin configured:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.3</version>
<inherited>true</inherited>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<finalName>${project.build.finalName}</finalName>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
Apparently, the goal "jar" seems to fork because there is also another goal "jar-no-fork".
Binding the execution to <goal>jar-no-fork</goal> in my parent pom fixes the build.
It is only speculation from my side but could it be that tycho's own forking is conflicting with maven-source-plugin and causing an extra clean to run while gathering the sources. When the maven-install-plugin is eventually executed, everything but the attached sources have been removed.
I reproduced this in tycho-demo\itp04-rcp [1] by adding the plugin configuration to itp04-rcp\eclipse-repository\pom.xml
Before I found this out the only way I could complete a build was to use "-Dclean.skip=true".
//Marcus