You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Robert Burrell Donkin <ro...@gmail.com> on 2009/06/03 19:48:15 UTC

Re: svn commit: r781397 - in /james/jspf/trunk: resolver/pom.xml tester/pom.xml

On Wed, Jun 3, 2009 at 4:22 PM, David Jencks <da...@yahoo.com> wrote:
> why not use <packaging>bundle</packaging> and leave out the jar plugin
> configuration?

dunno :-)

are there are disadvantages?

> Also, I kinda like making up a package version for each package related to
> the bundle version.

care to explain a little more...?

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: svn commit: r781397 - in /james/jspf/trunk: resolver/pom.xml tester/pom.xml

Posted by David Jencks <da...@yahoo.com>.
On Jun 3, 2009, at 10:48 AM, Robert Burrell Donkin wrote:

> On Wed, Jun 3, 2009 at 4:22 PM, David Jencks  
> <da...@yahoo.com> wrote:
>> why not use <packaging>bundle</packaging> and leave out the jar  
>> plugin
>> configuration?
>
> dunno :-)
>
> are there are disadvantages?

Not that I know of.  Something like this...

   <packaging>bundle</packaging>
....

       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
         <version>2.0.0</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
             <Export-Package>org.apache.james.jspf.*;version=0.9.7</ 
Export-Package>
             <Embed-Dependency>*;scope=runtime</Embed-Dependency>
             <Specification-Title>${pom.name}</Specification-Title>
             <Specification-Version>${pom.version}</Specification- 
Version>
             <Specification-Vendor>The Apache Software Foundation</ 
Specification-Vendor>
             <Implementation-Title>${pom.name}</Implementation-Title>
             <Implementation-Version>${pom.version}</Implementation- 
Version>
             <Implementation-Vendor>The Apache Software Foundation</ 
Implementation-Vendor>
             <Implementation-Vendor-Id>org.apache</Implementation- 
Vendor-Id>
             <X-Compile-Source-JDK>${target.jdk}</X-Compile-Source-JDK>
             <X-Compile-Target-JDK>${target.jdk}</X-Compile-Target-JDK>
             <Bundle-DocUrl>${url}</Bundle-DocUrl>
             <url>${pom.url}</url>
             <Main-Class>org.apache.james.jspf.impl.SPFQuery</Main- 
Class>
           </instructions>
         </configuration>
       </plugin>

.....
remove the jar plugin.

>
>
>> Also, I kinda like making up a package version for each package  
>> related to
>> the bundle version.
>
> care to explain a little more...?

I put package versions in above.  Import-Package can also specify  
version ranges: a specific version means the range from that specific  
version to infinity.  This eventually lets users of you bundle say  
that they want sufficiently recent versions.

You might try
             <Export-Package>org.apache.james.jspf.*;version=$ 
{version}</Export-Package>

I'm not sure what happens to the SNAPSHOT here.



----------

A few other suggestions for the build...
the ultimate parent should be the apache pom 6.  That defines an  
apache-release profile that has pretty much all you need for a  
compliant apache release.... except for a few things.  Also it ties  
down a lot of the plugin versions so you don't need to specify them.

Wait until the assembly plugin 2.2-beta-4 is released (hopefully  
tomorrow) and include this in your project root pom and you'll get a  
compilant source distro that you can vote on:

         <profile>
             <id>apache-release</id>
             <activation>
                 <property>
                     <name>apache-release</name>
                 </property>
             </activation>
             <build>
                 <plugins>
                     <!-- waiting for release -->
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-assembly-plugin</artifactId>
                         <executions>
                             <execution>
                                 <goals>
                                     <goal>single</goal>
                                 </goals>
                                 <phase>package</phase>
                                 <configuration>
                                     <runOnlyAtExecutionRoot>true</ 
runOnlyAtExecutionRoot>
                                     <descriptorRefs>
                                         <descriptorRef>
                                             source-release
                                         </descriptorRef>
                                     </descriptorRefs>
                                 </configuration>
                             </execution>
                         </executions>
                         <dependencies>
                             <dependency>
                                 <groupId>org.apache</groupId>
                                 <artifactId>apache-source-release- 
assembly-descriptor</artifactId>
                                 <version>1.0-SNAPSHOT</version>
                             </dependency>
                         </dependencies>
                     </plugin>

                 </plugins>
             </build>
         </profile>


You might have to wait a day or two longer for the apache-source- 
release-assembly-descriptor.

Also I think you want to use the same groupId over the whole jspf  
project including the root pom.

With the apache-release profile above assembly doesn't need to build  
the source distro.

I strongly recommend using dependencySets and fishing the jars out of  
the local repo rather than the target folders in the binary assembly.   
Naming the directory the same as the project is also a standard thing  
to do.

I hope you don't plan to release this to a public repo unless all the  
dependencies are also available in a public repo.  Since I use a repo  
manager, I can't build because

1) dnsjava:dnsjava:jar:2.0.6
2) uk.nominet:dnsjnio:jar:1.0.2
3) org.jvyaml:jvyaml:jar:0.2.1

seem to be missing.  I was all set to provide more of a patch until I  
ran into this problem, but I don't have enough interest in this to  
fight private repos.

thanks
david jencks

>
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org