我正在尝试用 maven 编译一些 java 类来生成一个独立的可执行 jar 文件
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>grids</groupId>
<artifactId>grids</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>MainMap_Challange</name>
<description>Tickets and Events System</description>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
Run Code Online (Sandbox Code Playgroud)
我想生成一个独立的 jar 文件,就像这里解释的 https://maven.apache.org/plugins/maven-assembly-plugin/usage.html
我得到的错误是:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MainMap_Challange 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD …Run Code Online (Sandbox Code Playgroud) 我在Haskell中编写了下面的函数,我不太清楚为什么它不适用于懒惰的评估.
infFib :: [Integer]
infFib = infFib' []
where
infFib' [] = infFib' [0,1]
infFib' (xs) = infFib' (xs ++ [(foldr (\a b -> a+b) 0 (take 2 (reverse xs)))])
Run Code Online (Sandbox Code Playgroud)