Error in Maven building

11,534

If you are using Run as->Maven Build then you have to specify a specific goal like install or package to the Goals field in the dialog box and run.

If it doesn't solve your problem, try running it in the command line once giving mvn clean install command and see the results.

More here

Share:
11,534
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin about 2 years

    I'm new in Maven

    this errors appeared when Maven building

    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".   
    SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J:
    See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
    details. [INFO] Scanning for projects
    [INFO] BUILD FAILURE [INFO]
    [INFO] Total time: 4.973s [INFO] Finished at: Sun Jan 19 08:17:30 EET 2014 
    [INFO] Final Memory: 3M/7M
    [INFO][ERROR] No goals have been specified for this build. You must specify
    a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal>
    or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>.
    Available lifecycle phases are: validate, initialize,
    generate-sources
    

    any help ?

    here's my pom.xml

    <pre>
        <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>storm.starter</groupId>
            <artifactId>storm-starter</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <packaging>jar</packaging>
            <name>storm-starter</name>
            <url>https://github.com/nathanmarz/storm-starter</url>
    
            <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            </properties>
    
            <repositories>
                <repository>
                    <id>github-releases</id>
                    <url>http://oss.sonatype.org/content/repositories/github-releases/</url>
                </repository>
                <repository>
                    <id>clojars.org</id>
                    <url>http://clojars.org/repo</url>
                </repository>
            </repositories>
    
            <dependencies>
                <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <version>3.8.1</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.testng</groupId>
                    <artifactId>testng</artifactId>
                    <version>6.8.5</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.mockito</groupId>
                    <artifactId>mockito-all</artifactId>
                    <version>1.9.0</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.easytesting</groupId>
                    <artifactId>fest-assert-core</artifactId>
                    <version>2.0M8</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.jmock</groupId>
                    <artifactId>jmock</artifactId>
                    <version>2.6.0</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>storm</groupId>
                    <artifactId>storm</artifactId>
                    <version>0.9.0.1</version> <!-- keep storm out of the jar-with-dependencies -->
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                    <version>3.2.1</version>
                </dependency>
                <dependency>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                    <version>15.0</version>
                </dependency>
                <dependency>
                    <groupId>org.yaml</groupId>
                    <artifactId>snakeyaml</artifactId>
                    <version>1.6</version>
                </dependency>
            </dependencies>
    
            <build>
    
                <finalName>${project.artifactId}</finalName>
                <sourceDirectory>src/jvm</sourceDirectory>
                <testSourceDirectory>test/jvm</testSourceDirectory>
                <resources>
                    <resource>
                        <directory>${basedir}/multilang</directory>
                    </resource>
                </resources>
    
                <plugins> <!-- Bind the maven-assembly-plugin to the package phase this will create 
                        a jar file without the storm dependencies suitable for deployment to a cluster. -->
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                            <archive>
                                <manifest>
                                    <mainClass></mainClass>
                                </manifest>
                            </archive>
                        </configuration>
                        <executions>
                            <execution>
                                <id>make-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
    
                    <plugin>
                        <groupId>com.theoryinpractise</groupId>
                        <artifactId>clojure-maven-plugin</artifactId>
                        <version>1.3.12</version>
                        <extensions>true</extensions>
                        <configuration>
                            <sourceDirectories>
                                <sourceDirectory>src/clj</sourceDirectory>
                            </sourceDirectories>
                        </configuration>
                        <executions>
                            <execution>
                                <id>compile</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>test</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
    
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.2.1</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <executable>java</executable>
                            <includeProjectDependencies>true</includeProjectDependencies>
                            <includePluginDependencies>false</includePluginDependencies>
                            <classpathScope>compile</classpathScope>
                            <mainClass>${storm.topology}</mainClass>
                        </configuration>
                    </plugin>
    
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.3.2</version>
                        <configuration>
                            <source>1.6</source>
                            <target>1.6</target>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </project>
    </pre>
    
  • Admin
    Admin over 10 years
    what's about the first three lines of my post ?and is goal should make me choose install or package or I'll write it ? cause when i pressed goal and select i didn't found anything to choose it and i got this error [ERROR] Unable to locate the Javac Compiler in: /usr/lib/jvm/jre1.6.0_38/../lib/tools.jar Please ensure you are using JDK 1.4 or above and not a JRE (the com.sun.tools.javac.Main class is required)
  • gowtham
    gowtham over 10 years
    @user3188912 : What first three lines, I didnot get you. And about the goal , It will open a dialogue box asking for goal , you have enter install / package and run it, If it is not showing it, then go to run configuration and add the goal.
  • Admin
    Admin over 10 years
    i mean this SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See slf4j.org/codes.html#StaticLoggerBinder for further
  • gowtham
    gowtham over 10 years
    @user3188912 That is about the logger configuration, ie slf4j is not configured correctly, which is not related to maven build
  • Admin
    Admin over 10 years
    i solved it thanks Allah . the problem is in tools.jar i added external jar and added it manually
  • Admin
    Admin over 10 years
    Thanks .but after build success . why pom.xml file have a question mark on it ?
  • gowtham
    gowtham over 10 years
  • gowtham
    gowtham over 10 years
    @user3188912 Welcome :)