Hi,

On 11/11/15 4:27 PM, [email protected] wrote:

    this reason, future Maven versions might no longer support building
    such malformed projects. [WARNING] [INFO]

The warning which is above this has some important information in it...I assume versions etc. which have not been defined...


    [INFO] 
------------------------------------------------------------------------
    [INFO] Building test.jenkins 0.0.1-SNAPSHOT
    [INFO] 
------------------------------------------------------------------------
    [INFO]
    [INFO]*--- maven-clean-plugin:2.5:clean (default-clean) @ test.jenkins --- 
*[INFO] Deleting C:\Program Files (x86)\Jenkins\workspace\myproject\target
    [INFO]
    [INFO]*--- maven-resources-plugin:2.6:resources (default-resources) @
    test.jenkins --- *[WARNING] Using platform encoding (Cp1252
    actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] skip non existing resourceDirectory C:\Program Files 
(x86)\Jenkins\workspace\myproject\src\main\resources

You should define the encoding for your build which means:

<project>
  ...
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  ...
</project>




    [INFO]
    [INFO]*--- maven-compiler-plugin:3.3:compile (default-compile) @
    test.jenkins --- *

    [INFO] No sources to compile
    [INFO]
    [INFO]*--- maven-resources-plugin:2.6:testResources (default-testResources)
    @ test.jenkins --- *[WARNING] Using platform encoding (Cp1252
    actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] skip non existing resourceDirectory C:\Program Files 
(x86)\Jenkins\workspace\myproject\src\test\resources
    [INFO]
    [INFO]*--- maven-compiler-plugin:3.3:testCompile (default-testCompile) @
    test.jenkins --- *[INFO] Changes detected - recompiling the module!
    [WARNING] File encoding has not been set, using platform encoding
    Cp1252, i.e. build is platform dependent! [INFO] Compiling 1 source file to 
C:\Program Files (x86)\Jenkins\workspace\myproject\target\test-classes



How is you test named? Based on the naming conventions of maven-surefire-plugin ?



    [INFO]
    [INFO]*--- maven-surefire-plugin:2.12.4:test (default-test) @ test.jenkins
    --- *

    [JENKINS] Recording test results
    [INFO] 
------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] 
------------------------------------------------------------------------
    [INFO] Total time: 7.325 s
    [INFO] Finished at: 2015-11-10T16:51:07+05:30

    [INFO] Final Memory: 18M/224M
    [INFO] 
------------------------------------------------------------------------
    [ERROR] Failed to execute goal
    org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
    (default-test) on project test.jenkins: No tests were executed! (Set
    -DfailIfNoTests=false to ignore this error.) -> [Help 1] [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with


Here Maven says simply that it doesn't found any test......



    the -e switch. [ERROR] Re-run Maven using the -X switch to enable
    full debug logging. [ERROR] [ERROR] For more information about the
    errors and possible solutions, please read the following articles:
    [ERROR] [Help 1]
    http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 
<http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException>
    [JENKINS] Archiving C:\Program Files 
(x86)\Jenkins\workspace\myproject\pom.xml to 
test.jenkins/test.jenkins/0.0.1-SNAPSHOT/test.jenkins-0.0.1-SNAPSHOT.pom
    channel stopped

    Finished: FAILURE



    pom.xml

    <project xmlns="http://maven.apache.org/POM/4.0.0
    <http://maven.apache.org/POM/4.0.0>"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
    <http://www.w3.org/2001/XMLSchema-instance>"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    <http://maven.apache.org/POM/4.0.0>
    http://maven.apache.org/xsd/maven-4.0.0.xsd
    <http://maven.apache.org/xsd/maven-4.0.0.xsd>">
       <modelVersion>4.0.0</modelVersion>
       <groupId>test.jenkins</groupId>
       <artifactId>test.jenkins</artifactId>
       <version>0.0.1-SNAPSHOT</version>
    <dependencies>
       <dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
             <version>6.1.1</version>
             <scope>compile</scope>
         </dependency>
    </dependencies>
    <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                  <configuration>
                     <source>1.6</source>
                     <target>1.6</target>
                 </configuration>
             </plugin>
             <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.16</version>
                     </configuration> -->
                 </plugin>
         </plugins>
    </build>
       <reporting>
         <plugins>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-surefire-report-plugin</artifactId>
             <!-- <version>2.19</version> -->
           </plugin>
         </plugins>
       </reporting>
    </project>


You have to keep the versions of maven-surefire-plugin, maven-failsafe-plugin and maven-surefire-report-pugin in sync which means always use the same version....


Kind regards
Karl Heinz Marbaise

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/56435F8E.2000903%40gmx.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to