1
votes

I´m using netbeans and not using maven. Compile is ok but when trying to run it I get this error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project sic-desktop: Command execution failed. Process exited with an error: -1 (Exit value: -1) -> [Help 1]

Below is the 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>com.techint</groupId>
    <artifactId>sic-parent</artifactId>
    <version>1.0</version>
</parent>
<artifactId>sic-desktop</artifactId>


<dependencies>
    <dependency>
        <groupId>com.techint</groupId>
        <artifactId>sic-core</artifactId>
        <version>${project.parent.version}</version>
    </dependency>
    <dependency>
        <groupId>com.techint</groupId>
        <artifactId>sic-ca</artifactId>
        <version>${project.parent.version}</version>
    </dependency>

    <dependency>
        <groupId>org.netbeans.external</groupId>
        <artifactId>AbsoluteLayout</artifactId>
    </dependency>

    <dependency>
        <groupId>org.jdesktop</groupId>
        <artifactId>beansbinding</artifactId>
    </dependency>


    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>org.springframework.instrument</artifactId>
    </dependency>
    <!--  Spring Security  -->
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
    </dependency>

    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
    </dependency>
    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports-fonts</artifactId>
    </dependency>



    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
    </dependency>




    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
    </dependency>
    <dependency>
        <groupId>net.sourceforge.jtds</groupId>
        <artifactId>jtds</artifactId>
    </dependency>


</dependencies>


<build>
    <plugins>
        <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <classpathPrefix>lib/</classpathPrefix>
                        <mainClass>com.techint.comissionamento.ComissionamentoMain</mainClass>
                    </manifest>

                </archive>
            </configuration>
        </plugin>


        <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
                <execution>
                    <phase>install</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${project.build.directory}/lib</outputDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>



        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>versions-maven-plugin</artifactId>
            <version>2.0</version>
        </plugin>

        <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
                <execution>
                    <phase>prepare-package</phase>
                    <configuration>
                        <tasks>
                            <replace token="@buildnumber@" value="${project.version}.${buildNumber}"
                                     dir="target/classes">
                                <include name="app.properties"/>
                            </replace>
                        </tasks>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>


    </plugins>

    <!--<finalName>${project.name}-${project.version}.${buildNumber}</finalName>-->
    <finalName>Comissionamento</finalName>
</build>


<profiles>

    <profile>
        <id>dev</id>
        <properties>
            <maven.test.skip>true</maven.test.skip>
        </properties>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <configuration>
                                <tasks>
                                    <copy file="${project.parent.basedir}/config/epccom/app.dev.properties"
                                          tofile="${project.build.outputDirectory}/app.properties"/>
                                </tasks>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>1.1</version>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals>
                                <goal>create</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <doCheck>false</doCheck>
                        <doUpdate>false</doUpdate>
                    </configuration>
                </plugin>


            </plugins>
        </build>
    </profile>
    <profile>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <id>prod</id>
        <properties>
            <maven.test.skip>true</maven.test.skip>
        </properties>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <configuration>
                                <tasks>
                                    <copy file="${project.parent.basedir}/config/epccom/app.prod.properties"
                                          tofile="${project.build.outputDirectory}/app.properties"/>
                                </tasks>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>1.1</version>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals>
                                <goal>create</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <doCheck>false</doCheck>
                        <doUpdate>false</doUpdate>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jasperreports-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile-reports</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <sourceDirectory>src/main/jaspertreports</sourceDirectory>
                        <outputDirectory>${project.build.outputDirectory}/reports</outputDirectory>
                    </configuration>

                    <dependencies>
                        <!--note this must be repeated here to pick up correct xml validation -->
                        <dependency>
                            <groupId>net.sf.jasperreports</groupId>
                            <artifactId>jasperreports</artifactId>
                            <version>${jasperreports.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

1
If you are not using Maven then what is your pom.xml for?PM 77-1
I got a project that was made using Maven, Spring etc... I´m using only netbeans for maintaince. But I can´t even run it because this errorDaniel Penna
You may want to try Clean + BuildPM 77-1
Did the clean + build and also deleted files at local and roaming folder, same errorDaniel Penna
I do not have any first-hand knowledge (sorry) but I saw suggestions to upgrade the plug-in.PM 77-1

1 Answers

-1
votes

If you are using netbeans, then stop the current run process and start it again this error raised becouse u have a running process