我试图创建一个新的Maven构建项目并从中创建jar。该项目可以通过简单的代码进行编译,但是当我使用某些文件网络jar时,下面会在编译和安装maven命令时出现以下错误:
我的POM看起来像这样。除了构建一个maven项目项目,在构建路径中使用jar以及创建一个类之外,我没有做任何事情。请让我知道是否可以提供更多详细信息。
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.are</groupId>
<artifactId>aredemo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>D:\ARE\workspace\aredemo\src\main\java</sourceDirectory>
<scriptSourceDirectory>D:\ARE\workspace\aredemo\src\main\scripts</scriptSourceDirectory>
<testSourceDirectory>D:\ARE\works`enter code here`pace\aredemo\src\test\java</testSourceDirectory>
<outputDirectory>D:\ARE\workspace\aredemo\target\classes</outputDirectory>
<testOutputDirectory>D:\ARE\workspace\aredemo\target\test-classes</testOutputDirectory>
<resources>
<resource>
<directory>D:\ARE\workspace\aredemo\src\main\resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>D:\ARE\workspace\aredemo\src\test\resources</directory>
</testResource>
</testResources>
<directory>D:\ARE\workspace\aredemo\target</directory>
<finalName>aredemo-0.0.1-SNAPSHOT</finalName>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<executions>
<execution>
<id>default-site</id>
<phase>site</phase>
<goals>
<goal>site</goal>
</goals>
<configuration>
<outputDirectory>D:\ARE\workspace\aredemo\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
<execution>
<id>default-deploy</id>
<phase>site-deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<outputDirectory>D:\ARE\workspace\aredemo\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
</executions>
<configuration>
<outputDirectory>D:\ARE\workspace\aredemo\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<outputDirectory>D:\ARE\workspace\aredemo\target\site</outputDirectory>
</reporting>
</project>
Error coming on maven build and compile commands :
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/ARE/workspace/aredemo/src/main/java/com/are/eventaction/DocumentSecurityUpdateEventAction.java:[3,30] package com.filenet.api.engine does not exist
[ERROR] /D:/ARE/workspace/aredemo/src/main/java/com/are/eventaction/DocumentSecurityUpdateEventAction.java:[4,30] package com.filenet.api.events does not exist
[ERROR] /D:/ARE/workspace/aredemo/src/main/java/com/are/eventaction/DocumentSecurityUpdateEventAction.java:[5,33] package com.filenet.api.exception does not exist
[ERROR] /D:/ARE/workspace/aredemo/src/main/java/com/are/eventaction/DocumentSecurityUpdateEventAction.java:[6,28] package com.filenet.api.util does not exist
[ERROR] /D:/ARE/workspace/aredemo/src/main/java/com/are/eventaction/DocumentSecurityUpdateEventAction.java:[8,59] cannot find symbol
symbol: class EventActionHandler
Looks like some configuration or version issue but couldn't figure it out