Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add verify module for OSGI bundles #1010

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion buffer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</parent>

<artifactId>netty-buffer</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Buffer</name>

Expand Down
2 changes: 1 addition & 1 deletion codec-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</parent>

<artifactId>netty-codec-http</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Codec/HTTP</name>

Expand Down
2 changes: 1 addition & 1 deletion codec-socks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</parent>

<artifactId>netty-codec-socks</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Codec/Socks</name>

Expand Down
2 changes: 1 addition & 1 deletion codec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</parent>

<artifactId>netty-codec</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Codec</name>

Expand Down
25 changes: 23 additions & 2 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</parent>

<artifactId>netty-common</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Common</name>

Expand All @@ -47,6 +47,27 @@
<optional>true</optional>
</dependency>
</dependencies>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we do this in the parent pom?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what you mean by "this"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked if the plugin config should not better be put in the parent pom.xml

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is specific for:

            <Import-Package>
              sun.misc.*;resolution:=optional,
            </Import-Package>

which seems should be very narrow, one-bundle-only exception.
I presume that was the intent of

io.netty.util.internal.PlatformDependent

to centralize jvm vendor-specific stuff?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also use unsafe in buffer if it can be found

Sent from my iPhone. Excuse any typos....

Am 03.02.2013 um 18:32 schrieb Andrei Pozolotin notifications@github.com:

In common/pom.xml:

@@ -47,6 +47,23 @@
true


+
this is specific for:

        <Import-Package>
          sun.misc.*;resolution:=optional,
        </Import-Package>

which seems should be very narrow, one-bundle-only exception.
I presume that was the intent of

io.netty.util.internal.PlatformDependent
to centralize jvm vendor-specific stuff?


Reply to this email directly or view it on GitHub.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can not see any import which looks like "sun" in netty-buffer. what did you mean?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right,my bad...

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<!-- enforce JVM vendor package as optional -->
<Import-Package>
sun.misc.*;resolution:=optional,
*
</Import-Package>
<!-- override "internal" private package convention -->
<Private-Package>
!*
</Private-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

</project>

2 changes: 1 addition & 1 deletion handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</parent>

<artifactId>netty-handler</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Handler</name>

Expand Down
2 changes: 1 addition & 1 deletion microbench/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</parent>

<artifactId>netty-microbench</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Microbench</name>

Expand Down
20 changes: 18 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<module>handler</module>
<module>example</module>
<module>testsuite</module>
<!-- add "verify" back after karaf release -->
<module>all</module>
<module>tarball</module>
</modules>
Expand Down Expand Up @@ -114,7 +115,7 @@
<dependency>
<groupId>com.barchart.udt</groupId>
<artifactId>barchart-udt-bundle</artifactId>
<version>2.2.0</version>
<version>2.2.1</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -354,7 +355,6 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<includes>
<include>**/*Test*.java</include>
Expand Down Expand Up @@ -421,11 +421,27 @@
<tagNameFormat>netty-@{project.version}</tagNameFormat>
</configuration>
</plugin>
<!-- always produce osgi bundles -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>

</plugins>

<pluginManagement>
<plugins>
<!-- keep surefire and failsafe in sync -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
</plugin>
<!-- keep surefire and failsafe in sync -->
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
Expand Down
5 changes: 3 additions & 2 deletions transport-rxtx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
<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>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.0.Beta1-SNAPSHOT</version>
</parent>

<artifactId>netty-transport-rxtx</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Transport/RXTX</name>

Expand All @@ -44,11 +45,11 @@
<artifactId>netty-transport</artifactId>
<version>${project.version}</version>
</dependency>
<!-- FIXME find/make osgi bundle -->
<dependency>
<groupId>org.rxtx</groupId>
<artifactId>rxtx</artifactId>
</dependency>
</dependencies>

</project>

2 changes: 1 addition & 1 deletion transport-sctp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</parent>

<artifactId>netty-transport-sctp</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Transport/SCTP</name>

Expand Down
17 changes: 16 additions & 1 deletion transport-udt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</parent>

<artifactId>netty-transport-udt</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Netty/Transport/UDT</name>

Expand Down Expand Up @@ -77,6 +77,7 @@
<build>
<plugins>

<!-- run each test in separate JVM -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -85,6 +86,20 @@
</configuration>
</plugin>


<!-- attach and deploy tests artifact -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* under the License.
*/

package io.netty.channel.udt.bench;
package io.netty.test.udt.bench;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this moved by mistake ?


