TotalCross / totalcross

TotalCross is a Software Development Kit that helps cross platform application development. Currently supported platforms are: Windows, Wince, Android, iOS, Linux and Linux ARM for embedded systems.
https://www.totalcross.com
GNU Lesser General Public License v2.1
222 stars 40 forks source link

package error #355

Open incity opened 3 years ago

incity commented 3 years ago

Command line: D:\Projects\jarm\target/LightSwitch.jar -android -ios -linux -linux_arm -win32 -wince /n LightSwitch /p /r 5443444B5AAEEB90306B00E4 TotalCross SDK version 7.1.0.0 running on windows 10 with JDK 11.0 Current folder: D:/Projects/jarm Etc directory: C:/Users/yin_c/AppData/Local/TotalCross/7.1.0/etc/ Classpath: C:\Users\yin_c.m2\repository\com\totalcross\totalcross-sdk\7.1.0\totalcross-sdk-7.1.0.jar;C:\Users\yin_c.m2\repository\net\java\dev\jna\jna-platform\4.2.2\jna-platform-4.2.2.jar;C:\Users\yin_c.m2\repository\net\java\dev\jna\jna\4.2.2\jna-4.2.2.jar;C:\Users\yin_c.m2\repository\org\vafer\jdeb\0.7\jdeb-0.7.jar;C:\Users\yin_c.m2\repository\org\apache\maven\maven-plugin-api\2.0.5\maven-plugin-api-2.0.5.jar;C:\Users\yin_c.m2\repository\org\apache\maven\maven-project\2.0.5\maven-project-2.0.5.jar;C:\Users\yin_c.m2\repository\org\apache\maven\maven-settings\2.0.5\maven-settings-2.0.5.jar;C:\Users\yin_c.m2\repository\org\apache\maven\maven-profile\2.0.5\maven-profile-2.0.5.jar;C:\Users\yin_c.m2\repository\org\apache\maven\maven-model\2.0.5\maven-model-2.0.5.jar;C:\Users\yin_c.m2\repository\org\apache\maven\maven-artifact-manager\2.0.5\maven-artifact-manager-2.0.5.jar;C:\Users\yin_c.m2\repository\org\apache\maven\maven-repository-metadata\2.0.5\maven-repository-metadata-2.0.5.jar;C:\Users\yin_c.m2\repository\org\apache\maven\wagon\wagon-provider-api\1.0-beta-2\wagon-provider-api-1.0-beta-2.jar;C:\Users\yin_c.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-9\plexus-container-default-1.0-alpha-9.jar;C:\Users\yin_c.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Users\yin_c.m2\repository\org\apache\maven\maven-artifact\2.0.5\maven-artifact-2.0.5.jar;C:\Users\yin_c.m2\repository\org\codehaus\plexus\plexus-utils\1.4.1\plexus-utils-1.4.1.jar;C:\Users\yin_c.m2\repository\org\apache\ant\ant\1.7.1\ant-1.7.1.jar;C:\Users\yin_c.m2\repository\org\apache\ant\ant-launcher\1.7.1\ant-launcher-1.7.1.jar;C:\Users\yin_c.m2\repository\junit\junit\3.8.2\junit-3.8.2.jar;C:\Users\yin_c.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.56\bcpkix-jdk15on-1.56.jar;C:\Users\yin_c.m2\repository\org\bouncycastle\bcprov-jdk15on\1.56\bcprov-jdk15on-1.56.jar;C:\Users\yin_c.m2\repository\com\googlecode\plist\dd-plist\1.19\dd-plist-1.19.jar;C:\Users\yin_c.m2\repository\org\xerial\sqlite-jdbc\3.8.7\sqlite-jdbc-3.8.7.jar;C:\Users\yin_c.m2\repository\de\schlichtherle\truezip\truezip-file\7.5.1\truezip-file-7.5.1.jar;C:\Users\yin_c.m2\repository\de\schlichtherle\truezip\truezip-driver-file\7.5.1\truezip-driver-file-7.5.1.jar;C:\Users\yin_c.m2\repository\de\schlichtherle\truezip\truezip-kernel\7.5.1\truezip-kernel-7.5.1.jar;C:\Users\yin_c.m2\repository\de\schlichtherle\truezip\truezip-driver-zip\7.5.1\truezip-driver-zip-7.5.1.jar;C:\Users\yin_c.m2\repository\de\schlichtherle\truezip\truezip-swing\7.5.1\truezip-swing-7.5.1.jar;C:\Users\yin_c.m2\repository\org\apache\commons\commons-compress\1.3\commons-compress-1.3.jar;C:\Users\yin_c.m2\repository\commons-io\commons-io\2.2\commons-io-2.2.jar;C:\Users\yin_c.m2\repository\org\ow2\asm\asm\5.2\asm-5.2.jar;C:\Users\yin_c.m2\repository\org\ow2\asm\asm-tree\5.2\asm-tree-5.2.jar;C:\Users\yin_c.m2\repository\net\harawata\appdirs\1.2.0\appdirs-1.2.0.jar;C:\Users\yin_c.m2\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;C:\Users\yin_c.m2\repository\net\coobird\thumbnailator\0.4.8\thumbnailator-0.4.8.jar;C:\Users\yin_c.m2\repository\com\totalcross\annotations\totalcross-annotations\1.0.0\totalcross-annotations-1.0.0.jar Creating single installation package Adding com/sojet/LightSwitch... 11% Adding com/sojet/RunLightSwitchApplication... 12% File D:/Projects/jarm/target/LightSwitch.tcz written (44% - 649 bytes) Main class name: com/sojet/LightSwitch Application title not provided, using: LightSwitch Application id not provided. Created from "LightSwitch": Mtwl Android application folder: /data/data/totalcross.appmtwl Could not find 'google-services.json', thus Firebase will be ignored further on (Android deploy) ################################# FATAL ERROR ################################## tc.tools.deployer.DeployerException: An error occured when signing the APK. The output is INPUT:jar 已签名。

