Last active
April 14, 2016 14:46
Revisions
-
dzlab renamed this gist
Apr 14, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
dzlab created this gist
Feb 5, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ # maven ignoring license mvn install -Dlicense.skip=true -DskipTests # maven fat jar mvn assembly:assembly -DdescriptorId=jar-with-dependencies -DskipTests # maven generate webapp project mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp # maven generate empty project mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false # maven run tests of a given class mvn test -Dtest=classname Maven plugins: == Tomcat ```xml <build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <path>/</path> </configuration> </plugin> </plugins> </build> ``` mvn clean install tomcat7:run == Executable jar with dependencies: ```xml <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>[app.package.ClassName]</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> <executions> <execution> <id>make-assembly</id> <!-- this is used for inheritance merges --> <phase>package</phase> <!-- bind to the packaging phase --> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build> ```