我可以使用mvn deploy
作爲單親母公司嗎?這個pom.xml文件將成爲我所有項目的父類。我能否部署這個pom.xml文件而沒有其他工件?公司範圍內的母公司pom
如果我使用這個作爲我的公司廣泛的POM,我必須包括模塊標籤。
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>onestopspot</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>OneStopSpot - Parent</name>
<description>Android application for OneStopspot</description>
<distributionManagement>
<repository>
<id>confiz-repo</id>
<url>http://10.10.10.230:8081/nexus/content/repositories/snapshots/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android-test</artifactId>
<version>2.3.3</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<sdk>
<platform>10</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<module>api_library</module>
<module>instrumentation</module>
</modules>
</project>
父pom文件通常不包含任何模塊,它只是pom文件。不要混淆父pom文件和多模塊項目的根文件夾,它們不必是相同的。特別是當你試圖創建公司範圍的父母團隊時。 – nwinkler 2013-03-19 13:16:54