bunu kullanmaktan, bir dizine "dağıtmak" Maven yapmak için:Maven: bırakma eklentisi görmez benim <repository> yılında <distributionManagement>
<distributionManagement>
<downloadUrl>http://code.google.com/p/junitdiff/downloads/list</downloadUrl>
<repository>
<id>local-hack-repo</id>
<name>LocalDir</name>
<url>file://${project.basedir}/dist-maven</url>
</repository>
<snapshotRepository>
<id>jboss-snapshots-repository</id>
<name>JBoss Snapshots Repository</name>
<!--
<url>https://repository.jboss.org/nexus/content/repositories/snapshots</url>
-->
<url>file://${project.basedir}/dist-maven</url>
</snapshotRepository>
</distributionManagement>
Bu etkili pom görünür.
...
<distributionManagement>
<repository>
<id>local-hack-repo</id>
<name>LocalDir</name>
<url>file:///home/ondra/work/TOOLS/JUnitDiff/github/dist-maven</url>
</repository>
<snapshotRepository>
<id>jboss-snapshots-repository</id>
<name>JBoss Snapshots Repository</name>
<url>file:///home/ondra/work/TOOLS/JUnitDiff/github/dist-maven</url>
</snapshotRepository>
<downloadUrl>http://code.google.com/p/junitdiff/downloads/list</downloadUrl>
</distributionManagement>
Ama yine de, Maven orada değil ısrar:
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project JUnitDiff: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
[INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project JUnitDiff: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter
...
[INFO] Caused by: org.apache.maven.plugin.MojoExecutionException: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter
[INFO] at org.apache.maven.plugin.deploy.DeployMojo.getDeploymentRepository(DeployMojo.java:235)
[INFO] at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:118)
[INFO] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
[INFO] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
[INFO] ... 19 more
Ben maven salınımlı-eklenti aracılığıyla bunu kullanıyorum.
Güncelleme: Bu^^ ^, anahtar parçası gibi görünüyor - mvn deploy
çalışıyor.
İlgili: http://www.java-tutorial.ch/maven/maven-release
Sorun ne?
Maven 3.0.4. Eklenecek pom.
Öncelikle bir şeyi bir dizine dağıtmak istiyorsanız, projenizin dışında bir şey kullanın: /// home/ondra/repository/snapshots ve file: /// home/ondra/repository/releases pom not alıntılarınızla ilgili hata mesajı arasında bir ilişki görmeyin. En iyisi, eksiksiz pom dosyasını ve tam olarak kullandığınız komutu göstermektir. – khmarbaise
Maven'in hangi versiyonu bu? Maven-deploy-plugin'in hangi sürümünü kullanıyorsunuz? Pom.xml dosyanızı gönderin. Hepimizin cam topları yok, ya da psişik. :) – carlspring
Sorun şu ki, sürüm eklentisi bir şekilde elemanın eksik olduğu yanlış git etiketini kontrol ediyor. Farkına varmak. Süreç biraz zor. –