NoClassDefFoundError when using the system area

I am currently encountering and exiting when using Maven with NetBeans 7.1. I have included a library that I cannot host in the Maven repository in the System area. It looks something like this:

 <dependency>
    <groupId>org.company</groupId>
    <artifactId>FBTM</artifactId>
    <version>1.0-SNAPSHOT</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/lib/FBTM-1.0-SNAPSHOT.jar</systemPath>
</dependency>

It seems that the IDE has picked up this dependency, as shown in the Dependencies folder (Project View), and I can view the contents of the jar. I can also import classes from the can without any problems.

However, when I try to start my project (and the runtime has any of the classes used), I get NoClassDefFoundErrorfor the class in question. It can be any class.

Stacktrace:

Exception in thread "main" java.lang.NoClassDefFoundError: com/company/otaupdate/sim/commands/Select at com.company.fbtranslationlibrary.mc.scripts.UserData$1.<init>(UserData.java:30) at com.company.fbtranslationlibrary.mc.scripts.UserData.<init>(UserData.java:28) at com.company.fbtranslationlibrary.mc.MS.get_profile_script(MuscadeScript.java:80) at com.company.fbtranslationlibrary.mc.MS.access$300(MS.java:16)

Any help or pointers would be greatly appreciated!

+5
source share
4

:

Maven Doc :

, , JAR, . .

IDE -. .

( ).

: , maven , jar .

+2

, NetBeans , JAR .

JAR POM local? .

, , NetBeans . ( , ... Eclipse.)

0

, build.xml :

                                  

    <!-- make the repo dir -->
    <mkdir dir="${m2.home}" />

    <!-- copy libs -->
    <copy  todir="${m2.home}">
        <fileset dir="dist"/>
    </copy>

    <!-- copy pom -->
    <copy  todir="${m2.home}">
        <fileset dir="pom"/>
         <mapper>
            <mapper type="regexp" 
                from="pom.xml" to="${m2.app.name}-${m2.app.ver}.pom" />
        </mapper>
    </copy>

    <!-- use naming policy -->
    <copy  todir="${m2.home}">
        <fileset dir="dist"/>
        <mapper>
            <mapper type="regexp" 
                from="${m2.app.name}.jar" to="${m2.app.name}-${m2.app.ver}.jar" />
        </mapper>
    </copy>

    <!-- remove unnecessiary files -->
    <delete>
    <fileset dir="${m2.home}">
        <include name="${m2.app.name}.jar"/>
        <include name="README.TXT"/>
    </fileset>
    </delete>
</target>

pom.xml , , . , .

0
0
source

All Articles