gpt4 book ai didi

java - 使用 Eclipse 时 pom.xml 文件出错

转载 作者:行者123 更新时间:2023-11-30 08:26:17 24 4
gpt4 key购买 nike

我的第一个用于 com.liferay.maven.plugins 的插件出现错误。这是我的 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">
<parent>
<groupId>com.n2n.entportal</groupId>
<artifactId>entportal-parent</artifactId>
<version>6.2.0-RC5</version>
<!--
<relativePath>../entportal-parent/pom.xml</relativePath>
-->
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.n2n.entportal.portlets</groupId>
<artifactId>admin-bootstrap-portlets</artifactId>
<packaging>war</packaging>
<name>admin-bootstrap-portlet Portlet</name>
<!-- <version>6.2.0-RC5</version> -->
<properties>
</properties>

<profiles>
<profile>
<id>dev-light</id>
<build>
<resources>
<resource>
<directory>src/main/resources/n2n/dev-light</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>dev</id>
<build>
<resources>
<resource>
<directory>src/main/resources/n2n/dev</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>demo</id>
<build>
<resources>
<resource>
<directory>src/main/resources/n2n/demo</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>console-qa</id>
<build>
<resources>
<resource>
<directory>src/main/resources/n2n/console/qa</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>


<profile>
<id>console-prod</id>
<build>
<resources>
<resource>
<directory>src/main/resources/n2n/console/prod</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>

<profile>
<id>ttu</id>
<build>
<resources>
<resource>
<directory>src/main/resources/clients/ttu</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>


<profile>
<id>spsu-qa</id>
<build>
<resources>
<resource>
<directory>src/main/resources/clients/spsu/qa</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>spsu-prod</id>
<build>
<resources>
<resource>
<directory>src/main/resources/clients/spsu/prod</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>

<profile>
<id>subr-qa</id>
<build>
<resources>
<resource>
<directory>src/main/resources/clients/subr/qa</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>

<profile>
<id>subr-prod</id>
<build>
<resources>
<resource>
<directory>src/main/resources/clients/subr/prod</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>

<profile>
<id>smc-prod</id>
<build>
<resources>
<resource>
<directory>src/main/resources/clients/smc/prod</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>

<profile>
<id>smc-qa</id>
<build>
<resources>
<resource>
<directory>src/main/resources/clients/smc/qa</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>


<profile>
<id>wit-qa</id>
<build>
<resources>
<resource>
<directory>src/main/resources/clients/wit/qa</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>wit-prod</id>
<build>
<resources>
<resource>
<directory>src/main/resources/clients/wit/prod</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>k12demo</id>
<build>
<resources>
<resource>
<directory>src/main/resources/n2n/k12demo</directory>
</resource>
<resource>
<directory>src/main/resources/common</directory>
</resource>
</resources>
</build>
</profile>

</profiles>

<build>
<plugins>
<plugin>
<groupId>com.liferay.maven.plugins</groupId>
<artifactId>liferay-maven-plugin</artifactId>
<version>${maven.plugin.version}</version>
<configuration>
<autoDeployDir>${liferay.auto.deploy.dir}</autoDeployDir>
<appServerDeployDir>${liferay.app.server.deploy.dir}</appServerDeployDir>
<appServerLibGlobalDir>${liferay.app.server.lib.global.dir}</appServerLibGlobalDir>
<appServerPortalDir>${liferay.app.server.portal.dir}</appServerPortalDir>
<liferayVersion>${liferay.version}</liferayVersion>
<pluginType>portlet</pluginType>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.n2n.entportal</groupId>
<artifactId>common</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.jasig.cas.client</groupId>
<artifactId>cas-client-core</artifactId>
<version>3.2.0</version>
</dependency>

<!--
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.5</version>
</dependency>
-->
<dependency>
<groupId>xml-security</groupId>
<artifactId>xmlsec</artifactId>
<version>1.3.0</version>
</dependency>

<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>1.1</version>
</dependency>

<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<!--<scope>provided</scope> -->
</dependency>

</dependencies>

<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>n2ncentral</id>
<url>https://m2.n2nservices.com/artifactory/repo</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<url>https://m2.n2nservices.com/artifactory/repo</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Plugin Repository</name>
<url>http://repo1.maven.org/maven2</url>
</pluginRepository>
</pluginRepositories>

</project>

最佳答案

要设置 appServerPortalDir,您需要在 setting.xml 中添加以下条目

<profiles>
<profile>
<id>inject-liferay-properties</id>
<properties>
<liferay.version>6.2.0</liferay.version>
<liferay.auto.deploy.dir>D:/Projects/Demo/liferay-portal-6.2.0-ce-ga1/deploy</liferay.auto.deploy.dir>
<liferay.app.server.dir>D:/Projects/Demo/liferay-portal-6.2.0-ce-ga1/tomcat-7.0.27</liferay.app.server.dir>
<liferay.app.server.deploy.dir>D:/Projects/Demo/liferay-portal-6.2.0-ce-ga1/tomcat-7.0.27/webapps</liferay.app.server.deploy.dir>
<liferay.app.server.lib.global.dir>D:/Projects/Demo/liferay-portal-6.2.0-ce-ga1/tomcat-7.0.27/lib/ext</liferay.app.server.lib.global.dir>
<liferay.app.server.portal.dir>D:/Projects/Demo/liferay-portal-6.2.0-ce-ga1/tomcat-7.0.27/webapps/ROOT</liferay.app.server.portal.dir>
</properties>
</profile>
</profiles>

关于java - 使用 Eclipse 时 pom.xml 文件出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21629718/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com