0

当在 MacBook Pro 上开发和部署时,该应用程序继续部署到桌面和 iphone,并且之前部署在 ubuntu 19-10 桌面上。所以我假设库或脚本更改阻止了 Ubuntu 20-04 上的应用程序部署。为了演示我构建并尝试运行https://docs.gluonhq.com/client/中描述的 HelloWorld 应用程序的问题。这个简单的应用程序不在 Ubuntu 20-04 上部署或运行​​,但在 MacBook Pro 上部署。

我当前的 Ubuntu 20-04 环境是:

Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.6, vendor: Oracle Corporation, runtime: /home/linuxlp/opt/graalvm/graalvm-svm-linux-20.1.0-ea+28
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-31-generic", arch: "amd64", family: "unix"

该应用程序是:

package hello;

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!!");
        System.exit(0);
    }

}

应用程序 maven pom.xml 是:

<?xml version="1.0" encoding="UTF-8"?>
<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>hello</groupId>
    <artifactId>helloworld</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>helloWorld</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <client.plugin.version>0.1.23</client.plugin.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <release>11</release>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.gluonhq</groupId>
                <artifactId>client-maven-plugin</artifactId>
                <version>${client.plugin.version}</version>
                <configuration>
                    <!-- Uncomment to run on iOS: -->
                    <!-- <target>ios</target>-->
                    <mainClass>hello.HelloWorld</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <pluginRepositories>
        <pluginRepository>
            <id>gluon-releases</id>
            <url>http://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
        </pluginRepository>
    </pluginRepositories>
</project>

client:compile、client:link 和 client:run WITHOUT 应用部署的结果是:

linuxlp@dd-ThinkPad-P71:~/codeExecute/HelloWorld$ mvn clean client:compile
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< hello:helloworld >--------------------------
[INFO] Building helloWorld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ helloworld ---
[INFO] Deleting /home/linuxlp/codeExecute/HelloWorld/target
[INFO] 
[INFO] >>> client-maven-plugin:0.1.23:compile (default-cli) > process-classes @ helloworld >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/linuxlp/codeExecute/HelloWorld/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ helloworld ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/linuxlp/codeExecute/HelloWorld/target/classes
[INFO] 
[INFO] <<< client-maven-plugin:0.1.23:compile (default-cli) < process-classes @ helloworld <<<
[INFO] 
[INFO] 
[INFO] --- client-maven-plugin:0.1.23:compile (default-cli) @ helloworld ---
[Wed May 20 10:11:02 EDT 2020][INFO] ==================== COMPILE TASK ====================
[Wed May 20 10:11:02 EDT 2020][INFO] We will now compile your code for x86_64-linux-linux. This may take some time.
[Wed May 20 10:11:04 EDT 2020][INFO] [SUB] [hello.helloworld:5739]    classlist:   1,213.06 ms,  0.96 GB
[Wed May 20 10:11:05 EDT 2020][INFO] [SUB] [hello.helloworld:5739]        (cap):     526.82 ms,  0.96 GB
[Wed May 20 10:11:06 EDT 2020][INFO] [SUB] [hello.helloworld:5739]        setup:   1,735.65 ms,  0.96 GB
[Wed May 20 10:11:34 EDT 2020][INFO] [SUB] [hello.helloworld:5739]     (clinit):     296.69 ms,  2.31 GB
[Wed May 20 10:11:34 EDT 2020][INFO] [SUB] [hello.helloworld:5739]   (typeflow):  10,523.72 ms,  2.31 GB
[Wed May 20 10:11:34 EDT 2020][INFO] [SUB] [hello.helloworld:5739]    (objects):  15,530.34 ms,  2.31 GB
[Wed May 20 10:11:34 EDT 2020][INFO] [SUB] [hello.helloworld:5739]   (features):   1,116.03 ms,  2.31 GB
[Wed May 20 10:11:34 EDT 2020][INFO] [SUB] [hello.helloworld:5739]     analysis:  28,096.76 ms,  2.31 GB
[Wed May 20 10:11:35 EDT 2020][INFO] [SUB] [hello.helloworld:5739]     universe:     589.91 ms,  2.31 GB
[Wed May 20 10:11:37 EDT 2020][INFO] [SUB] [hello.helloworld:5739]      (parse):   1,961.80 ms,  3.22 GB
[Wed May 20 10:11:39 EDT 2020][INFO] [SUB] [hello.helloworld:5739]     (inline):   2,200.75 ms,  3.22 GB
[Wed May 20 10:11:54 EDT 2020][INFO] [SUB] [hello.helloworld:5739]    (compile):  14,927.21 ms,  5.03 GB
[Wed May 20 10:11:55 EDT 2020][INFO] [SUB] [hello.helloworld:5739]      compile:  20,039.62 ms,  5.03 GB
[Wed May 20 10:11:57 EDT 2020][INFO] [SUB] [hello.helloworld:5739]        image:   2,172.88 ms,  5.02 GB
[Wed May 20 10:11:57 EDT 2020][INFO] [SUB] [hello.helloworld:5739]        write:     179.30 ms,  5.02 GB
[Wed May 20 10:11:57 EDT 2020][INFO] [SUB] [hello.helloworld:5739]      [total]:  54,215.51 ms,  5.02 GB
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  56.153 s
[INFO] Finished at: 2020-05-20T10:11:57-04:00
[INFO] ------------------------------------------------------------------------
linuxlp@dd-ThinkPad-P71:~/codeExecute/HelloWorld$ mvn client:link
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< hello:helloworld >--------------------------
[INFO] Building helloWorld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- client-maven-plugin:0.1.23:link (default-cli) @ helloworld ---
[Wed May 20 10:12:06 EDT 2020][INFO] ==================== LINK TASK ====================
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.902 s
[INFO] Finished at: 2020-05-20T10:12:06-04:00
[INFO] ------------------------------------------------------------------------
linuxlp@dd-ThinkPad-P71:~/codeExecute/HelloWorld$ mvn client:run
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< hello:helloworld >--------------------------
[INFO] Building helloWorld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- client-maven-plugin:0.1.23:run (default-cli) @ helloworld ---
[Wed May 20 10:12:14 EDT 2020][INFO] ==================== RUN TASK ====================
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.586 s
[INFO] Finished at: 2020-05-20T10:12:14-04:00
[INFO] ------------------------------------------------------------------------
linuxlp@dd-ThinkPad-P71:~/codeExecute/HelloWorld$ 
4

0 回答 0