Jenkins

Discussion in 'Plugin Development' started by frankrd3, Mar 17, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    frankrd3

    Hello,

    I'm trying to setup a Jenkins server, I have it all setup my only problem is when I tell it to make a build it always errors and complains about something is wrong in the pom.xml. Is there someone who can provide me with some assistance?
     
  2. Offline

    Nitnelave

    Providing the errors, complaints and the pom.xml would be helpful... We can't guess your problem.
     
    Comphenix likes this.
  3. Offline

    frankrd3


    Okay,
    The pom.xml...

    HTML:
    <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/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.frankrd3</groupId>
        <artifactId>SimpleRequest</artifactId>
        <version>1.1</version>
        <packaging>jar</packaging>
        <name>SimpleRequest</name>
        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
        <dependencies>
            <dependency>
                <groupId>org.bukkit</groupId>
                <artifactId>bukkit</artifactId>
                <version>1.5-R0.1-SNAPSHOT</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>
        </dependencies>
        <distributionManagement>
            <repository>
                <id>repobo-rel</id>
                <name>repo.bukkit.org Releases</name>
                <url>http://repo.bukkit.org/content/groups/public/org/bukkit/bukkit/</url>
            </repository>
            <snapshotRepository>
                <id>repobo-snap</id>
                <name>repo.bukkit.org Snapshots</name>
                <url>http://repo.bukkit.org/content/groups/public/org/bukkit/bukkit/</url>
            </snapshotRepository>
        </distributionManagement>
     
        <repositories>
            <repository>
                <id>repobo-snap</id>
                <url>http://repo.bukkit.org/content/groups/public</url>
            </repository>
        </repositories>
     
        <pluginRepositories>
            <pluginRepository>
                <id>bukkit-plugins</id>
                <url>http://repo.bukkit.org/content/groups/public</url>
            </pluginRepository>
        </pluginRepositories>
        <description>A Easy to use and Simple solution to requesting staff.</description>
        <url>https://github.com/Frankrd3/SimpleRequest</url>
        <scm>
            <connection>scm:git:https://github.com/Frankrd3/SimpleRequest.git</connection>
            <developerConnection>scm:git:https://github.com/Frankrd3/SimpleRequest.git</developerConnection>
            <url>https://github.com/Frankrd3/SimpleRequest</url>
        </scm>
        <build>
            <sourceDirectory>${basedir}/src</sourceDirectory>
            <resources>
                <resource>
                    <targetPath>.</targetPath>
                    <filtering>true</filtering>
                    <directory>.</directory>
                    <includes>
                        <include>plugin.yml</include>
                        <include>README</include>
                        <include>LICENSE</include>
                    </includes>
                </resource>
            </resources>
            <defaultGoal>clean install</defaultGoal>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.1</version>
                        <configuration>
                            <archive>
                                <addMavenDescriptor>false</addMavenDescriptor>
                            </archive>
                            <finalName>SimpleRequest-1.1-SNAPSHOT</finalName>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.0.2</version>
                        <configuration>
                            <source>1.5</source>
                            <target>1.5</target>
                        </configuration>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
    </project>
     
  4. Offline

    Nitnelave

    try to run
    mvn dependency:list
    and check if there are any warning messages. If there are any, you can see the problems with
    mvn dependency:list -X

    You can always try a mvn clean install
     
  5. Offline

    frankrd3

    Alright so I got this:
    Code:
    [root@frankrd3~]# mvn clean install
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.110s
    [INFO] Finished at: Sun Mar 17 19:54:00 CET 2013
    [INFO] Final Memory: 10M/361M
    [INFO] ------------------------------------------------------------------------
    [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/root). Please verify you invoked Maven from the correct directory. -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with 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/MissingProjectException
    
    Code:
    [root@frankrd3~]# mvn dependency:list -X
    Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
    Maven home: /usr/local/maven
    Java version: 1.7.0_09-icedtea, vendor: Oracle Corporation
    Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre
    Default locale: en_US, platform encoding: UTF-8
    OS name: "linux", version: "3.2.13-grsec-xxxx-grs-ipv6-64", arch: "amd64", family: "unix"
    [INFO] Error stacktraces are turned on.
    [DEBUG] Reading global settings from /usr/local/maven/conf/settings.xml
    [DEBUG] Reading user settings from /root/.m2/settings.xml
    [DEBUG] Using local repository at /root/.m2/repository
    [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /root/.m2/repository
    [INFO] Scanning for projects...
    [DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
    [DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
    [DEBUG] Resolving plugin prefix dependency from [org.apache.maven.plugins, org.codehaus.mojo]
    [DEBUG] Resolved plugin prefix dependency to org.apache.maven.plugins:maven-dependency-plugin from POM org.apache.maven:standalone-pom:pom:1
    [DEBUG] === REACTOR BUILD PLAN ================================================
    [DEBUG] Project: org.apache.maven:standalone-pom:pom:1
    [DEBUG] Tasks:  [dependency:list]
    [DEBUG] Style:  Regular
    [DEBUG] =======================================================================
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Maven Stub Project (No POM) 1
    [INFO] ------------------------------------------------------------------------
    [DEBUG] Resolving plugin prefix dependency from [org.apache.maven.plugins, org.codehaus.mojo]
    [DEBUG] Resolved plugin prefix dependency to org.apache.maven.plugins:maven-dependency-plugin from POM org.apache.maven:standalone-pom:pom:1
    [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
    [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
    [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
    [DEBUG] === PROJECT BUILD PLAN ================================================
    [DEBUG] Project:      org.apache.maven:standalone-pom:1
    [DEBUG] Dependencies (collect): []
    [DEBUG] Dependencies (resolve): [test]
    [DEBUG] Repositories (dependencies): [central (http://repo.maven.apache.org/maven2, releases)]
    [DEBUG] Repositories (plugins)    : [central (http://repo.maven.apache.org/maven2, releases)]
    [DEBUG] -----------------------------------------------------------------------
    [DEBUG] Goal:          org.apache.maven.plugins:maven-dependency-plugin:2.1:list (default-cli)
    [DEBUG] Style:        Regular
    [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <classifier default-value="">${classifier}</classifier>
      <excludeArtifactIds default-value="">${excludeArtifactIds}</excludeArtifactIds>
      <excludeClassifiers default-value="">${excludeClassifiers}</excludeClassifiers>
      <excludeGroupIds default-value="">${excludeGroupIds}</excludeGroupIds>
      <excludeScope default-value="">${excludeScope}</excludeScope>
      <excludeTransitive default-value="false">${excludeTransitive}</excludeTransitive>
      <excludeTypes default-value="">${excludeTypes}</excludeTypes>
      <includeArtifactIds default-value="">${includeArtifactIds}</includeArtifactIds>
      <includeClassifiers default-value="">${includeClassifiers}</includeClassifiers>
      <includeGroupIds default-value="">${includeGroupIds}</includeGroupIds>
      <includeScope default-value="">${includeScope}</includeScope>
      <includeTypes default-value="">${includeTypes}</includeTypes>
      <local>${localRepository}</local>
      <markersDirectory default-value="${project.build.directory}/dependency-maven-plugin-markers">${markersDirectory}</markersDirectory>
      <outputAbsoluteArtifactFilename default-value="false">${outputAbsoluteArtifactFilename}</outputAbsoluteArtifactFilename>
      <outputFile>${outputFile}</outputFile>
      <outputScope default-value="true">${mdep.outputScope}</outputScope>
      <overWriteIfNewer default-value="true">${overWriteIfNewer}</overWriteIfNewer>
      <overWriteReleases default-value="false">${overWriteReleases}</overWriteReleases>
      <overWriteSnapshots default-value="false">${overWriteSnapshots}</overWriteSnapshots>
      <project>${project}</project>
      <reactorProjects>${reactorProjects}</reactorProjects>
      <remoteRepos>${project.remoteArtifactRepositories}</remoteRepos>
      <silent default-value="false">${silent}</silent>
      <type default-value="java-source">${type}</type>
    </configuration>
    [DEBUG] =======================================================================
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.481s
    [INFO] Finished at: Sun Mar 17 19:55:09 CET 2013
    [INFO] Final Memory: 12M/361M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:list (default-cli): Goal requires a project to execute but there is no POM in this directory (/root). Please verify you invoked Maven from the correct directory. -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:list (default-cli): Goal requires a project to execute but there is no POM in this directory (/root). Please verify you invoked Maven from the correct directory.
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:179)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    Caused by: org.apache.maven.lifecycle.MissingProjectException: Goal requires a project to execute but there is no POM in this directory (/root). Please verify you invoked Maven from the correct directory.
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:175)
            ... 19 more
    [ERROR]
    [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/MissingProjectException
    
     
  6. Offline

    Nitnelave

    Are you sure you have the pom.xml in the right directory? What did you use to create it? Try setting up the project with an IDE like Eclipse, and then modifying the pom to suit your needs.
     
  7. Execute mvn inside your project's folder not the home directory.
     
Thread Status:
Not open for further replies.

Share This Page