-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


[ ] Ceylon ,

, 18 2017 . 10:45 +
Kopilov 10:45

Ceylon ,

, , () Ceylon. , , , . , : , -. (, , .)

Ceylon-

, Ceylon . .


Ceylon, . ( , , .) ( , IDE, ) ceylon ceylon-sdk. , Java. , Ceylon. Apache Ant, , , JDK.

ant clean dist, dist/dist /usr/local/share/ceylon - , $PATH. ant clean publish.

( Java, Ant Ceylon) - .


, , - . , , . CI - .

(, , , ), . , - , (Ceylon Herd, Maven Nexus), - . , , (c) .

:
compile-jvm:
[ceylon-compile] /home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk/source/ceylon/interop/spring/module.ceylon:25: error: cannot find module artifact 'maven:org.springframework.data:spring-data-commons-1.13.6.RELEASE.car'
[ceylon-compile] shared import maven:org.springframework.data:"spring-data-commons" "1.13.6.RELEASE";
[ceylon-compile] ^
[ceylon-compile] - dependency tree: 'ceylon.interop.spring/1.3.4-SNAPSHOT' -> 'org.springframework.data:spring-data-commons/1.13.6.RELEASE'
[ceylon-compile] /home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk/source/ceylon/interop/spring/module.ceylon:26: error: cannot find module artifact 'maven:org.springframework.data:spring-data-jpa-1.11.6.RELEASE.car'
[ceylon-compile] shared import maven:org.springframework.data:"spring-data-jpa" "1.11.6.RELEASE";
[ceylon-compile] ^
[ceylon-compile] - dependency tree: 'ceylon.interop.spring/1.3.4-SNAPSHOT' -> 'org.springframework.data:spring-data-jpa/1.11.6.RELEASE'
[ceylon-compile] /home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk/source/ceylon/interop/spring/module.ceylon:27: error: cannot find module artifact 'maven:org.springframework:spring-tx-4.3.10.RELEASE.car'
[ceylon-compile] shared import maven:org.springframework:"spring-tx" "4.3.10.RELEASE";
[ceylon-compile] ^
[ceylon-compile] - dependency tree: 'ceylon.interop.spring/1.3.4-SNAPSHOT' -> 'org.springframework:spring-tx/4.3.10.RELEASE'
[ceylon-compile] ceylon compile: There were 3 errors

BUILD FAILED
/home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk/build.xml:224: While executing command
/home/akopilov/.sdkman/candidates/ceylon/current/bin/../bin/ceylon
--cwd=/home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk
--define=ant.file.type.Ceylon SDK=file
--define=ant.file.type=file
--define=ant.file=/home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk/build.xml
--define=ant.file.Ceylon SDK=/home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk/build.xml
--define=ant.project.name=Ceylon SDK
--define=ant.project.default-target=test
--define=ant.project.invoked-targets=clean,publish
--define=ceylon.terminal.usecolors=yes
compile
--out
/home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk/modules
--encoding
UTF-8
--source
/home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk/source
--resource
/home/akopilov/workspace/docker/CeylonBuilding/ceylon-sources/ceylon-sdk/resource
--pack200
ceylon.buffer
ceylon.collection
ceylon.dbc
ceylon.decimal
ceylon.file
ceylon.html
ceylon.interop.java
ceylon.interop.persistence
ceylon.interop.spring
ceylon.io
ceylon.json
ceylon.locale
ceylon.logging
ceylon.math
ceylon.http.common
ceylon.http.client
ceylon.http.server
ceylon.uri
ceylon.numeric
ceylon.process
ceylon.promise
ceylon.random
ceylon.regex
ceylon.test
ceylon.time
ceylon.toml
ceylon.transaction
ceylon.unicode
ceylon.whole
com.redhat.ceylon.war
Compile failed; see the compiler error output for details.

, Java- Maven Ceylon (car), .


, . .

, , : Ceylon Ceylon SDK . , , .

JDK.

Dockerfile kopilov/java8
FROM ubuntu:latest

RUN apt-get update -y && apt-get install -y software-properties-common

RUN \
  echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
  add-apt-repository -y ppa:webupd8team/java && \
  apt-get -y update  && \
  apt-get install -y oracle-java8-installer && \
  rm -rf /var/cache/oracle/jdk8/installer

RUN apt-get install -y maven

#RUN apt-get install -y locales && \
#    locale-gen "ru_RU.UTF-8" && \
#    echo "LANG=ru_RU.UTF-8" >> /etc/default/locale

#ENV LANG=ru_RU.UTF-8 \
#    LANGUAGE=ru_RU.UTF-8 \
#    LC_ALL=ru_RU.UTF-8

