mjiderhamn / promote-maven-plugin Goto Github PK
View Code? Open in Web Editor NEWMaven plugin for promoting SNAPSHOT builds to releases
License: Apache License 2.0
Maven plugin for promoting SNAPSHOT builds to releases
License: Apache License 2.0
When trying to promote ejb module that also generated a client . promotable-artifacts.properties haas multiple entry for one client.
I am looking for a way to do only a deploy with Maven.
My current flow is this:
7.1.2
. Done via a custom script, because the mvn version command is too slow.mvn clean install -DskipTests -DskipITs -T C1
mvn surefire:test -Djavax.xml.accessExternalSchema=all -Djavax.xml.accessExternalDTD=all -DskipITs -T C1
mvn -Djavax.xml.accessExternalSchema=all -Djavax.xml.accessExternalDTD=all -DonlyITs
mvn deploy -DskipTests -DskipITs -Dmaven.validate.skip=true -Dmaven.compile.skip=true -Dmaven.test.skip=true -Dmaven.package.skip=true -Dmaven.integration-test.skip=true -Dmaven.verify.skip=true -T 1C
Can I use this plugin with this flow?
My understanding is that I could use it as follows.
Step 1: mvn clean install promote:make-promotable -DskipTests -DskipITs -T C1
Step 5: mvn promote:artifacts deploy:deploy -T 1C
.
The effect of this would then be that step 5 only uploads the artifacts to Nexus, and does not execute any other steps.
Is this correct?
I'm getting this error.
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
(default-cli) on project da-dsa:
The packaging for this project did not assign a file to the build artifact -> [Help 1]
[INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-cli) on project da-dsa:
The packaging for this project did not assign a file to the build artifact
Here's my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test.xyzcm</groupId>
<artifactId>global-settings</artifactId>
<version>1.5</version>
<relativePath>../../global-settings/trunk</relativePath>
</parent>
<groupId>test.xyzcm.portal.dsa</groupId>
<artifactId>da-dsa</artifactId>
<packaging>ear</packaging>
<version>1.16-SNAPSHOT</version>
<name>da-dsa</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>test.xyzcm.portal.dsa</groupId>
<artifactId>dsa-entity</artifactId>
<version>1.4</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<properties>
<modjsf.version>1.4</modjsf.version>
</properties>
<scm>
<developerConnection>scm:svn:http://svnhost:8080/svn/xyz/jsf/Test/da-dsa/trunk</developerConnection>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<modules>
<jarModule>
<groupId>test.xyzcm.portal.dsa</groupId>
<artifactId>dsa-entity</artifactId>
<bundleDir>lib</bundleDir>
</jarModule>
</modules>
<filtering>true</filtering>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<completionGoals>promote:artifacts deploy:deploy</completionGoals>
</configuration>
</plugin>
<plugin>
<groupId>se.jiderhamn</groupId>
<artifactId>promote-maven-plugin</artifactId>
<version>1.0.2</version>
</plugin>
</plugins>
</build>
</project>
This seems to be an issue when deploying jar artifacts to a remote repository. Using maven-deploy-plugin (deploy:deploy), this does not provide any context during mvn lifecycle in order to find artifacts. This results in an error...
The packaging for this project did not assign a file to the build artifact.
Running just 'deploy' works, but this executes the entire lifecycle which would defeat the purpose of a build promotion. Need a way to provide back to the process the location for last build artifacts in the workspace or local file system.
I have a zip assembly that is made up of a project jar. Both the zip file and the the project jar it contains need to have the same version.
During a snapshot build both contain the correct snapshot version.
However, when running the mvn promote plugin the zip file is updated correctly with the release version but the project jar inside it still contain -SNAPSHOT in the version. This is the promote command that I run:
--settings ${WORKSPACE}/../../settings.xml -B release:clean promote:prepare -Dtag=${PROMOTED_PRODUCTION_VERSION} release:prepare -DreleaseVersion=${PROMOTED_MVN_VERSION} -DdevelopmentVersion=${PROMOTED_MVN_DEVELOPMENT_VERSION}
In my pom file:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${finalName}</finalName>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<mainClass>${mainClass}</mainClass>
</manifest>
</archive>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
<execution>
<id>distribution</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${finalName}</finalName>
<filters>
<filter>src/main/assembly/filter.properties</filter>
</filters>
<descriptors>
<descriptor>src/main/assembly/distribution.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
The assembly file:
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>distribution</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<files>
<file>
<source>Dockerfile</source>
<outputDirectory></outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>Dockerrun.aws.json</source>
<outputDirectory></outputDirectory>
</file>
<file>
<source>
target/${finalName}.jar
</source>
<outputDirectory>target</outputDirectory>
</file>
</files>
</assembly>
The resulting promoted zip is: name-1.0.0.0.zip and it contains a jar name-1.0.0.0-SNAPSHOT.jar. The jar name-1.0.0.0.jar is created and deployed to artifactory. How can I also make sure name-1.0.0.0.jar is contained within the assembly as well?
The contents of promotable-artifacts.properties (note that due to the CI setup I am overriding the version in the pom file with a new version that is passed to the build.)
#Generated by promote-maven-plugin #Tue Jun 06 11:46:27 CDT 2017 attached.0.classifier=distribution artifact.id=com.lifesize\:cloud.service.callhistory\:jar\:1.0.1.0-SNAPSHOT artifact.baseVersion=1.0.1.0-SNAPSHOT attached.0.id=com.lifesize\:cloud.service.callhistory\:zip\:distribution\:1.0.1.0-SNAPSHOT attached.0.baseVersion=1.0.1.0-SNAPSHOT attached.0.artifactId=cloud.service.callhistory artifact.type=jar artifact.groupId=com.lifesize attached.0.type=zip attached.0.groupId=com.lifesize artifact.version=1.0.1.0-SNAPSHOT artifact.artifactId=cloud.service.callhistory attached.0.version=1.0.1.0-SNAPSHOT artifact.file=release_1.0.0.0-SNAPSHOT_Callhistory-63.jar attached.0.file=release_1.0.0.0-SNAPSHOT_Callhistory-63-distribution.zip
Thanks
Event: Failed: Javadoc Validation
Saturday, May 21, 2016 03:13:40 PHT (GMT+0800)
typeId javadoc-staging
failureMessage Missing: no javadoc jar found in folder '/com/dyuproject/protostuff/protostuff-json/1.0.10'
https://github.com/dyu/protostuff-1.0.x
Is there a config that would upload the javadoc jars as well?
To be used as preparationGoals
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.