java - Maven still builds successfully with known errors -
i'm trying run .jar in ubuntu, , it's failing every time classnotfoundexception. thought problem jar file, after digging more thinking problem maven implementation. when run maven builds successfully, there errors in code. i've run same code using same method on several different computers, , has never happened. maven throws error when appropriate, fact it's allowing build after there clear errors makes me think might cause of .jar problems.
i looking in target folder , noticed i'm missing "classes", "maven-status" , "generated-sources" folders in there. classpath variable set
"/media/client-script/java-consumer-client"
which should allow maven find classes, since in pom.xml has line
<start-class>com.java.consumer.client.application</start-class>
which package main class. i'm not sure why seems maven unable find classes in order run.
here's screenshot of file structure.
does have idea why maven not looking in right place classes? there error classpath setup?
here's pom.xml file reference:
<?xml version="1.0" encoding="utf-8"?> <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.java.consumer</groupid> <artifactid>java-consumer-client</artifactid> <version>1.0-snapshot</version> <packaging>jar</packaging> <name>consumer client</name> <description>sample client pulling streams consumer service api.</description> <parent> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-parent</artifactid> <version>1.2.1.release</version> </parent> <build> <plugins> <plugin> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-maven-plugin</artifactid> <version>${spring.boot.version}</version> <!-- <configuration> <jvmarguments> -xdebug -xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 </jvmarguments> </configuration> --> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <dependencies> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter</artifactid> </dependency> <dependency> <groupid>javax.websocket</groupid> <artifactid>javax.websocket-api</artifactid> <scope>compile</scope> <version>1.1</version> </dependency> <dependency> <groupid>org.glassfish.tyrus</groupid> <artifactid>tyrus-client</artifactid> <version>1.9</version> </dependency> <dependency> <groupid>org.glassfish.tyrus</groupid> <artifactid>tyrus-container-grizzly-client</artifactid> <version>1.9</version> </dependency> </dependencies> <properties> <start-class>com.java.consumer.client.application</start-class> <spring.boot.version>1.2.1.release</spring.boot.version> <spring.boot.websocket.version>1.2.1.release</spring.boot.websocket.version> </properties> </project>
by default, must store java classes in src/main/java
folder. not in src/com/java
folder.
Comments
Post a Comment