Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Maven Failed to resolve target definition and Failed to load p2 metadata repository from location ht
Maven Failed to resolve target definition and Failed to load p2 metadata repository from location ht [message #1850659] Sat, 12 March 2022 23:01 Go to next message
Antonin Rouxel is currently offline Antonin RouxelFriend
Messages: 2
Registered: March 2022
Junior Member
Hello Eclipse Papyrus community,

I would like to create a package for Eclipse Papyrus.

But I get this error when building:

[e[1;34mINFOe[m] Computing target platform for MavenProject: org.eclipse.papyrus:org.eclipse.papyrus.rcp:5.2.0-SNAPSHOT @ /build/eclipse-papyrus-snapcraft/parts/eclipse-papyrus-snapcraft/build/releng/rcp/org.eclipse.papyrus.rcp/pom.xml
[e[1;31mERRORe[m] Failed to resolve target definition /build/eclipse-papyrus-snapcraft/parts/eclipse-papyrus-snapcraft/build/releng/rcp/targetPlatform/org.eclipse.papyrus.rcp.targetplatform.target: Failed to load p2 metadata repository from location download.eclipse.org/nebula/releases/1.2.0/: Unknown Host: download.eclipse.org/nebula/releases/1.2.0/content.xml: Unknown host download.eclipse.org -> e[1m[Help 1]e[m
[e[1;31mERRORe[m] 
[e[1;31mERRORe[m] To see the full stack trace of the errors, re-run Maven with the e[1m-ee[m switch.
[e[1;31mERRORe[m] Re-run Maven using the e[1m-Xe[m switch to enable full debug logging.
[e[1;31mERRORe[m] 
[e[1;31mERRORe[m] For more information about the errors and possible solutions, please read the following articles:
[e[1;31mERRORe[m] e[1m[Help 1]e[m cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException
[10/Mar/2022:20:33:35 +0000] "CONNECT repo.maven.apache.org:443 HTTP/1.1" 200 3275627 "-" "Apache-HttpClient/4.5.11 (Java/11.0.14)"
[10/Mar/2022:20:33:35 +0000] "CONNECT repo.maven.apache.org:443 HTTP/1.1" 200 3353359 "-" "Apache-HttpClient/4.5.11 (Java/11.0.14)"
[10/Mar/2022:20:33:35 +0000] "CONNECT repo.maven.apache.org:443 HTTP/1.1" 200 1459501 "-" "Apache-HttpClient/4.5.11 (Java/11.0.14)"
[10/Mar/2022:20:33:35 +0000] "CONNECT repo.maven.apache.org:443 HTTP/1.1" 200 1690283 "-" "Apache-HttpClient/4.5.11 (Java/11.0.14)"
[10/Mar/2022:20:33:35 +0000] "CONNECT repo.maven.apache.org:443 HTTP/1.1" 200 14265449 "-" "Apache-HttpClient/4.5.11 (Java/11.0.14)"
Failed to run 'override-build': Exit code was 1.
Build failed


So I tested on Github Action and I don't have an error when I compile. There is a small difference between Snapcraft and Github Action, which is that the former has the proxy, while the latter does not. To compile Eclipse Papyrus I use Maven and Java 11. Knowing that Java 11 is the minimum version for Eclipse Papyrus.

Here's the difference between the Snapcraft version and the Github Action version.

Here is the Snapcraft version:

override-build: |
    git checkout "5.2.0" -b latest
    snapcraftctl set-version "$(git describe --tags | sed 's/v//' | sed "s/-g/%/"  | cut -d "%" -f1)"
    # Gets the host and port from a proxy URL
    #   $1 = the proxy URL, such as "http://10.10.10.1:8222/"
    getproxy () {
        host=$(echo "$1" | sed -E 's|https?://([^:/]*):?[0-9]*/?|\1|')
        port=$(echo "$1" | sed -E 's|https?://[^:/]*:?([0-9]*)/?|\1|')
    }
    # Sets Java networking properties when using a proxy server
    if [ -n "${http_proxy:-}" ]; then
        getproxy "$http_proxy"
        http="-Dhttp.proxyHost=$host -Dhttp.proxyPort=$port"
    fi
    if [ -n "${https_proxy:-}" ]; then
        getproxy "$https_proxy"
        https="-Dhttps.proxyHost=$host -Dhttps.proxyPort=$port"
    fi
    # Builds Maven
    export MAVEN_OPTS="$http $https"
    mvn -f $SNAPCRAFT_PART_BUILD/releng/rcp/pom.xml -Dpapyrus.repo.main=https://download.eclipse.org/modeling/mdt/papyrus/updates/releases/2021-12/6.0.0/main/ clean verify
    tar -xf "${SNAPCRAFT_PART_BUILD}/releng/rcp/org.eclipse.papyrus.rcp.product/target/products/org.eclipse.papyrus.rcp.product-linux.gtk.x86_64.tar.gz" -C "${SNAPCRAFT_PART_INSTALL}"



Here's the Github Action version:

override-build: |
    git checkout "5.2.0" -b latest
    snapcraftctl set-version "$(git describe --tags | sed 's/v//' | sed "s/-g/%/"  | cut -d "%" -f1)"
    mvn -f $SNAPCRAFT_PART_BUILD/releng/rcp/pom.xml -Dpapyrus.repo.main=https://download.eclipse.org/modeling/mdt/papyrus/updates/releases/2021-12/6.0.0/main/ clean verify
    tar -xf "${SNAPCRAFT_PART_BUILD}/releng/rcp/org.eclipse.papyrus.rcp.product/target/products/org.eclipse.papyrus.rcp.product-linux.gtk.x86_64.tar.gz" -C "${SNAPCRAFT_PART_INSTALL}"


Thank you for your help.

Great regards
Re: Maven Failed to resolve target definition and Failed to load p2 metadata repository from locatio [message #1850817 is a reply to message #1850659] Thu, 17 March 2022 13:42 Go to previous messageGo to next message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 341
Registered: July 2009
Location: Paris Saclay, France
Senior Member
Hi,
Could you send us your target platform?
Patrick
Re: Maven Failed to resolve target definition and Failed to load p2 metadata repository from locatio [message #1850828 is a reply to message #1850817] Thu, 17 March 2022 19:17 Go to previous message
Antonin Rouxel is currently offline Antonin RouxelFriend
Messages: 2
Registered: March 2022
Junior Member
Hi Patrick,
Thank you for your answer.
My target platform is Linux amd64.
Great regards
Previous Topic:State machine execution in Moka
Next Topic:Adding a new code generator
Goto Forum:
  


Current Time: Fri Apr 19 23:15:45 GMT 2024

Powered by FUDForum. Page generated in 0.02875 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top