You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by rcbandit <pe...@gmail.com> on 2012/01/28 21:58:04 UTC

Maven - Unresolved references to [javax.activation, javax.annotation]

I'm developing web application with OSGI. I have a maven configuration error
which I cannot find. This is the complete source code:
http://uploading.com/files/8e5c9888/SH_27_test.zip/

This is the POM file:

<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.DX_57.osgi.SH_27</groupId>
        <artifactId>SH_27</artifactId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>SH_27-impl</artifactId>
    <packaging>bundle</packaging>
    <name>SH_27-impl</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>${pom.groupId}</groupId>
            <artifactId>SH_27-api</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>SH_27-api</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Import-Package>${pom.groupId}.api,
org.osgi.framework</Import-Package>
                       
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                       
<Bundle-Activator>${pom.groupId}.impl.SessionHandleApp</Bundle-Activator>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <groupId>org.DX_57.osgi.SH_27</groupId>
</project>


When I try to compile it with Netbeans I get this error:
http://pastebin.com/whxuSb7V

The problem occurs when I add @Datasource. It seems that I'm missing
something in the POM file but I don't have idea what it is?

Any help will be highly appreciated.

Best Wishes Peter

--
View this message in context: http://maven.40175.n5.nabble.com/Maven-Unresolved-references-to-javax-activation-javax-annotation-tp5438593p5438593.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven - Unresolved references to [javax.activation, javax.annotation]

Posted by Ansgar Konermann <an...@googlemail.com>.
Am 28.01.2012 21:58, schrieb rcbandit:
> I'm developing web application with OSGI. I have a maven configuration error
> which I cannot find. This is the complete source code:
> http://uploading.com/files/8e5c9888/SH_27_test.zip/
>
> This is the POM file:
> [...]
>
> When I try to compile it with Netbeans I get this error:
> http://pastebin.com/whxuSb7V

I find this snippet in your pastebin:

 1.
    Failed to execute goal
    org.apache.felix:maven-bundle-plugin:2.3.6:bundle (default-bundle)
    on project SH_27-impl: Error(s) found in bundle configuration ->
    [Help 1]
 2.
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
    execute goal org.apache.felix:maven-bundle-plugin:2.3.6:bundle
    (default-bundle) on project SH_27-impl: Error(s) found in bundle
    configuration



This is an OSGI-related problem, not so much a maven-related one. The
maven-bundle-plugin complains about the "[OSGI] bundle configuration".
Please ask for assistance on the Apache Felix Users mailing list.

Best regards

Ansgar


Re: Maven - Unresolved references to [javax.activation, javax.annotation]

Posted by Robert Scholte <ap...@sourcegrounds.com>.
The title of this message indicates missing some specific dependencies.
The link to the page should tell you need to download them from the  
sun/oracle site and install them by hand (these dependencies are not  
available at Maven Central due to licenses)
The page should also tell you which groupId and artifactId you should use.

On the other hand, Ansgar analyzed your logging and it does look like a  
problem with Felix.
So follow his advice: contact the Felix-team; best chance they have the  
right answer.

-Robert

On Sun, 29 Jan 2012 11:59:00 +0100, rcbandit <pe...@gmail.com>  
wrote:

> http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html
>
>
> Would you explain in details what I need to change?
>
>
> --
> View this message in context:  
> http://maven.40175.n5.nabble.com/Maven-Unresolved-references-to-javax-activation-javax-annotation-tp5438593p5439261.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven - Unresolved references to [javax.activation, javax.annotation]

Posted by rcbandit <pe...@gmail.com>.
http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html


Would you explain in details what I need to change?


--
View this message in context: http://maven.40175.n5.nabble.com/Maven-Unresolved-references-to-javax-activation-javax-annotation-tp5438593p5439261.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven - Unresolved references to [javax.activation, javax.annotation]

Posted by Robert Scholte <ap...@sourcegrounds.com>.
http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html


On Sat, 28 Jan 2012 21:58:04 +0100, rcbandit <pe...@gmail.com>  
wrote:

> I'm developing web application with OSGI. I have a maven configuration  
> error
> which I cannot find. This is the complete source code:
> http://uploading.com/files/8e5c9888/SH_27_test.zip/
>
> This is the POM file:
>
> <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.DX_57.osgi.SH_27</groupId>
>         <artifactId>SH_27</artifactId>
>         <version>1.0-SNAPSHOT</version>
>         <relativePath>../pom.xml</relativePath>
>     </parent>
>     <artifactId>SH_27-impl</artifactId>
>     <packaging>bundle</packaging>
>     <name>SH_27-impl</name>
>     <url>http://maven.apache.org</url>
>     <dependencies>
>         <dependency>
>             <groupId>junit</groupId>
>             <artifactId>junit</artifactId>
>             <version>3.8.1</version>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.felix</groupId>
>             <artifactId>org.osgi.core</artifactId>
>             <version>1.0.0</version>
>         </dependency>
>         <dependency>
>             <groupId>${pom.groupId}</groupId>
>             <artifactId>SH_27-api</artifactId>
>             <version>1.0-SNAPSHOT</version>
>         </dependency>
>         <dependency>
>             <groupId>${project.groupId}</groupId>
>             <artifactId>SH_27-api</artifactId>
>             <version>${project.version}</version>
>         </dependency>
>     </dependencies>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.felix</groupId>
>                 <artifactId>maven-bundle-plugin</artifactId>
>                 <extensions>true</extensions>
>                 <configuration>
>                     <instructions>
>                         <Import-Package>${pom.groupId}.api,
> org.osgi.framework</Import-Package>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Bundle-Activator>${pom.groupId}.impl.SessionHandleApp</Bundle-Activator>
>                     </instructions>
>                 </configuration>
>             </plugin>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>2.3.2</version>
>                 <configuration>
>                     <source>1.7</source>
>                     <target>1.7</target>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
>     <groupId>org.DX_57.osgi.SH_27</groupId>
> </project>
>
>
> When I try to compile it with Netbeans I get this error:
> http://pastebin.com/whxuSb7V
>
> The problem occurs when I add @Datasource. It seems that I'm missing
> something in the POM file but I don't have idea what it is?
>
> Any help will be highly appreciated.
>
> Best Wishes Peter
>
> --
> View this message in context:  
> http://maven.40175.n5.nabble.com/Maven-Unresolved-references-to-javax-activation-javax-annotation-tp5438593p5438593.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org