Skip to content

How can I change the version during deploy goal #13

@betonetotbo

Description

@betonetotbo

I'm trying to create a dynamic version control using a groovy script like this:

<build>	
	<plugins>
			<plugin>
				<groupId>org.codehaus.gmaven</groupId>
				<artifactId>groovy-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>execute</goal>
						</goals>
						<configuration>
							<source>
								project.version = '1.0.0'
								project.build.finalName = "${project.name}-1.0.0"
							</source>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
</build>

In this example, I just trying to force the change of the version from 0.0.1-SNAPSHOT to 1.0.0.

The jar file name and it contents is created correct (ex. my-project-1.0.0.jar) but when the deploy goal starts, it deploy the JAR with the old name (my-proejct-0.0.1-SNAPSHOT.jar) on my maven distribution repository.

How can I solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions