Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-15256

Include tycho-source-feature-plugin and tycho-p2-plugin into parent/pom.xml/build/pluginManagement

XMLWordPrintable

    Currently every feature's pom.xml includes the same code, which is code-duplication issue.

    <plugin>
    	<groupId>org.eclipse.tycho.extras</groupId>
    	<artifactId>tycho-source-feature-plugin</artifactId>
    	<version>${tychoExtrasVersion}</version>
    	<executions>
    		<execution>
    			<id>source-feature</id>
    			<phase>package</phase>
    			<goals>
    				<goal>source-feature</goal>
    			</goals>
    		</execution>
    	</executions>
    </plugin>
    <plugin>
    	<groupId>org.eclipse.tycho</groupId>
    	<artifactId>tycho-p2-plugin</artifactId>
    	<version>${tychoVersion}</version>
    	<executions>
    		<execution>
    			<id>attached-p2-metadata</id>
    			<phase>package</phase>
    			<goals>
    				<goal>p2-metadata</goal>
    			</goals>
    		</execution>
    	</executions>
    </plugin>

    It should be included into pluginManagement section of parent/pom.xml instead and that would reduce code duplication to

    <plugin>
    	<groupId>org.eclipse.tycho.extras</groupId>
    	<artifactId>tycho-source-feature-plugin</artifactId>
    </plugin>
    <plugin>
    	<groupId>org.eclipse.tycho</groupId>
    	<artifactId>tycho-p2-plugin</artifactId>
    </plugin>

    in every feture's pom.xml file.

    More over code above could be moved to to features/pom.xml as

    <build>
    	<plugins>
    		<plugin>
    			<groupId>org.eclipse.tycho.extras</groupId>
    			<artifactId>tycho-source-feature-plugin</artifactId>
    		</plugin>
    		<plugin>
    			<groupId>org.eclipse.tycho</groupId>
    			<artifactId>tycho-p2-plugin</artifactId>
    		</plugin>
    	</plugins>
    </build>

    that would let keep pom.xml for every feature even cleaner.

          nivologd@gmail.com Denis Golovin (Inactive)
          nivologd@gmail.com Denis Golovin (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          5 Start watching this issue

            Created:
            Updated:
            Resolved: