[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] how make jars in .m2 in local maven repository as <finalName> ?

I have this configuration in parrent pom.xml:

<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<version>1.1</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<doCheck>false</doCheck>
					<doUpdate>false</doUpdate>
					<providerImplementations>
						<svn>javasvn</svn>
					</providerImplementations>       
				</configuration>
			</plugin>
			
			
	<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <id>parse-version</id>
            <goals>
              <goal>parse-version</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
	  

			<plugin>				
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-packaging-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>				
						<phase>validate</phase>
						<goals>
							<goal>build-qualifier</goal>
						</goals>
						<configuration>
							<forceContextQualifier>${buildNumber}</forceContextQualifier>
						</configuration>
					</execution>
				</executions>
			</plugin>	
		</plugins>  
	<finalName>${project.artifactId}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-${buildNumber}</finalName>
	</build>

with this. I can get eg this in target folder of one module>  com.example.mine-1.0.0-2507.jar
but in local maven repository I still get com.example.mine-1.0.0-SNAPSHOT.jar  (thats the version in pom.xml)
if use :

<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-versions-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>				
						<phase>validate</phase>
						<goals>
							<goal>set-version</goal>
						</goals>
						<configuration>
							<newVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-${buildNumber}</newVersion>
						</configuration>
					</execution>
				</executions>
			</plugin>

build error will appear, that 0-2570 isnt number. I thougt that the the plugin can recoginze that the version is x.y.z-qualifier

So how to achieve to have the naming in .m2 repo as is defined in <finalName>?
${project.artifactId}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-${buildNumber}

D.