celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miroslav Beranič <miroslav.bera...@mibesis.si>
Subject Re: Updated CMake bundle and deploy commands
Date Thu, 21 Apr 2016 15:57:07 GMT
Hi Pepijn,

I've just now, yesterday, updated GIT - and took time to checkout new
version of CELIX.
Nothing was building nor working :D So that is a good start - a lot of changes.

I think I am more-or-less clear on all the changes done, but some are
still getting my head knocking against my desk.

As I did not find answer in the current source tree or documentation,
can be I was sloppy, but. Could you be kind to help me about a bit.

So I had a bundle, that has CMake definition like this:

bundle(${BUNDLE_SYMBOLICNAME}
SOURCES
    private/src/activator
DIRECTORIES
    root
)

Where did the DIRECTORIES command/directive move to? I saw: add_files,
but not directories.
I looked at the mongoose example, but - I am not able to get it
working, as it looks like it is also missing this root directory in
the bundle entry set.

I build CELIX and Mongoose example like this:


git clone https://github.com/apache/celix.git
git checkout develop

mkdir build && cd build
cmake -DBUILD_DEPENDENCY_MANAGER=ON -DBUILD_DEPLOYMENT_ADMIN=ON
-DBUILD_DEVICE_ACCESS=ON -DBUILD_DEVICE_ACCESS_EXAMPLE=ON
-DBUILD_EXAMPLES=ON -DBUILD_FRAMEWORK=ON -DBUILD_LAUNCHER=ON
-DBUILD_LOG_SERVICE=ON -DBUILD_LOG_WRITER=ON
-DBUILD_LOG_WRITER_SYSLOG=ON -DBUILD_REMOTE_SERVICE_ADMIN=ON
-DBUILD_REMOTE_SHELL=ON -DBUILD_SHELL=ON -DBUILD_SHELL_TUI=ON
-DCMAKE_BUILD_TYPE=Debug -DDOXYFILE_LATEX=ON
-DJAR_COMMAND=/opt/jdk1.8/bin/jar -DCMAKE_INSTALL_PREFIX=/opt/celix/
../celix/

make all

make deploy


cd deploy/mongoose_deploy

$ sh ./run.sh
-> entry (null)
Launcher: Framework Started
INFO: FRAMEWORK: Start shutdownthread

CTRL+C

INFO: FRAMEWORK: Shutdown
Segmentation fault (core dumped)
$
$ tree .cache/bundle4/
.cache/bundle4/
├── bundle.id
├── bundle.lastmodified
├── bundle.location
└── version0.0
    ├── libmongoose.so.0
    ├── META-INF
    │   └── MANIFEST.MF
    └── revision.location

2 directories, 6 files


Did I miss something or is this example not correct? It looks like it
is missing something as the startup fails and there is no response on
port 8081.


Another problem I have, and also failed to find appropriate replacement is:

BUNDLE(${BUNDLE_SYMBOLICNAME}
    SOURCES
        private/src/activator.c
    IMPORT_LIBRARIES
        "eu.mibesis.httpservice.api.library"
        "eu.mibesis.mvc.api.library"
)

With what is the command IMPORT_LIBRARIES replaced? Also for this I
did not find working replacement.

For other changes it was well documented and working as advertised.


I've tried master and develop branch from GitHub GIT repository.

I've also not tried the celix bootstrap project, but it looks really
interesting. +1 for it.


Kind Regards,
Miroslav


2016-02-04 14:44 GMT+01:00 Pepijn Noltes <pepijnnoltes@gmail.com>:
> Hi All,
>
> I have been working on a revamp of the Celix specific CMake commands. The
> main reason to do this was to get rid of the deploy.cmake files.
> At the moment these files are needed when you want to create a "deployment"
> of a selection of bundes.
> One of the problems is that even if you disabled a certain subdirectory the
> deploy.cmake in that directory will still be processed. To counter this
> additional CMake code is needed.
>
> To solve this and some other issues I rewrote the Packaging.cmake so that
> to process is more based on CMake target properties [1] and CMake generator
> expressions [2]. I also took the liberty to split up and rename the
> commands in a more CMake style (e.g. add_<target_type> commands)
>
> Differences are
> - No separate deploy.cmake needed. You can use add_deploy in normal
> CMakeLists.txt files. Also as result no additional test concerning
> subprojects are needed.
> - bundle command has become add_bundle command
> - deploy command has become add_deploy command
> - possibility to create multiple bundles in one CMakeLists.txt file.
> - There are several supporting CMake commands for add_bundle and add_deploy
> - version info of bundle also used for so version information
> - libcelix_framework, libcelix_utils and libcelix_dfi are now generated
> with a so version.
> - Added CMake commands are documented in documents dir, see [3]
> - Legacy wrapper command for bundle -> add_bundle and deploy-> add_deploy
> exists. Supporting most, but not all old features.
> - For the Celix project all existing bundle commands and deploy.cmake files
> are updated to the new commands
> - If jar or zip command is present on the host system, make install can be
> used. If not make install-all (CPack) must be used. CMake will generate a
> message for this.
> - add_deploy supports adding not yet existing bundle targets. Removing the
> need for certain add_bundle ordering.
> - support for Ninja and "make -j"
> - Moved and updated the "Apache Celix Subprojects", "building Apache Celix"
> and "Getting Started with Apache Celix" to the documents dir, see [4]. [5]
> and [6]
>
> If there are no objections I would like to merge this feature into the
> development branch.
> The documentation still needs some work and there are probably still some
> bugs. but I would prefer to push this in preparation of a next Celix
> release.
>
> [1] https://cmake.org/cmake/help/v3.4/command/set_target_properties.html
> [2]
> https://cmake.org/cmake/help/v3.4/manual/cmake-generator-expressions.7.html?highlight=generator
> [3]
> https://github.com/apache/celix/blob/feature/CELIX-335_deploy_refactoring/documents/cmake_commands/readme.md
> [4]
> https://github.com/apache/celix/tree/feature/CELIX-335_deploy_refactoring/documents/subprojects
> [5]
> https://github.com/apache/celix/tree/feature/CELIX-335_deploy_refactoring/documents/building
> [6]
> https://github.com/apache/celix/tree/feature/CELIX-335_deploy_refactoring/documents/getting_started
>
>
> Greetings,
> Pepijn



-- 
Miroslav Beranič
MIBESIS
+386(0)40/814-843
miroslav.beranic@mibesis.si
http://www.mibesis.si

Mime
View raw message