maven打包可運行的JAR
現在寫后端非WEB程序比較多,每次需要手工的拷貝lib里面的jar 包,然后啟動腳本里面還要寫classpath,特么完全是在坑爹,為了偷懶,我找了一下maven中的配置,發現可以配置可運行包,并且直接拷貝依賴JAR到lib下,還把classpath放在打包好的程序描述文件中,簡直是神器,這里留下一筆,免得以后一段時間不寫代碼了把這個給忘記了,呵呵.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.coffee.bee.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
From: http://blog.163.com/coffee_hc/blog/static/4485331920121274422988/
@import url(http://www.shnenglu.com/cutesoft_client/cuteeditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);