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

Cannot Package or Deploy linux-arm #344

Open Joeli-Wan opened 3 years ago

Joeli-Wan commented 3 years ago

Back to basics with the example provided on your website...

Totalcross project fails to package or deploy. Traced back to Maven which fails to get dependencies. Seems similar to another bug launched 25 days ago...

I can browse to the Repo myself so it's not being blocked on my network...

Output from Packaging Project

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\jmvn packagee\OneDrive \Documents\Visual Studio 2019\LightSwitch1> [INFO] Scanning for projects... [INFO] [INFO] --------------------< com.totalcross:LightSwitch1 >--------------------- [INFO] Building LightSwitch1 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.333 s [INFO] Finished at: 2021-05-21T07:06:06+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin com.totalcross:totalcross-maven-plugin:2.0.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.totalcross:totalcross-maven-plugin:jar:2.0.3: Could not transfer artifact com.totalcross:totalcross-maven-plugin:pom:2.0.3 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [totalcross-repo (http://maven.totalcross.com/artifactory/repo1, default, releases+snapshots)] -> [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/PluginResolutionException

Output from viewing Maven Dependencies

Spawn {"command":"\"c:\Program Files\Maven\apache-maven-3.8.1\bin\mvn.cmd\"","args":["dependency:tree","-Dverbose","-DoutputFile=\"c:\Users\[NAME]\AppData\Roaming\Code\User\workspaceStorage\688967d6e54cff60326a2cc55e422151\vscjava.vscode-maven\f1ba6ee7c5bb21292dfcb2887541833d\"","-f","\"c:\Users\[NAME]\OneDrive\Documents\Visual Studio 2019\LightSwitch1\pom.xml\""]} [INFO] Scanning for projects... [WARNING] Failed to retrieve plugin descriptor for com.totalcross:totalcross-maven-plugin:2.0.3: Plugin com.totalcross:totalcross-maven-plugin:2.0.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.totalcross:totalcross-maven-plugin:jar:2.0.3 [INFO] [INFO] --------------------< com.totalcross:LightSwitch1 >--------------------- [INFO] Building LightSwitch1 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] Failed to retrieve plugin descriptor for com.totalcross:totalcross-maven-plugin:2.0.3: Plugin com.totalcross:totalcross-maven-plugin:2.0.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.totalcross:totalcross-maven-plugin:jar:2.0.3 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.583 s [INFO] Finished at: 2021-05-21T06:48:35+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project LightSwitch1: Could not resolve dependencies for project com.totalcross:LightSwitch1:jar:1.0-SNAPSHOT: Failed to collect dependencies at com.totalcross:totalcross-sdk:jar:7.1.0: Failed to read artifact descriptor for com.totalcross:totalcross-sdk:jar:7.1.0: Could not transfer artifact com.totalcross:totalcross-sdk:pom:7.1.0 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [totalcross-repo (http://maven.totalcross.com/artifactory/repo1, default, releases+snapshots)] -> [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/DependencyResolutionException

Devices:

Please complete the following information:

To Reproduce

Package the example lightswitch project or Check dependencies on any Maven project attached to TotalCross

POM

<?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">

4.0.0
<groupId>com.totalcross</groupId>
<artifactId>LightSwitch1</artifactId>
<version>1.0-SNAPSHOT</version>
<name>LightSwitch1</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>http://maven.totalcross.com/artifactory/repo1</url>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>totalcross-repo</id>
        <name>ip-172-31-40-140-releases</name>
        <url>http://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.3</version>
            <configuration>
                <name>${project.name}</name>
                <platforms>
                    <platform>-linux_arm</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>

brunoamuniz commented 3 years ago

hey @Joeli-Wan,

Could you try to change this

http://maven.totalcross.com/artifactory/repo1

to

https://maven.totalcross.com/artifactory/repo1

Last maven versions are blocking HTTP.

Check if this works and let me know

Cheers,