import io.netty.channel.udt.util.CaliperBench;
import io.netty.channel.udt.util.CaliperRunner;
import io.netty.channel.udt.util.TrafficControl;
import io.netty.test.udt.util.CaliperBench;
import io.netty.test.udt.util.CaliperRunner;
import io.netty.test.udt.util.TrafficControl;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
/**
* UDT Benchmarks
*/
package io.netty.channel.udt.bench;
package io.netty.test.udt.bench;

Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* under the License.
*/

package io.netty.channel.udt.bench.xfer;
package io.netty.test.udt.bench.xfer;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this moved by mistake ?


import io.netty.channel.udt.bench.BenchXfer;
import io.netty.channel.udt.util.CaliperRunner;
import io.netty.channel.udt.util.TrafficControl;
import io.netty.test.udt.bench.BenchXfer;
import io.netty.test.udt.util.CaliperRunner;
import io.netty.test.udt.util.TrafficControl;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
* under the License.
*/

package io.netty.channel.udt.bench.xfer;
package io.netty.test.udt.bench.xfer;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this moved by mistake ?

import com.barchart.udt.SocketUDT;
import com.barchart.udt.StatusUDT;
import com.barchart.udt.TypeUDT;
import com.google.caliper.Param;
import io.netty.channel.udt.bench.BenchXfer;
import io.netty.channel.udt.util.CaliperRunner;
import io.netty.channel.udt.util.TrafficControl;

import io.netty.test.udt.bench.BenchXfer;
import io.netty.test.udt.util.CaliperRunner;
import io.netty.test.udt.util.TrafficControl;

import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
Expand All @@ -32,7 +33,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicBoolean;

import static io.netty.channel.udt.util.UnitHelp.*;
import static io.netty.test.udt.util.UnitHelp.*;

/**
* perform two way native UDT socket send/recv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@
* under the License.
*/

package io.netty.channel.udt.bench.xfer;
package io.netty.test.udt.bench.xfer;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this moved by mistake ?

import com.yammer.metrics.Metrics;
import com.yammer.metrics.core.Counter;
import com.yammer.metrics.core.Meter;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandler;
import io.netty.channel.udt.util.BootHelp;
import io.netty.channel.udt.util.CustomReporter;
import io.netty.channel.udt.util.EchoMessageHandler;
import io.netty.channel.udt.util.TrafficControl;
import io.netty.channel.udt.util.UnitHelp;
import io.netty.test.udt.util.BootHelp;
import io.netty.test.udt.util.CustomReporter;
import io.netty.test.udt.util.EchoMessageHandler;
import io.netty.test.udt.util.TrafficControl;
import io.netty.test.udt.util.UnitHelp;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
/**
* UDT Transfer Speed Benchmarks
*/
package io.netty.channel.udt.bench.xfer;
package io.netty.test.udt.bench.xfer;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this moved by mistake ?


Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* under the License.
*/

package io.netty.channel.udt.nio;
package io.netty.test.udt.nio;

import static org.junit.Assume.*;
import io.netty.channel.udt.util.UnitHelp;
import io.netty.test.udt.util.UnitHelp;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this moved by mistake ?


import org.junit.BeforeClass;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
* under the License.
*/

package io.netty.channel.udt.nio;
package io.netty.test.udt.nio;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this moved by mistake ?

import io.netty.buffer.BufType;
import io.netty.channel.udt.nio.NioUdtByteAcceptorChannel;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
* under the License.
*/

package io.netty.channel.udt.nio;
package io.netty.test.udt.nio;

import io.netty.buffer.BufType;
import io.netty.channel.udt.nio.NioUdtByteConnectorChannel;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@
* under the License.
*/

package io.netty.channel.udt.nio;
package io.netty.test.udt.nio;

import com.yammer.metrics.Metrics;
import com.yammer.metrics.core.Meter;
import io.netty.bootstrap.Bootstrap;
import io.netty.buffer.BufType;
import io.netty.channel.ChannelFuture;
import io.netty.channel.udt.util.BootHelp;
import io.netty.channel.udt.util.EchoByteHandler;
import io.netty.channel.udt.util.UnitHelp;
import io.netty.channel.udt.nio.NioUdtByteRendezvousChannel;
import io.netty.test.udt.util.BootHelp;
import io.netty.test.udt.util.EchoByteHandler;
import io.netty.test.udt.util.UnitHelp;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
* under the License.
*/

package io.netty.channel.udt.nio;
package io.netty.test.udt.nio;

import io.netty.buffer.BufType;
import io.netty.channel.udt.nio.NioUdtMessageAcceptorChannel;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down