Debian Codegraph @

src/site/apt/examples/deploying-sources-javadoc.apt.vm

raw
1 ----
2 Deploy sources and javadocs for an artifact
3 ------
4 ------
5 20011-02-23
6 ------
7
8 ~~ Licensed to the Apache Software Foundation (ASF) under one
9 ~~ or more contributor license agreements. See the NOTICE file
10 ~~ distributed with this work for additional information
11 ~~ regarding copyright ownership. The ASF licenses this file
12 ~~ to you under the Apache License, Version 2.0 (the
13 ~~ "License"); you may not use this file except in compliance
14 ~~ with the License. You may obtain a copy of the License at
15 ~~
16 ~~ http://www.apache.org/licenses/LICENSE-2.0
17 ~~
18 ~~ Unless required by applicable law or agreed to in writing,
19 ~~ software distributed under the License is distributed on an
20 ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 ~~ KIND, either express or implied. See the License for the
22 ~~ specific language governing permissions and limitations
23 ~~ under the License.
24
25 ~~ NOTE: For help with the syntax of this file, see:
26 ~~ http://maven.apache.org/doxia/references/apt-format.html
27
28 Deploy sources and javadoc jars
29
30 A project may include a main jar and associated sources and javadoc jars.
31
32 +---+
33 artifact-name-1.0.jar
34 artifact-name-1.0-sources.jar
35 artifact-name-1.0-javadoc.jar
36 +---+
37
38 The sources jar contains the Java sources, and the javadoc jar contains the generated javadocs.
39 To include these files in your deployment, set the <<sources>> and <<javadoc>> parameters to
40 the paths to the sources and javadoc jar files.
41
42 +---+
43 mvn ${project.groupId}:${project.artifactId}:${project.version}:deploy-file -Durl=file:///home/me/m2-repo \
44 -DrepositoryId=some.repo.id \
45 -Dfile=./path/to/artifact-name-1.0.jar \
46 -DpomFile=./path/to/pom.xml \
47 -Dsources=./path/to/artifact-name-1.0-sources.jar \
48 -Djavadoc=./path/to/artifact-name-1.0-javadoc.jar
49 +---+
50
51 <<Note>>: By using the fully qualified path of a goal, you're ensured to be using the preferred version of the maven-deploy-plugin. When using <<<mvn deploy:deploy-file>>>
52 its version depends on its specification in the pom or the version of Apache Maven.