警告: 签名者证书为自签名证书。 The MD5withRSA algorithm specified for the -sigalg option is considered a security risk and is disabled. The SHA1 algorithm specified for the -digestalg option is considered a security risk. This algorithm will be disabled in a future update. The RSA signing key has a keysize of 1024 which is considered a security risk. This key size will be disabled in a future update.

    at tc.tools.deployer.Utils.jarSigner(Utils.java:941)
    at tc.tools.deployer.Deployer4Android.<init>(Deployer4Android.java:147)
    at tc.Deploy.<init>(Deploy.java:94)
    at tc.Deploy.main(Deploy.java:38)

################################################################################ Exception in thread "main" tc.tools.deployer.DeployerException: An error occured when signing the APK. The output is INPUT:jar 已签名。

警告: 签名者证书为自签名证书。 The MD5withRSA algorithm specified for the -sigalg option is considered a security risk and is disabled. The SHA1 algorithm specified for the -digestalg option is considered a security risk. This algorithm will be disabled in a future update. The RSA signing key has a keysize of 1024 which is considered a security risk. This key size will be disabled in a future update.

    at tc.tools.deployer.Utils.jarSigner(Utils.java:941)
    at tc.tools.deployer.Deployer4Android.<init>(Deployer4Android.java:147)
    at tc.Deploy.<init>(Deploy.java:94)
    at tc.Deploy.main(Deploy.java:38)

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [ERROR] Command execution failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:804) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:751) at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:313) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:119) at com.totalcross.TotalCrossMojo.deploy (TotalCrossMojo.java:228) at com.totalcross.TotalCrossMojo.execute (TotalCrossMojo.java:107) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 14.898 s [INFO] Finished at: 2021-06-28T11:05:12+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.totalcross:totalcross-maven-plugin:2.0.4:package (post-package) on project LightSwitch: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException PS D:\Projects\jarm>

brunoamuniz commented 3 years ago

hello @incity could you share your pom.xml?

incity commented 3 years ago
<?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>com.sojet</groupId>
    <artifactId>LightSwitch</artifactId>
    <version>1.0-SNAPSHOT</version>
    <name>LightSwitch</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <totalcross.activation_key>5443444B5AAEEB90306B00E4</totalcross.activation_key>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.totalcross</groupId>
            <artifactId>totalcross-sdk</artifactId>
            <version>7.1.0</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>totalcross-repo</id>
            <name>ip-172-31-40-140-releases</name>
            <url>https://maven.totalcross.com/artifactory/repo1</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>totalcross-repo</id>
            <name>ip-172-31-40-140-releases</name>
            <url>https://maven.totalcross.com/artifactory/repo1</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.totalcross</groupId>
                <artifactId>totalcross-maven-plugin</artifactId>
                <version>2.0.4</version>
                <configuration>
                    <name>${project.name}</name>
                    <platforms>
                        <platform>-android</platform>
                        <platform>-linux_arm</platform>
                        <platform>-linux</platform>
                    </platforms>
                    <activationKey>${totalcross.activation_key}</activationKey>
                    <!--                    For version 4.4.2 and 5.1.4 or later, Apple certificates are no longer required. -->
                    <!--                    <certificates>${totalcross.applecertificate}</certificates>-->
                    <!--                    <totalcrossHome>~/TotalCross/6.1.0</totalcrossHome>-->
                </configuration>
                <executions>
                    <execution>
                        <id>post-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>retrolambda</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>package</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>