Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 397374

Summary: Tycho fails to inject the ${project.artifacts} property
Product: z_Archived Reporter: Johannes Dorn <johannes.dorn>
Component: TychoAssignee: Project Inbox <tycho-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: jan.sievers, johannes.dorn
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Johannes Dorn CLA 2013-01-03 09:02:57 EST
Tycho fails to inject the ${project.artifacts} property, which causes the maven-cal10n-plugin to fail, as it relies on said property to locate the project's direct dependencies. While the failure (see <http://jira.qos.ch/browse/CAL-31> for a detailed diagnosis and an example project) is IMHO not solely Tycho's fault, it should nevertheless inject this property so that plugins like the maven-cal10n-plugin work the same with and without Tycho.
Comment 1 Jan Sievers CLA 2013-01-07 05:11:11 EST
tycho-injected maven dependencies are all system-scoped; 
not sure but this may be the reason they don't show up in MavenProject#artifacts
Comment 2 Jan Sievers CLA 2013-01-15 16:07:05 EST
(In reply to comment #0)
> Tycho fails to inject the ${project.artifacts} property, 

I doubt this. do you have a sample project that proves ${project.artifacts} is empty although it shouldn't?

I suspect the bug in cal10n:

https://github.com/ceki/cal10n/blob/master/maven-cal10n-plugin/src/main/java/ch/qos/cal10n/plugins/VerifyMojo.java#L171

assumes that dependencies are always coming from the local maven repo.

this is wrong for at least two cases:

1. intra-reactor dependencies must be mapped to correpoding target/classes/ folder of the corresponding module
2. system-scoped dependencies are not in the local maven repo in general

If you can't provide a sample project that proves ${project.artifacts} is not injected, we will close this bug as NOT_ECLIPSE.
Comment 3 Jan Sievers CLA 2013-02-22 09:27:43 EST
you can use the following pom.xml snippet that shows that ${project.artifacts} is actually injected:

<plugin>
    <groupId>org.codehaus.gmaven</groupId>
    <artifactId>gmaven-plugin</artifactId>
    <executions>
        <execution>
            <phase>generate-resources</phase>
            <goals>
                <goal>execute</goal>
            </goals>
            <configuration>
                <source>
                    System.out.println("${project.artifacts}: "+project.getArtifacts())
                </source>
            </configuration>
        </execution>
    </executions>
</plugin>