You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Ch...@ehealth.fgov.be on 2010/04/09 13:38:10 UTC

maven-bundle-plugin 2.0.1 issues, cannot find aQute


Dear Felix-users,


I'm new to Felix/OSGI, and am currently importing an external Maven2
project written for felix (and the maven-bundle-plugin). The packaging of
my project has the type set to "bundle", and the maven-bundle-plugin is
configured as follows :

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.0.1</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
               <Bundle-SymbolicName>
                 ${artifactId}
               </Bundle-SymbolicName>
               <Bundle-Vendor>
                 someVendor
               </Bundle-Vendor>
               <Bundle-ClassPath>

.,bcprov-jdk16-145.jar,bctsp-jdk16-145.jar,bcmail-jdk16-145.jar
               </Bundle-ClassPath>
               <Private-Package>
                 some.package
               </Private-Package>
               <Import-Package>
                 javax.crypto,
                 javax.crypto.interfaces,
                 javax.crypto.spec,
                 javax.naming,
                 javax.naming.directory,
                 javax.security.auth.x500,
                 javax.activation,
                 org.osgi.framework
               </Import-Package>
               <Export-Package>
                 org.bouncycastle.util.encoders,
                 org.bouncycastle.tsp,
                 org.bouncycastle.cms,
                 org.bouncycastle.asn1,
                 org.bouncycastle.asn1.cms,
                 org.bouncycastle.asn1.pkcs
               </Export-Package>
               <Service-Component>
               </Service-Component>
               <DynamicImport-Package>
                 junit.framework,
                 junit.textui,
                 javax.mail,
                 javax.mail.internet
               </DynamicImport-Package>
               <Bundle-Activator>
                 some.package.Activator
               </Bundle-Activator>
             </instructions>
        </configuration>
      </plugin>


I am using maven and eclipse connecting to the repositories of my company,
and am behind a proxy. So I downloaded the maven-bundle-plugin manually,
and installed it using the following command :
mvn install:install-file -Dfile="C:\temp\maven-bundle-plugin-2.0.1.jar"
-DgroupId=org.apache.felix -DartifactId=maven-bundle-plugin -Dversion=2.0.1
-Dpackaging=jar -DgeneratePom=true

Now, when I try to build my project, I get the following error (the full
trace is in the attached log.txt) :
mvn org.apache.felix:maven-bundle-plugin:2.0.1:bundle -e
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal
'org.apache.felix:maven-bundle-plugin:2.0.1:bundle': Unable to load the
mojo 'org.apache.felix:maven-bundle-plugin:2.0.1:bundle' in the plugin
'org.apache.felix:maven-bundle-plugin'. A required class is missing:
aQute/lib/osgi/Resource
aQute.lib.osgi.Resource
[INFO]
------------------------------------------------------------------------

(See attached file: log.txt)

Knowing that aQute was in the bnd tool, I downloaded bndlib.jar, installed
it in my local maven repository but the error remains.

Do you know what I'm doing wrong ?

Thanks,

Charles-Louis de Maere

Re: maven-bundle-plugin 2.0.1 issues, cannot find aQute

Posted by Ch...@ehealth.fgov.be.
Thanks a lot for your help, Justin.

I have configured the proxy in the maven settings.xml, then added the maven
central repository to my list of mirrors, and it worked !

     <mirror>
      <id>ibiblio.org</id>
      <name>ibiblio Mirror of http://repo1.maven.org/maven2/</name>
      <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
      <mirrorOf>central</mirrorOf>
    </mirror>



Charles-Louis



                                                                           
             Justin Edelson                                                
                                                                           
             09/04/2010 15:16                                           To 
                                       users@felix.apache.org              
                                                                        cc 
             Please respond to                                             
             users@felix.apach                                     Subject 
                   e.org               Re: maven-bundle-plugin 2.0.1       
                                       issues, cannot find aQute           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




