maven - how can set both classpathPrefix and mainClass in pom? -


i have pom.xml this:

<plugins>               <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-jar-plugin</artifactid>                 <version>2.6</version>                 <configuration>                   <archive>                     <manifest>                         <addclasspath>true</addclasspath>                         <mainclass>package.mainclass</mainclass>                         <classpathprefix>lib/</classpathprefix>                   </manifest>                   </archive>                 </configuration>               </plugin>               <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-compiler-plugin</artifactid>                 <version>3.2</version>                 <configuration>                 <source>1.6</source>                 <target>1.6</target>                 </configuration>               </plugin> </plugins> 

and compile , package project successful. when java -jar myproject.jar error: not find or load main class package.mainclass!!

i think happened because wrote both mainclass , classpathprefix in manifest! way set them each other in pom.xml?


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -