| 1 |
------ |
| 2 |
Deploy an artifact in legacy layout |
| 3 |
------ |
| 4 |
Allan Ramirez |
| 5 |
------ |
| 6 |
2006-06-21 |
| 7 |
------ |
| 8 |
|
| 9 |
~~ Licensed to the Apache Software Foundation (ASF) under one |
| 10 |
~~ or more contributor license agreements. See the NOTICE file |
| 11 |
~~ distributed with this work for additional information |
| 12 |
~~ regarding copyright ownership. The ASF licenses this file |
| 13 |
~~ to you under the Apache License, Version 2.0 (the |
| 14 |
~~ "License"); you may not use this file except in compliance |
| 15 |
~~ with the License. You may obtain a copy of the License at |
| 16 |
~~ |
| 17 |
~~ http://www.apache.org/licenses/LICENSE-2.0 |
| 18 |
~~ |
| 19 |
~~ Unless required by applicable law or agreed to in writing, |
| 20 |
~~ software distributed under the License is distributed on an |
| 21 |
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 22 |
~~ KIND, either express or implied. See the License for the |
| 23 |
~~ specific language governing permissions and limitations |
| 24 |
~~ under the License. |
| 25 |
|
| 26 |
~~ NOTE: For help with the syntax of this file, see: |
| 27 |
~~ http://maven.apache.org/doxia/references/apt-format.html |
| 28 |
|
| 29 |
Deploy an artifact in legacy layout |
| 30 |
|
| 31 |
"Legacy" is the layout used in maven 1 repositories while maven 2 uses "default". They are different |
| 32 |
in terms of directory structure, timestamp of snapshots in default and existence of metadata files in default. |
| 33 |
|
| 34 |
* legacy layout directory structure: |
| 35 |
|
| 36 |
+---+ |
| 37 |
groupId |
| 38 |
|--artifactId |
| 39 |
|--jars |
| 40 |
`--artifact |
| 41 |
+---+ |
| 42 |
|
| 43 |
* default layout directory structure: |
| 44 |
|
| 45 |
+---+ |
| 46 |
groupId |
| 47 |
|--artifactId |
| 48 |
|--version |
| 49 |
| `---artifact |
| 50 |
|---metadata |
| 51 |
+---+ |
| 52 |
|
| 53 |
In able to deploy an artifact in a legacy layout |
| 54 |
of repository, set the <<repositoryLayout>> parameter to <<<legacy>>> value. |
| 55 |
|
| 56 |
+---+ |
| 57 |
mvn ${project.groupId}:${project.artifactId}:${project.version}:deploy-file -Durl=file:///C:/m2-repo \ |
| 58 |
-DrepositoryId=some.id \ |
| 59 |
-Dfile=your-artifact-1.0.jar \ |
| 60 |
-DpomFile=your-pom.xml \ |
| 61 |
-DrepositoryLayout=legacy |
| 62 |
+---+ |
| 63 |
|
| 64 |
<<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>>> |
| 65 |
its version depends on its specification in the pom or the version of Apache Maven. |