Git Product home page Git Product logo

promote-maven-plugin's People

Contributors

achaphiv avatar ammmze avatar mjiderhamn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

promote-maven-plugin's Issues

Usage question

I am looking for a way to do only a deploy with Maven.
My current flow is this:

  1. Set the release version. E.g. 7.1.2. Done via a custom script, because the mvn version command is too slow.
  2. Compile the software: mvn clean install -DskipTests -DskipITs -T C1
  3. Run the unit tests: mvn surefire:test -Djavax.xml.accessExternalSchema=all -Djavax.xml.accessExternalDTD=all -DskipITs -T C1
  4. Run the integration tests: mvn -Djavax.xml.accessExternalSchema=all -Djavax.xml.accessExternalDTD=all -DonlyITs
  5. Deploy the software to Nexus (OSS): 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?

The packaging for this project did not assign a file to the build artifact

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>

When deploying jar to remote repository, file not found.

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.

promotion version question

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.