shared maven_archetype_java project
This commit is contained in:
commit
e1a2cf0932
18
maven_archetype_java.iml
Normal file
18
maven_archetype_java.iml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
</component>
|
||||
</module>
|
48
pom.xml
Normal file
48
pom.xml
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?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>
|
||||
|
||||
<parent>
|
||||
<groupId>com.loafle</groupId>
|
||||
<artifactId>maven_parent_jar</artifactId>
|
||||
<version>1.0.0-RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.loafle</groupId>
|
||||
<artifactId>maven_archetype_java</artifactId>
|
||||
<version>1.0.0-RELEASE</version>
|
||||
<name>maven_archetype_java</name>
|
||||
<packaging>maven-archetype</packaging>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<configuration>
|
||||
<includeEmptyDirs>true</includeEmptyDirs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
</project>
|
26
src/main/resources/META-INF/maven/archetype-metadata.xml
Normal file
26
src/main/resources/META-INF/maven/archetype-metadata.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
|
||||
name="my-first-archetype">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/resources</directory>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/test/resources</directory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
21
src/main/resources/archetype-resources/pom.xml
Normal file
21
src/main/resources/archetype-resources/pom.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?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>
|
||||
|
||||
<parent>
|
||||
<groupId>com.loafle</groupId>
|
||||
<artifactId>maven_parent_jar</artifactId>
|
||||
<version>1.0.0-RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>${version}</version>
|
||||
<name>${groupId}.${artifactId}</name>
|
||||
|
||||
|
||||
|
||||
</project>
|
|
@ -0,0 +1,7 @@
|
|||
package ${package};
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
package ${package};
|
||||
import static org.junit.Assert.*;
|
||||
import org.junit.Test;
|
||||
|
||||
public class AppTest {
|
||||
@Test
|
||||
public void testSum() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="3 seconds">
|
||||
<contextName>${artifactId}</contextName>
|
||||
<!-- TRACE > DEBUG > INFO > WARN > ERROR -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>
|
||||
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{32} - %msg%n
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="DEBUG">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
<logger name="${package}" level="ALL" />
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user