我需要在struts2-jquery網格插件中做一些增量。我從https://struts2-jquery.googlecode.com/svn/trunk下載了源代碼。我改變了這個來源的邏輯。當我執行使用MVN包我pom.xml文件。我收到異常使用maven的最新jar中的變化不起作用
"The project com.jgeppert.struts2.jquery:struts2-jquery-grid-plugin:3.5.0-SNAPSHOT
have 1 error
Non-resolvable parent POM:could not find artifact com.jgeppert.struts2.jquery:struts2-
jquery:pom:3.5.0-snapshot and 'Parent.relativePath' points at wrong local POM @line 5,c
olumn 13 "
我的pom.xml文件如下所示。
<?xml version="1.0"?>
<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>
<parent>
<groupId>com.jgeppert.struts2.jquery</groupId>
<artifactId>struts2-jquery</artifactId>
<version>3.5.0-SNAPSHOT</version>
</parent>
<artifactId>struts2-jaquery-grid-plugin</artifactId>
<name>Struts 2 jQuery Grid Plugin</name>
<packaging>jar</packaging>
<scm>
<connection>scm:svn:http://struts2-jquery.googlecode.com/svn/trunk/struts2-jquery-grid-plugin</connection>
<developerConnection>scm:svn:https://struts2-jquery.googlecode.com/svn/trunk/struts2-jquery-grid-plugin</developerConnection>
<url>http://code.google.com/p/struts2-jquery/source/browse/</url>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.myfaces.tobago</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.39</version>
<configuration>
<A>
uri=/struts-jquery-grid-tags,
tlibVersion=${tlib.version},
jspVersion=2.0,
shortName=sjg,
displayName="Struts2 jQuery Grid Tags",
outFile=${basedir}/target/classes/META-INF/struts-jquery-grid-tags.tld,
description="Struts2 tags based on jQuery and jqGrid.",
outTemplatesDir=${basedir}/src/site/docs
</A>
<resourceTargetPath>target</resourceTargetPath>
<fork>false</fork>
<force>true</force>
<nocompile>true</nocompile>
<showWarnings>true</showWarnings>
<factory>
org.apache.struts.annotations.taglib.apt.TLDAnnotationProcessorFactory
</factory>
<target>1.5</target>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Core -->
<dependency>
<groupId>com.jgeppert.struts2.jquery</groupId>
<artifactId>struts2-jquery-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-annotations</artifactId>
<version>1.0.4</version>
<optional>true</optional>
</dependency>
<!-- JSP API -->
<!-- struts-annotations must be in compile scope for maven-apt-plugin to
function correctly. Marking it optional to exclude it from transitive dependency resolution -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.5</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
根據我的理解,父標籤查看另一個pom.xml文件。我試圖在父標記中添加相對路徑,但它不起作用。我沒有在https://struts2-jquery.googlecode.com/svn/trunk中看到父pom.xml。
我刪除了父標籤並將其添加到組識別符號,artifactId的&版本得到爲3.5.0,快照,那麼它也失敗了。我再次改變3.4.0而不是3.5.0-SNAPSHOT,然後修改.jar文件。但它沒有影響我的改變。
那麼如何用代碼的最新更改來運行pom文件。是否有其他選擇來創建.jar文件而不是運行pom.xml文件。
父pom在存儲庫中:http://struts2-jquery.googlecode.com/svn/trunk/pom.xml –