Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
frascati
frascati
Commits
c2a19ac4
Commit
c2a19ac4
authored
Aug 05, 2012
by
Munilla Christophe
Browse files
FraSCAti refactoring to use juliac_2.4.2
parent
e293e7aa
Changes
210
Hide whitespace changes
Inline
Side-by-side
examples/helloworld-osgi/bundles/pom.xml
View file @
c2a19ac4
...
...
@@ -82,10 +82,13 @@
<extensions>
true
</extensions>
<configuration>
<instructions>
<_nouses>
true
</_nouses>
<Bundle-SymbolicName>
${pom.artifactId}
</Bundle-SymbolicName>
<Bundle-Name>
${pom.name}
</Bundle-Name>
<Bundle-Vendor>
INRIA - University of Lille 1
</Bundle-Vendor>
<Bundle-Description>
${pom.name}
</Bundle-Description>
<Import-Package>
org.osgi.framework;version="1.3"
</Import-Package>
<DynamicImport-Package>
*
</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
...
...
frascati/osgi/frascati-in-osgi/bundles/pojosr-util
/pom.xml
→
examples/helloworld-osgi/osgi/concierge
/pom.xml
View file @
c2a19ac4
<?xml version="1.0"?>
<!--
* OW2 FraSCAti OSGi
* Copyright (c) 2011 - 2012 Inria, University of Lille 1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Christophe Munilla
*
* Contributor(s):
-->
<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/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.ow2.frascati.osgi.fio
</groupId>
<artifactId>
frascati-osgi-bundles
</artifactId>
<version>
1.5-SNAPSHOT
</version>
</parent>
<artifactId>
bundle-frascati-pojosr-util
</artifactId>
<name>
FraSCAti In OSGi Pojosr Resources Handler
</name>
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.ow2.frascati.osgi
</groupId>
<artifactId>
frascati-osgi-util
</artifactId>
<version>
1.5-SNAPSHOT
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.ow2.frascati.osgi
</groupId>
<artifactId>
bundle-frascati-resources
</artifactId>
<version>
1.5-SNAPSHOT
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.felix
</groupId>
<artifactId>
maven-bundle-plugin
</artifactId>
<configuration>
<excludeDependencies>
true
</excludeDependencies>
<instructions>
<Export-Package>
or.ow2.frascati.osgi.resource.pojosr
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: HelloWorld OSGi
*
* Copyright (c) 2011 INRIA, University of Lille 1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Christophe Munilla
*
* Contributor(s): Philippe Merle
*
-->
<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/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<artifactId>
helloworld-osgi-runtime-parent
</artifactId>
<groupId>
org.ow2.frascati.examples
</groupId>
<version>
1.5-SNAPSHOT
</version>
</parent>
<groupId>
org.ow2.frascati.examples
</groupId>
<artifactId>
helloworld-osgi-concierge
</artifactId>
<name>
OW2 FraSCAti Examples: HelloWorld OSGi with Concierge
</name>
<dependencies>
<dependency>
<groupId>
org.ow2.frascati
</groupId>
<artifactId>
frascati-implementation-osgi-concierge
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- ================================================ -->
<!-- Copy used OSGi bundles into target/classes -->
<!-- ================================================ -->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
examples/helloworld-osgi/osgi/concierge/src/test/java/org/ow2/frascati/examples/helloworld/osgi/HelloWorldTestCase.java
0 → 100644
View file @
c2a19ac4
/**
* OW2 FraSCAti Examples: HelloWorld OSGi
* Copyright (C) 2011 INRIA, University of Lille 1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Christophe Munilla
*
* Contributor(s):
*
*/
package
org.ow2.frascati.examples.helloworld.osgi
;
import
org.junit.Test
;
import
org.ow2.frascati.examples.test.FraSCAtiTestCase
;
public
class
HelloWorldTestCase
extends
FraSCAtiTestCase
{
@Override
public
final
String
getComposite
()
{
return
"helloworld-osgi"
;
}
@Test
public
final
void
testService
()
{
getService
(
Runnable
.
class
,
"r"
).
run
();
}
}
examples/helloworld-osgi/osgi/concierge/src/test/resources/init.xargs
0 → 100644
View file @
c2a19ac4
#
# Concierge 1.0.0
# Configuration file
#
-init
-all
#
# log configuration
#
-Dch.ethz.iks.concierge.debug=false
-Dch.ethz.iks.concierge.log.enabled=true
-Dch.ethz.iks.concierge.log.quiet=false
-Dch.ethz.iks.concierge.log.level=3
\ No newline at end of file
examples/helloworld-osgi/osgi/pom.xml
View file @
c2a19ac4
...
...
@@ -45,6 +45,7 @@
<module>
felix
</module>
<module>
knopflerfish
</module>
<module>
jboss
</module>
<module>
concierge
</module>
</modules>
<properties>
...
...
frascati/modules/frascati-implementation-osgi-concierge/pom.xml
0 → 100755
View file @
c2a19ac4
<?xml version="1.0"?>
<!--
* OW2 FraSCAti: SCA Implementation OSGi with Concierge
*
* Copyright (c) 2010 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
*
-->
<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/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<!-- ===================== -->
<!-- General Information -->
<!-- ===================== -->
<parent>
<groupId>
org.ow2.frascati
</groupId>
<artifactId>
frascati-modules
</artifactId>
<version>
1.5-SNAPSHOT
</version>
</parent>
<groupId>
org.ow2.frascati
</groupId>
<artifactId>
frascati-implementation-osgi-concierge
</artifactId>
<name>
OW2 FraSCAti: SCA Implementation OSGi with Concierge Module
</name>
<url>
http://frascati.ow2.org/
</url>
<inceptionYear>
2007
</inceptionYear>
<developers>
<developer>
<id>
merle
</id>
<name>
Philippe Merle
</name>
<email>
Philippe.Merle@inria.fr
</email>
<organization>
INRIA
</organization>
<organizationUrl>
http://www.inria.fr
</organizationUrl>
<roles>
<role>
Architect
</role>
<role>
Developer
</role>
</roles>
</developer>
</developers>
<!-- ========== -->
<!-- Properties -->
<!-- ========== -->
<properties>
</properties>
<!-- ======= -->
<!-- Build -->
<!-- ======= -->
<build>
<defaultGoal>
install
</defaultGoal>
<plugins>
</plugins>
</build>
<!-- ============ -->
<!-- Dependencies -->
<!-- ============ -->
<dependencies>
<!-- OW2 FraSCAti SCA Implementation OSGi Module. -->
<dependency>
<groupId>
org.ow2.frascati
</groupId>
<artifactId>
frascati-implementation-osgi
</artifactId>
<version>
${project.version}
</version>
</dependency>
<!-- OW2 Juliac Equinox Runtime. -->
<dependency>
<groupId>
org.objectweb.fractal.juliac.osgi
</groupId>
<artifactId>
juliac-osgi-runtime-concierge
</artifactId>
<version>
${juliac.version}
</version>
</dependency>
</dependencies>
<!-- ============= -->
<!-- Repositories -->
<!-- ============= -->
<repositories>
</repositories>
</project>
frascati/modules/frascati-implementation-osgi-equinox/pom.xml
View file @
c2a19ac4
...
...
@@ -72,10 +72,10 @@
<build>
<defaultGoal>
install
</defaultGoal>
<plugins>
</plugins>
</build>
<!-- ============ -->
...
...
frascati/modules/frascati-implementation-osgi-jboss/pom.xml
View file @
c2a19ac4
...
...
@@ -65,7 +65,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<properties>
</properties>
<!-- ======= -->
<!-- Build -->
<!-- ======= -->
...
...
@@ -91,9 +90,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.o
w2
.fractal.juliac.osgi
</groupId>
<groupId>
org.o
bjectweb
.fractal.juliac.osgi
</groupId>
<artifactId>
juliac-osgi-runtime-jboss
</artifactId>
<version>
2.5-SNAPSHOT
</version>
<version>
${juliac.version}
</version>
</dependency>
</dependencies>
...
...
frascati/modules/frascati-implementation-osgi-knopflerfish/pom.xml
View file @
c2a19ac4
...
...
@@ -57,14 +57,14 @@
</roles>
</developer>
</developers>
<!-- ========== -->
<!-- Properties -->
<!-- ========== -->
<properties>
</properties>
<!-- ======= -->
<!-- Build -->
<!-- ======= -->
...
...
frascati/modules/pom.xml
View file @
c2a19ac4
...
...
@@ -249,6 +249,7 @@
<module>
frascati-implementation-bpel
</module>
<module>
frascati-implementation-fractal
</module>
<module>
frascati-implementation-osgi
</module>
<module>
frascati-implementation-osgi-concierge
</module>
<module>
frascati-implementation-osgi-equinox
</module>
<module>
frascati-implementation-osgi-felix
</module>
<module>
frascati-implementation-osgi-jboss
</module>
...
...
frascati/osgi/bundles/introspector/pom.xml
View file @
c2a19ac4
...
...
@@ -44,6 +44,12 @@
<version>
1.5-SNAPSHOT
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.apache.felix
</groupId>
<artifactId>
org.osgi.core
</artifactId>
<version>
1.0.0
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
<build>
...
...
frascati/osgi/bundles/introspector/src/main/java/org/ow2/frascati/osgi/introspect/api/IntrospectService.java
View file @
c2a19ac4
...
...
@@ -25,9 +25,6 @@
*/
package
org.ow2.frascati.osgi.introspect.api
;
import
org.osgi.framework.Bundle
;
import
org.osgi.framework.BundleContext
;
/**
* A service which gives informations about registered bundles in a OSGI Framework
*/
...
...
@@ -41,12 +38,7 @@ public interface IntrospectService
/**
* Return an array of bundles registered in the introspected BundleContext
*/
Bundle
[]
getBundles
()
throws
Exception
;
/**
* Return the introspected BundleContext
*/
BundleContext
getBundleContext
()
throws
Exception
;
long
[]
getBundles
()
throws
Exception
;
/**
* Start the bundle which identifier is passed on as parameter
...
...
frascati/osgi/bundles/introspector/src/main/java/org/ow2/frascati/osgi/introspect/impl/IntrospectImpl.java
View file @
c2a19ac4
...
...
@@ -58,7 +58,7 @@ public final class IntrospectImpl implements IntrospectService, BundleListener,
// ---------------------------------------------------------------------------
// Internal state.
// --------------------------------------------------------------------------
private
static
Logger
log
=
Logger
.
getLogger
(
IntrospectImpl
.
class
.
getCanonicalName
());
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
IntrospectImpl
.
class
.
getCanonicalName
());
/**
* The spied BundleContext
*/
...
...
@@ -106,19 +106,16 @@ public final class IntrospectImpl implements IntrospectService, BundleListener,
*
* @see org.ow2.frascati.osgi.introspect.api.IntrospectService#getBundles()
*/
public
final
Bundle
[]
getBundles
()
throws
Exception
public
final
long
[]
getBundles
()
throws
Exception
{
return
context
.
getBundles
();
}
/**
* {@inheritDoc}
*
* @see org.ow2.frascati.osgi.introspect.api.IntrospectService#getBundleContext()
*/
public
final
BundleContext
getBundleContext
()
throws
Exception
{
return
context
;
Bundle
[]
bundles
=
context
.
getBundles
();
long
[]
bundleIdentifiers
=
new
long
[
bundles
.
length
];
int
identifierIndex
=
0
;
for
(;
identifierIndex
<
bundleIdentifiers
.
length
;
identifierIndex
++)
{
bundleIdentifiers
[
identifierIndex
]
=
bundles
[
identifierIndex
].
getBundleId
();
}
return
bundleIdentifiers
;
}
/**
...
...
@@ -203,12 +200,11 @@ public final class IntrospectImpl implements IntrospectService, BundleListener,
location
=
matcher
.
replaceAll
(
"/"
);
}
catch
(
PatternSyntaxException
e
)
{
log
.
log
(
Level
.
WARNING
,
e
.
getMessage
(),
e
);
LOGGER
.
log
(
Level
.
WARNING
,
e
.
getMessage
(),
e
);
}
location
=
new
StringBuilder
(
protocol
).
append
(
prefix
)
.
append
(
location
).
toString
();
}
System
.
out
.
println
(
location
);
context
.
installBundle
(
location
);
}
...
...
frascati/osgi/bundles/log/pom.xml
View file @
c2a19ac4
...
...
@@ -47,6 +47,12 @@
<version>
${osgi.version}
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.osgi
</groupId>
<artifactId>
org.osgi.core
</artifactId>
<version>
${osgi.version}
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
<build>
...
...
frascati/osgi/bundles/log/src/main/java/org/ow2/frascati/osgi/log/intermediate/LogIntermediate.java
View file @
c2a19ac4
...
...
@@ -28,10 +28,13 @@ package org.ow2.frascati.osgi.log.intermediate;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Dictionary
;
import
org.osgi.service.log.LogEntry
;
import
org.osgi.service.log.LogListener
;
import
org.osgi.service.log.LogService
;
import
org.osgi.framework.Bundle
;
import
org.ow2.frascati.osgi.log.api.LogDispatcherService
;
import
org.ow2.frascati.osgi.log.api.LogWriterService
;
...
...
@@ -60,7 +63,7 @@ public class LogIntermediate implements LogListener, LogDispatcherService
String
message
=
entry
.
getMessage
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
append
(
"["
);
builder
.
append
(
entry
.
getBundle
()
.
getSymbolicName
(
));
builder
.
append
(
getSymbolicName
(
entry
.
getBundle
()));
builder
.
append
(
"]"
);
switch
(
entry
.
getLevel
())
{
...
...
@@ -127,4 +130,11 @@ public class LogIntermediate implements LogListener, LogDispatcherService
{
writers
.
remove
(
writer
);
}
public
String
getSymbolicName
(
Bundle
bundle
)
{
Dictionary
<
String
,
String
>
headers
=
bundle
.
getHeaders
();
String
symbolicName
=
headers
.
get
(
"Bundle-SymbolicName"
);
return
symbolicName
;
}
}
\ No newline at end of file
frascati/osgi/bundles/pom.xml
View file @
c2a19ac4
...
...
@@ -44,13 +44,5 @@
<module>
introspector-sca
</module>
<module>
log
</module>
</modules>
<dependencies>
<dependency>
<groupId>
org.osgi
</groupId>
<artifactId>
org.osgi.core
</artifactId>
<version>
4.2.0
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
</project>
frascati/osgi/concierge-resources/pom.xml
0 → 100644
View file @
c2a19ac4
<?xml version="1.0"?>
<!--
* OW2 FraSCAti OSGi
* Copyright (c) 2011 - 2012 Inria, University of Lille 1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Christophe Munilla
*
* Contributor(s):
-->
<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/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.ow2.frascati.osgi
</groupId>
<artifactId>
parent
</artifactId>
<version>
1.5-SNAPSHOT
</version>
</parent>
<artifactId>
frascati-osgi-concierge-resources
</artifactId>
<name>
OW2 FraSCAti OSGi Concierge Resources Handlers
</name>
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.ow2.frascati.osgi
</groupId>
<artifactId>
frascati-osgi-resources
</artifactId>
<version>
${project.version}
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.ow2.frascati.osgi
</groupId>
<artifactId>
frascati-osgi-util
</artifactId>
<version>
${project.version}
</version>
<scope>
provided
</scope>
</dependency>