Skip to content

Commit 01ad296

Browse files
build: Updated tycho to version 4 (#5744)
* updated tycho to version 4 * Removed unused unbind methods. unrequired optional cardinality in identityrest services and fixed some tests * fixed copyright plate
1 parent 881a2d3 commit 01ad296

File tree

12 files changed

+80
-58
lines changed

12 files changed

+80
-58
lines changed

kura/distrib/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<name>distrib</name>
3131
<url>http://maven.apache.org</url>
3232
<properties>
33-
<tycho-version>3.0.5</tycho-version>
33+
<tycho-version>4.0.11</tycho-version>
3434
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3535
<zip_workspace.prefix>user_workspace_archive_${project.version}</zip_workspace.prefix>
3636

@@ -964,7 +964,8 @@
964964
<configuration>
965965
<strictVersions>true</strictVersions>
966966
<format>${kura.build.version}</format>
967-
<skipPomGeneration>true</skipPomGeneration>
967+
<skipPomGeneration>true</skipPomGeneration>
968+
<deriveHeaderFromSource>false</deriveHeaderFromSource>
968969
</configuration>
969970
</plugin>
970971
<!--This plugin's configuration is used to store Eclipse m2e settings

kura/examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<tycho.scmUrl>scm:git:ssh://github.com/eclipse/kura/kura</tycho.scmUrl>
3030
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3131
<osgi-dp-plugin-version>0.3.0</osgi-dp-plugin-version>
32-
<tycho-version>3.0.5</tycho-version>
32+
<tycho-version>4.0.11</tycho-version>
3333
<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
3434
<kura.basedir>${project.basedir}/..</kura.basedir>
3535
<kura.build.version>${maven.build.timestamp}</kura.build.version>
Lines changed: 50 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,95 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2011, 2021 Eurotech and/or its affiliates and others
4+
Copyright (c) 2011, 2025 Eurotech and/or its affiliates and others
55
6-
This program and the accompanying materials are made
7-
available under the terms of the Eclipse Public License 2.0
8-
which is available at https://www.eclipse.org/legal/epl-2.0/
9-
10-
SPDX-License-Identifier: EPL-2.0
11-
12-
Contributors:
13-
Eurotech
6+
This program and the accompanying materials are made
7+
available under the terms of the Eclipse Public License 2.0
8+
which is available at https://www.eclipse.org/legal/epl-2.0/
9+
10+
SPDX-License-Identifier: EPL-2.0
11+
12+
Contributors:
13+
Eurotech
1414
1515
-->
16-
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="activate" deactivate="deactivate" enabled="true" immediate="true" name="org.eclipse.kura.configuration.ConfigurationService">
17-
<implementation class="org.eclipse.kura.core.configuration.ConfigurationServiceAuditFacade"/>
18-
<service>
19-
<provide interface="org.eclipse.kura.configuration.ConfigurationService"/>
20-
<provide interface="org.eclipse.kura.configuration.metatype.OCDService"/>
21-
</service>
22-
<property name="service.pid" value="org.eclipse.kura.configuration.ConfigurationService"/>
23-
<reference bind="setEventAdmin" cardinality="1..1" interface="org.osgi.service.event.EventAdmin" name="EventAdmin" policy="static" unbind="unsetEventAdmin"/>
16+
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.4.0"
17+
activate="activate"
18+
deactivate="deactivate"
19+
enabled="true"
20+
immediate="true"
21+
name="org.eclipse.kura.configuration.ConfigurationService">
22+
23+
<implementation class="org.eclipse.kura.core.configuration.ConfigurationServiceAuditFacade"/>
24+
25+
<service>
26+
<provide interface="org.eclipse.kura.configuration.ConfigurationService"/>
27+
<provide interface="org.eclipse.kura.configuration.metatype.OCDService"/>
28+
</service>
29+
30+
<property name="service.pid" value="org.eclipse.kura.configuration.ConfigurationService"/>
31+
32+
<reference name="EventAdmin"
33+
bind="setEventAdmin"
34+
cardinality="1..1"
35+
interface="org.osgi.service.event.EventAdmin"
36+
policy="static" />
37+
2438
<reference name="ConfigurationAdmin"
2539
bind="setConfigurationAdmin"
26-
unbind="unsetConfigurationAdmin"
2740
cardinality="1..1"
2841
policy="static"
29-
interface="org.osgi.service.cm.ConfigurationAdmin"/>
42+
interface="org.osgi.service.cm.ConfigurationAdmin" />
43+
3044
<reference name="MetaTypeService"
3145
bind="setMetaTypeService"
32-
unbind="unsetMetaTypeService"
3346
cardinality="1..1"
3447
policy="static"
35-
interface="org.osgi.service.metatype.MetaTypeService"/>
48+
interface="org.osgi.service.metatype.MetaTypeService" />
49+
3650
<reference name="SystemService"
3751
bind="setSystemService"
38-
unbind="unsetSystemService"
3952
cardinality="1..1"
4053
policy="static"
41-
interface="org.eclipse.kura.system.SystemService"/>
54+
interface="org.eclipse.kura.system.SystemService" />
55+
4256
<reference name="CryptoService"
4357
interface="org.eclipse.kura.crypto.CryptoService"
4458
bind="setCryptoService"
45-
unbind="unsetCryptoService"
4659
cardinality="1..1"
47-
policy="static"/>
60+
policy="static" />
61+
4862
<reference bind="setScrService"
4963
cardinality="1..1"
5064
interface="org.osgi.service.component.runtime.ServiceComponentRuntime"
5165
name="ScrService"
52-
policy="static"
53-
unbind="unsetScrService"/>
54-
<reference bind="addConfigurableComponent"
66+
policy="static" />
67+
68+
<reference name="ConfigurableComponent"
69+
bind="addConfigurableComponent"
5570
cardinality="0..n"
5671
interface="org.eclipse.kura.configuration.ConfigurableComponent"
57-
name="ConfigurableComponent"
5872
policy="dynamic"
59-
unbind="removeConfigurableComponent"/>
73+
unbind="removeConfigurableComponent" />
74+
6075
<reference bind="addSelfConfiguringComponent"
6176
cardinality="0..n"
6277
interface="org.eclipse.kura.configuration.SelfConfiguringComponent"
6378
name="SelfConfiguringComponent"
6479
policy="dynamic"
65-
unbind="removeSelfConfiguringComponent"/>
80+
unbind="removeSelfConfiguringComponent" />
81+
6682
<reference bind="setXmlUnmarshaller"
6783
cardinality="1..1"
6884
interface="org.eclipse.kura.marshalling.Unmarshaller"
6985
name="Unmarshaller"
7086
policy="static"
71-
target="(kura.service.pid=org.eclipse.kura.xml.marshaller.unmarshaller.provider)"
72-
unbind="unsetXmlUnmarshaller"/>
87+
target="(kura.service.pid=org.eclipse.kura.xml.marshaller.unmarshaller.provider)" />
88+
7389
<reference bind="setXmlMarshaller"
7490
cardinality="1..1"
7591
interface="org.eclipse.kura.marshalling.Marshaller"
7692
name="Marshaller"
7793
policy="static"
78-
target="(kura.service.pid=org.eclipse.kura.xml.marshaller.unmarshaller.provider)"
79-
unbind="unsetXmlMarshaller"/>
94+
target="(kura.service.pid=org.eclipse.kura.xml.marshaller.unmarshaller.provider)" />
8095
</scr:component>

kura/org.eclipse.kura.rest.identity.provider/OSGI-INF/IdentityRestServiceV1.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
<!--
33
44
Copyright (c) 2024, 2025 Eurotech and/or its affiliates and others
5-
5+
66
This program and the accompanying materials are made
77
available under the terms of the Eclipse Public License 2.0
88
which is available at https://www.eclipse.org/legal/epl-2.0/
9-
9+
1010
SPDX-License-Identifier: EPL-2.0
11-
11+
1212
Contributors:
1313
Eurotech
1414
1515
-->
16-
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
16+
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.4.0"
1717
activate="activate"
1818
immediate="true"
1919
name="org.eclipse.kura.internal.rest.identity.provider.IdentityRestServiceV1">
@@ -47,7 +47,7 @@
4747

4848
<reference interface="org.eclipse.kura.internal.rest.identity.provider.LegacyIdentityService"
4949
bind="bindLegacyIdentityService"
50-
cardinality="0..1"
50+
cardinality="1..1"
5151
name="LegacyIdentityService"
5252
policy="static" />
5353

kura/org.eclipse.kura.rest.identity.provider/OSGI-INF/IdentityRestServiceV2.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
<!--
33
44
Copyright (c) 2024, 2025 Eurotech and/or its affiliates and others
5-
5+
66
This program and the accompanying materials are made
77
available under the terms of the Eclipse Public License 2.0
88
which is available at https://www.eclipse.org/legal/epl-2.0/
9-
9+
1010
SPDX-License-Identifier: EPL-2.0
11-
11+
1212
Contributors:
1313
Eurotech
1414
1515
-->
16-
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
16+
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.4.0"
1717
immediate="true"
1818
name="org.eclipse.kura.internal.rest.identity.provider.IdentityRestServiceV2">
1919

@@ -40,7 +40,7 @@
4040

4141
<reference interface="org.eclipse.kura.identity.IdentityService"
4242
bind="bindIdentityService"
43-
cardinality="0..1"
43+
cardinality="1..1"
4444
name="IdentityService"
4545
policy="static" />
4646

kura/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
<properties>
139139
<!-- SCM: Note that we are in the "kura" sub-dir here already -->
140140
<tycho.scmUrl>scm:git:ssh://github.com/eclipse/kura/kura</tycho.scmUrl>
141-
<tycho-version>3.0.5</tycho-version>
141+
<tycho-version>4.0.11</tycho-version>
142142
<osgi-dp-plugin-version>0.3.0</osgi-dp-plugin-version>
143143
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
144144
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -575,6 +575,7 @@
575575
<strictVersions>true</strictVersions>
576576
<format>${kura.build.version}</format>
577577
<skipPomGeneration>true</skipPomGeneration>
578+
<deriveHeaderFromSource>false</deriveHeaderFromSource>
578579
</configuration>
579580
</plugin>
580581
<plugin>

kura/test/org.eclipse.kura.rest.identity.provider.test/src/test/java/org/eclipse/kura/internal/rest/identity/provider/test/IdentityRestServiceV2DependenciesTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024 Eurotech and/or its affiliates and others
2+
* Copyright (c) 2024, 2025 Eurotech and/or its affiliates and others
33
*
44
* This program and the accompanying materials are made
55
* available under the terms of the Eclipse Public License 2.0
@@ -99,9 +99,10 @@ public void shouldCatchExceptionsOnRequestHandlerUnbind() throws KuraException {
9999
}
100100

101101
@Test
102-
public void shouldBindRestIdentityServiceDependencies() throws KuraException {
102+
public void shouldBindRestIdentityServiceDependencies() {
103103
givenUserAdminMock();
104104
givenIdentityServiceMock();
105+
givenRequestHandlerRegistryMock();
105106

106107
whenBindDependencies();
107108

kura/test/org.eclipse.kura.rest.identity.provider.test/src/test/java/org/eclipse/kura/internal/rest/identity/provider/test/IdentityServiceV1Test.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2023, 2024 Eurotech and/or its affiliates and others
2+
* Copyright (c) 2023, 2025 Eurotech and/or its affiliates and others
33
*
44
* This program and the accompanying materials are made
55
* available under the terms of the Eclipse Public License 2.0
@@ -287,7 +287,7 @@ private void whenGettingUser(String username) {
287287
}
288288
}
289289

290-
private void thenUserIsCreated() throws KuraException {
290+
private void thenUserIsCreated() {
291291
verify(this.userAdmin, times(1)).createRole(USER_ROLE_NAME_PREFIX + this.newUser.getUserName(), Role.USER);
292292
}
293293

kura/test/pom.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@
116116
</configuration>
117117
</execution>
118118
</executions>
119-
<configuration />
120119
</plugin>
121120
<plugin>
122121
<groupId>org.eclipse.tycho</groupId>
@@ -130,7 +129,7 @@
130129
${tycho.testArgLine}
131130
${tycho.surefire.testenv.args}
132131
</argLine>
133-
<!-- <appArgLine>-consoleLog -console 5002 -noExit</appArgLine> -->
132+
<!-- <appArgLine>-consoleLog -console 5002 -noExit</appArgLine>-->
134133
<dependencies>
135134
<dependency>
136135
<type>p2-installable-unit</type>
@@ -204,6 +203,10 @@
204203
<type>p2-installable-unit</type>
205204
<artifactId>org.eclipse.kura.core</artifactId>
206205
</dependency>
206+
<dependency>
207+
<type>p2-installable-unit</type>
208+
<artifactId>org.eclipse.kura.core.identity</artifactId>
209+
</dependency>
207210
<dependency>
208211
<type>p2-installable-unit</type>
209212
<artifactId>org.eclipse.kura.core.system</artifactId>

kura/tools/kura-addon-archetype/src/main/resources/archetype-resources/bundles/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
<properties>
3737
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38-
<tycho-version>3.0.5</tycho-version>
38+
<tycho-version>4.0.11</tycho-version>
3939
<bnd-version>7.1.0</bnd-version>
4040
<maven-resources-version>3.1.0</maven-resources-version>
4141
<maven-deploy-version>2.8.2</maven-deploy-version>
@@ -96,6 +96,7 @@
9696
<version>${tycho-version}</version>
9797
<configuration>
9898
<strictVersions>true</strictVersions>
99+
<deriveHeaderFromSource>false</deriveHeaderFromSource>
99100
</configuration>
100101
</plugin>
101102

0 commit comments

Comments
 (0)