Maven之——外掛目標及繫結、命令列呼叫外掛、目標字首(外掛字首解析策略)、外掛解析執行機制
阿新 • • 發佈:2019-01-08
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4 Licensed to the Apache Software Foundation (ASF) under one
5 or more contributor license agreements. See the NOTICE file
6 distributed with this work for additional information
7 regarding copyright ownership. The ASF licenses this file
8 to you under the Apache License, Version 2.0 (the
9 "License"); you may not use this file except in compliance
10 with the License. You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing,
15 software distributed under the License is distributed on an
16 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 KIND, either express or implied. See the License for the
18 specific language governing permissions and limitations
19 under the License.
20 -->
21
22 <!-- START SNIPPET: superpom -->
23 <project>
24 <modelVersion>4.0.0</modelVersion>
25
26 <repositories>
27 <repository>
28 <id>central</id>
29 <name>Central Repository</name>
30 <url>http://repo.maven.apache.org/maven2</url>
31 <layout>default</layout>
32 <snapshots>
33 <enabled>false</enabled>
34 </snapshots>
35 </repository>
36 </repositories>
37
38 <pluginRepositories>
39 <pluginRepository>
40 <id>central</id>
41 <name>Central Repository</name>
42 <url>http://repo.maven.apache.org/maven2</url>
43 <layout>default</layout>
44 <snapshots>
45 <enabled>false</enabled>
46 </snapshots>
47 <releases>
48 <updatePolicy>never</updatePolicy>
49 </releases>
50 </pluginRepository>
51 </pluginRepositories>
52
53 <build>
54 <directory>${project.basedir}/target</directory>
55 <outputDirectory>${project.build.directory}/classes</outputDirectory>
56 <finalName>${project.artifactId}-${project.version}</finalName>
57 <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
58 <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
59 <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
60 <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
61 <resources>
62 <resource>
63 <directory>${project.basedir}/src/main/resources</directory>
64 </resource>
65 </resources>
66 <testResources>
67 <testResource>
68 <directory>${project.basedir}/src/test/resources</directory>
69 </testResource>
70 </testResources>
71 <pluginManagement>
72 <!-- NOTE: These plugins will be removed from future versions of the super POM -->
73 <!-- They are kept for the moment as they are very unlikely to conflict with lifecycle mappings (MNG-4453) -->
74 <plugins>
75 <plugin>
76 <artifactId>maven-antrun-plugin</artifactId>
77 <version>1.3</version>
78 </plugin>
79 <plugin>
80 <artifactId>maven-assembly-plugin</artifactId>
81 <version>2.2-beta-5</version>
82 </plugin>
83 <plugin>
84 <artifactId>maven-dependency-plugin</artifactId>
85 <version>2.1</version>
86 </plugin>
87 <plugin>
88 <artifactId>maven-release-plugin</artifactId>
89 <version>2.0</version>
90 </plugin>
91 </plugins>
92 </pluginManagement>
93 </build>
94
95 <reporting>
96 <outputDirectory>${project.build.directory}/site</outputDirectory>
97 </reporting>
98
99 <profiles>
100 <!-- NOTE: The release profile will be removed from future versions of the super POM -->
101 <profile>
102 <id>release-profile</id>
103
104 <activation>
105 <property>
106 <name>performRelease</name>
107 <value>true</value>
108 </property>
109 </activation>
110
111 <build>
112 <plugins>
113 <plugin>
114 <inherited>true</inherited>
115 <artifactId>maven-source-plugin</artifactId>
116 <executions>
117 <execution>
118 <id>attach-sources</id>
119 <goals>
120 <goal>jar</goal>
121 </goals>
122 </execution>
123 </executions>
124 </plugin>
125 <plugin>
126 <inherited>true</inherited>
127 <artifactId>maven-javadoc-plugin</artifactId>
128 <executions>
129 <execution>
130 <id>attach-javadocs</id>
131 <goals>
132 <goal>jar</goal>
133 </goals>
134 </execution>
135 </executions>
136 </plugin>
137 <plugin>
138 <inherited>true</inherited>
139 <artifactId>maven-deploy-plugin</artifactId>
140 <configuration>
141 <updateReleaseInfo>true</updateReleaseInfo>
142 </configuration>
143 </plugin>
144 </plugins