RUN apt-get clean && \
    rm -rf /var/lib/apt/lists/*


Dockerfile , . : Oracle JDK ( , Oracle) Maven, , APT. Ant , , .

: Ceylon. Dockerfile ceylon-sources, ceylon ceylon-sdk. git clone , , .

Dockerfile kopilov/ceylon_build:1.3.4-SNAPSHOT


FROM kopilov/java8:latest

#     
ENV CEYLON_VERSION 1.3.4-SNAPSHOT

#   APT ( ,    ),
# git ( -    )
# netcat (   ) 
RUN apt-get update -y && \
    apt-get install -y git && \
    apt-get install netcat-traditional

#    . ,
#   git clone,    ,   .
WORKDIR /usr/src/ceylon
ADD ceylon-sources /usr/src/ceylon

# ,   
WORKDIR /usr/src/ceylon/ceylon
RUN ant clean dist && \
    cp -a dist/dist /usr/local/share/ceylon-${CEYLON_VERSION} && \
    ln -s /usr/local/share/ceylon-${CEYLON_VERSION}/bin/ceylon /usr/local/bin

# 
WORKDIR /usr/src/ceylon/ceylon-sdk
RUN ant clean publish

# 
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

. , hub.docker.com.


, , . docker run -it kopilov/ceylon_build, ant clean publish .

:
[ceylon-compile] /usr/src/ceylon/ceylon-sdk/source/ceylon/interop/spring/CeylonRepositoryImpl.java:12: error: Ceylon backend error: package org.springframework.transaction.annotation does not exist
[ceylon-compile] import org.springframework.transaction.annotation.Transactional;
[ceylon-compile] ^
[ceylon-compile] /usr/src/ceylon/ceylon-sdk/source/ceylon/interop/spring/CeylonRepositoryImpl.java:29: error: Ceylon backend error: cannot find symbol
[ceylon-compile] @Transactional(readOnly = true)
[ceylon-compile] ^
[ceylon-compile] symbol: class Transactional
[ceylon-compile] /usr/src/ceylon/ceylon-sdk/source/ceylon/interop/spring/CeylonRepositoryImpl.java:44: error: Ceylon backend error: cannot find symbol
[ceylon-compile] @Override @Ignore @Transactional
[ceylon-compile] ^


, , . ? .

Docker Wireshark :



IP repo1.maven.org . , :



: GET-, 404, . , , , GET- . modules.ceylon-lang.org (aka Herd) HTTPS, .

, : 127.0.0.1 repo1.maven.org /etc/hosts. - 404 NOT FOUND. , - netcat (). ( )

docker container ls
# _
docker exec -it _
nc -lp 80

(ant), netcat GET-,
HTTP/1.1 404 NOT FOUND
Server: nc


! ! ( JavaScript), .


Ceylon SDK, . Dockerfile, :

FROM kopilov/ceylon_build:1.3.4-SNAPSHOT

ENV CEYLON_VERSION 1.3.4-SNAPSHOT

WORKDIR /usr/src/ceylon/ceylon-sdk
RUN rm -rf * 
ADD ceylon-sources/ceylon-sdk .

( ), netcat . netcat (plug.sh):

#!/bin/bash

IMAGE_NAME="kopilov/ceylon_patch_src"
CONTAINER_ID=$(docker container ls | grep "${IMAGE_NAME}" | sed 's/ .*//')
docker exec -i $CONTAINER_ID bash << END
echo "127.0.0.1 repo1.maven.org" >> /etc/hosts

echo "HTTP/1.1 404 NOT FOUND" > /tmp/notfound
echo "Server: nc" >> /tmp/notfound
echo "" >> /tmp/notfound

nc -lp 80 < /tmp/notfound
nc -lp 80 < /tmp/notfound
END

, (get_built_ceylon.sh):

CONTAINER_ID=$(docker container ls -a | grep  kopilov/ceylon_patch_src | sed 's/ .*//')

rm -r ~/.sdkman/candidates/ceylon/1.3.4-SNAPSHOT/
docker cp $CONTAINER_ID:/usr/local/share/ceylon-1.3.4-SNAPSHOT .
mv ceylon-1.3.4-SNAPSHOT /home/akopilov/.sdkman/candidates/ceylon/1.3.4-SNAPSHOT

rm -r ~/.ceylon/repo/
docker cp $CONTAINER_ID:/root/.ceylon/repo ~/.ceylon

, . docker build -t kopilov/ceylon_patch_src . && docker run -it kopilov/ceylon_patch_src, ./plug.sh, ant clean publish. , ( , ) ./get_built_ceylon.sh.


( , ) . , : github.com/ceylon/ceylon-sdk/pull/688

Docker kopilov/java8 kopilov/ceylon_build hub.docker.com, - .

, , , - . , , : , . ( .) , , .

P.S.
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/338134/

:  

: [1] []
 

:
: 

: ( )

:

  URL