On 4/9/10 7:38 AM, Charles-Louis.DeMaere@ehealth.fgov.be wrote:
> Dear Felix-users,
...
>
> I am using maven and eclipse connecting to the repositories of my
> company, and am behind a proxy. So I downloaded the maven-bundle-plugin
> manually, and installed it using the following command :
> mvn install:install-file -Dfile="C:\temp\maven-bundle-plugin-2.0.1.jar"
> -DgroupId=org.apache.felix -DartifactId=maven-bundle-plugin
> -Dversion=2.0.1 -Dpackaging=jar -DgeneratePom=true

You pass "generatePom=true" here, which generates a minimal pom file.
This pom will not have any dependencies listed, which causes the class
error you reported.

You could fix this by downloading the pom from central and using that,
but I think you're just going to run into another problem. I know you
are behind a proxy, but Maven supports proxy servers, so I don't see why
you need to do the manual install.

So my advice is... delete your local repository, configure Maven's proxy
settings, and start over.

Justin

>
> Now, when I try to build my project, I get the following error (the full
> trace is in the attached log.txt) :
> mvn org.apache.felix:maven-bundle-plugin:2.0.1:bundle -e
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Internal error in the plugin manager executing goal
> 'org.apache.felix:maven-bundle-plugin:2.0.1:bundle': Unable to load the
> mojo 'org.apache.felix:maven-bundle-plugin:2.0.1:bundle' in the plugin
> 'org.apache.felix:maven-bundle-plugin'. A required class is missing:
> aQute/lib/osgi/Resource
> aQute.lib.osgi.Resource
> [INFO]
> ------------------------------------------------------------------------
>
> /(See attached file: log.txt)/
>
> Knowing that aQute was in the bnd tool, I downloaded bndlib.jar,
> installed it in my local maven repository but the error remains.
>
> Do you know what I'm doing wrong ?
>
> Thanks,
>
> Charles-Louis de Maere
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org


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


Re: maven-bundle-plugin 2.0.1 issues, cannot find aQute

Posted by Justin Edelson <ju...@gmail.com>.
On 4/9/10 7:38 AM, Charles-Louis.DeMaere@ehealth.fgov.be wrote:
> Dear Felix-users,
...
> 
> I am using maven and eclipse connecting to the repositories of my
> company, and am behind a proxy. So I downloaded the maven-bundle-plugin
> manually, and installed it using the following command :
> mvn install:install-file -Dfile="C:\temp\maven-bundle-plugin-2.0.1.jar"
> -DgroupId=org.apache.felix -DartifactId=maven-bundle-plugin
> -Dversion=2.0.1 -Dpackaging=jar -DgeneratePom=true

You pass "generatePom=true" here, which generates a minimal pom file.
This pom will not have any dependencies listed, which causes the class
error you reported.

You could fix this by downloading the pom from central and using that,
but I think you're just going to run into another problem. I know you
are behind a proxy, but Maven supports proxy servers, so I don't see why
you need to do the manual install.

So my advice is... delete your local repository, configure Maven's proxy
settings, and start over.

Justin

> 
> Now, when I try to build my project, I get the following error (the full
> trace is in the attached log.txt) :
> mvn org.apache.felix:maven-bundle-plugin:2.0.1:bundle -e
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Internal error in the plugin manager executing goal
> 'org.apache.felix:maven-bundle-plugin:2.0.1:bundle': Unable to load the
> mojo 'org.apache.felix:maven-bundle-plugin:2.0.1:bundle' in the plugin
> 'org.apache.felix:maven-bundle-plugin'. A required class is missing:
> aQute/lib/osgi/Resource
> aQute.lib.osgi.Resource
> [INFO]
> ------------------------------------------------------------------------
> 
> /(See attached file: log.txt)/
> 
> Knowing that aQute was in the bnd tool, I downloaded bndlib.jar,
> installed it in my local maven repository but the error remains.
> 
> Do you know what I'm doing wrong ?
> 
> Thanks,
> 
> Charles-Louis de Maere
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org


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