RE: adding osgi dependency logic to m2

2005-10-06 Thread Bennett, Timothy (JIS - Applications)
I know that M2 has a transitive dependency walker built into it, but it
sounds like what you are proposing is for M2's dependency walker to be
pluggable; i.e. users can optionally plug in a different dependency
resolution algorithm.  Am I correct?

 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 06, 2005 9:10 AM
 To: Maven Users List
 Subject: Re: adding osgi dependency logic to m2
 
 I've very briefly spoken to a couple of people about the 
 feasibility of this. They might pipe up here. I have no idea 
 of the work that's involved, though in theory it should happen.
 
 I am curious why this is needed though - can you explain further?
 
 - Brett
 
 On 10/6/05, Jorg Heymans [EMAIL PROTECTED] wrote:
  At Cocoon, we need to add osgi compliant dependency logic 
 to m2. In a 
  nutshell and simplified for this case : osgi allows archives to 
  explicitly define which classes they export.
 
  We think there are 2 possible ways of achieving this:
  1) adding a custom dependency type osgi, that respects osgi rules 
  during dependency resolution.
  2) plug in an osgi classloader (eclipse has this component 
 already) into m2.
 
 
  Can anyone comment on the feasibility of these options?
 
  Regards
  Jorg Heymans
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [M2] How to add custom entries in a MANIFEST.MF file?

2005-10-06 Thread Bennett, Timothy (JIS - Applications)
Here's an example of a plugin that uses that patch...

https://svn.apache.org/repos/asf/incubator/felix/trunk/tools/maven2/mave
n-osgi-plugin 

I'll be happy to answer any questions...

 -Original Message-
 From: Torsten Curdt [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 06, 2005 2:53 AM
 To: Maven Users List
 Subject: Re: [M2] How to add custom entries in a MANIFEST.MF file?
 
  But the reply answer only about the specific case of main-class  
  entry.
  I'm aware of the following patch:
 
  http://jira.codehaus.org/browse/MNG-742
 
  But I fail to understand which class I should implement in order to 
  invoke MavenArchiveConfiguration.addManifestEntry(key, 
 value), and how 
  to register my implementation to Maven 2. I'm aware of the 
 archive 
  and jarArchiver parameter in JAR plugin:
 
 Uhh... interesting! How does that work?
 
 I've written a maven plugin that adds
 the current svn revision to the manifest.
 
 It's probably easier to hook in through
 that method. So I would also appreciate
 an example how to use it.
 
 cheers
 --
 Torsten
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [M2] How to add custom entries in a MANIFEST.MF file?

2005-10-06 Thread Bennett, Timothy (JIS - Applications)
MavenArchiveConfiguration was also patched to allow the manifest file to
be set?  Was maven-jar-plugin rev'd to allow a user to specify a
manifest.mf file on the file system to be pulled in and used?

 -Original Message-
 From: Jason van Zyl [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 06, 2005 3:00 PM
 To: Maven Users List
 Subject: Re: [M2] How to add custom entries in a MANIFEST.MF file?
 
 On Thu, 2005-10-06 at 17:49 +1100, Martin Desruisseaux wrote:
  Hello all
  
  How to add custom entries in a JAR file (in addition to the current 
  file created by Maven 2)? To be more specific, I would like to add a
  RegistrationClassName: org.geotools.openoffice.Registration entry 
  for an OpenOffice.org add-in.
 
 I'm just working on the doco so maybe this will help:
 
 http://people.apache.org/~jvanzyl/maven2/guides/mini/guide-man
 ifest.html
 
 Timothy/Martin, if you see anything missing let me know or patch away.
 
 --
 jvz.
 
 Jason van Zyl
 jason at maven.org
 http://maven.apache.org
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[M2] Posted patch to JIRA to enable maven-archiver to accept custom manifest entries

2005-08-15 Thread Bennett, Timothy (JIS - Applications)
M2 contributors...
 
I posted a patch to enable plugins to add custom entries to an archive's
manifest file.  I needed this functionality for the maven-osgi-plugin,
and assume others might need it as well.
 
Please consider adding this to the M2 code.
 
http://jira.codehaus.org/browse/MNG-742
http://jira.codehaus.org/browse/MNG-742 
 
Thanks!
 
-- tbennett


RE: external dependencies for maven2

2005-08-12 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Allan Ramirez [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 11, 2005 7:28 PM
 To: Maven Users List
 Subject: Re: external dependencies for maven2
 
 Hi,
 
 You can use the maven install plugin for this. 
 install:install-file goal will install your file in your 
 local repository.
 

Is there a way for this goal to auto-create the artifact's POM file as
well?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Dependencies as resources

2005-08-12 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Bennett, Timothy (JIS - Applications) 
 Sent: Thursday, August 11, 2005 5:13 PM
 To: Maven Users List
 Subject: [m2] Dependencies as resources
 
 I've got a jar dependency in my project that I also need to 
 bundle up in the jar archive like a resource.  How do I 
 specify this in the M2 POM?
 
 Thanks!
 

Bump...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Dependencies as resources

2005-08-12 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 12, 2005 9:06 AM
 To: Maven Users List
 Subject: Re: [m2] Dependencies as resources
 
 The resources don't currently copy dependencies.
 
 This is something the assembly plugin does however (Creating 
 a tar/zip/jar including certain files, dependencies, etc).
 

Ok... So the steps are jar:jar to jar my target, then assembly:assembly
to add a dependency jar file to that target archive?

My POM is included below.  Basically I just want to bundle the
kxml-1.2.1.jar dependency in the below POM in the root directory of my
target jar.  How do I use the assembly:assembly goal to do this?  I
didn't see anything in project descriptor documentation or at
http://maven.apache.org/maven2/plugins/maven-assembly-plugin/assembly-mo
jo.html that gives me many clues.

Thanks again for your help... 

  build
resources
  resource
 directoryres/directory
 includes
includemetadata.*/include
 /includes
 excludes
excludemanifest.mf/exclude
 /excludes
  /resource
/resources
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-osgi-plugin/artifactId
version1.0-SNAPSHOT/version
configuration
  manifestFileres/manifest.mf/manifestFile
/configuration
  /plugin
/plugins
  /build
  dependencies
dependency
  groupIdkxml/groupId
  artifactIdkxml/artifactId
  version1.2.1/version
/dependency
dependency
  groupIdosgi/groupId
  artifactIdosgi-framework/artifactId
  version1.2/version
/dependency
  /dependencies


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Dependencies as resources

2005-08-12 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 12, 2005 9:50 AM
 To: Maven Users List
 Subject: Re: [m2] Dependencies as resources
 
 On 8/13/05, Bennett, Timothy (JIS - Applications) 
 [EMAIL PROTECTED] wrote:
  Ok... So the steps are jar:jar to jar my target, then 
  assembly:assembly to add a dependency jar file to that 
 target archive?
 
 No, assembly is to distribute a jar differently, it would 
 produce a different artifact.
 
 Is this an OSGi feature? If so, it should be added to your 
 OSGi plugin.


In essence, yeah.  So... (thinking out loud here)... I could code my
osgi plug-in perhaps to recognize a custom dependency scope value (like
the war goal) and embed the dependency in the target jar that way,
perhaps?
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Dependencies as resources

2005-08-12 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 12, 2005 10:15 AM
 To: Maven Users List
 Subject: Re: [m2] Dependencies as resources
 
 There aren't custom scopes (the war plugin doesn't do 
 anything except use the standard ones).
 
 If you only want to include a couple of them, you can specify 
 their id's in your plugin's configuration. Wouldn't you be 
 including everything that gets an appropriate manifest entry? 
 So you should already know what they are.
 

Ah, yes.  Good idea.  The full jar name would be included in the
Bundle-ClassPath manifest entry.  Then, it's just a matter of parsing
the artifactId and version number from the filename(s) specified in the
manifest entry, and then using them in the same way the war goal does
for including dependencies in the war target.  Should be fairly easy.

I imagine there might already be some maven utility class(es) for
parsing the artifactId out of a full jar filename, perhaps?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Dependencies as resources

2005-08-12 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 12, 2005 11:09 AM
 To: Maven Users List
 Subject: Re: [m2] Dependencies as resources
 
 I saw this going the other way - constructing 
 Bundle-ClassPath with the information from the POM that you 
 also include in the JAR.


Absolutely.  That is, when my osgi plugin actually has the code to
create manifest entries from POM configuration tags. :)  It's time I got
busy adding this functionality.

Currently, it only merges an existing manifest file with the maven
generated one -- thus the reason for the parsing of the manifest entry.
 
 If you are going this way, however, iterate 
 ${project.artifacts}, looking for instances of 
 ${artifactId}-${version}.jar being in the file list.


Thanks.  Will post more if I have questions along the way.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[m2] Dependencies as resources

2005-08-11 Thread Bennett, Timothy (JIS - Applications)
I've got a jar dependency in my project that I also need to bundle up in
the jar archive like a resource.  How do I specify this in the M2 POM?

Thanks.

-- tbennett

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [M2] Manifest.mf

2005-07-25 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 22, 2005 7:35 PM
 To: Bennett, Timothy (JIS - Applications)
 Cc: Maven Users List
 Subject: Re: [M2] Manifest.mf
 
 You can send them to http://jira.codehaus.org/browse/MNG. Thanks!
 

Done.  See http://jira.codehaus.org/browse/MNG-642.

 I saw your message on oscar-dev. Are you intending to work on 
 the plugin at Oscar, or would you like somewhere else to house it?
 

Yeah... I think we'll host it at the Apache Oscar project.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [M2] Manifest.mf

2005-07-22 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 21, 2005 5:38 PM
 To: Maven Users List
 Subject: Re: [M2] Manifest.mf
 
 Correct, but we'd be happy to accept your changes to 
 MavenArchiveConfiguration itself for the next release if they 
 are standard fields. Or perhaps it could take some 
 property/value pairs for other entries.
 

Yep... I've already got some changes to MavenArchiveConfiguration and
the maven-archiver POM that I'd like to submit.  There will be more
changes, I believe, as I continue to work on an osgi plugin for M2.

Let me know how to submit the changes...

Timothy
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[m2] Writing plugins for M2

2005-07-21 Thread Bennett, Timothy (JIS - Applications)
All,

Are there any resources that document how to build an M2 plugin from
Java source?  I've got a simple *working* example using the mojo
archetype, but I need some instruction on annotations, API's, best
practices, etc.  Any chance someone has thrown this together somewhere?

Regards,
Timothy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [M2] Manifest.mf

2005-07-21 Thread Bennett, Timothy (JIS - Applications)
 

 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 15, 2005 11:55 PM
 To: Maven Users List
 Subject: Re: [M2] Manifest.mf
 
 I'd be interested to see what you are doing here, and whether 
 an osgi-bundle plugin could be created to assist in this.
 
 Unfortunately the JAR plugin documentation does not yet go 
 deep enough into the manifest element, but it's fields are seen here:
 
 http://maven.apache.org/maven2/plugins/maven-jar-plugin/jar-mojo.html
 
 archive is:
 http://svn.apache.org/repos/asf/maven/components/trunk/maven-a
rchiver/src/main/java/org/apache/maven/archiver/MavenArchiveConfiguratio
n.java
 
 MavenArchiveConfiguration has getManifest() method, but no
setManifest() method???

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Writing plugins for M2

2005-07-21 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 21, 2005 2:55 PM
 To: Maven Users List
 Subject: Re: [m2] Writing plugins for M2
 
 http://maven.apache.org/maven2/developers/mojo-api-specification.html
 
 and sources of actual plugins are simple to read and to understand
 

Thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [M2] Manifest.mf

2005-07-21 Thread Bennett, Timothy (JIS - Applications)
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 21, 2005 4:49 PM
 To: Maven Users List
 Subject: Re: [M2] Manifest.mf
 
 While we may change it, currently Maven uses private field 
 injection of configuration, so it is still set.
 

I suppose I could (for my plugin purposes) extend
MavenArchiveConfiguration and add my own setter to inject a custom
manifest file?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] maven-osgi-plugin

2005-07-19 Thread Bennett, Timothy (JIS/Applications)
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 19, 2005 3:32 PM
 To: Maven Users List
 Subject: Re: [m2] maven-osgi-plugin
 
 There has been talk, buit AFAIK nobody has writen one for any 
 version of Maven. If you know of one, please let us know the URL.
 

http://mavenosgiplugin.berlios.de/

Just found it... Don't know anything about it... (yet)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [M2] Manifest.mf

2005-07-18 Thread Bennett, Timothy (JIS/Applications)
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 15, 2005 11:55 PM
 To: Maven Users List
 Subject: Re: [M2] Manifest.mf
 
 I'd be interested to see what you are doing here, and whether 
 an osgi-bundle plugin could be created to assist in this.


Sure... Here's an example of my Ant JAR target:

target name=jar depends=compile
jar manifest=${src.dir}/tutorial/example2/manifest.mf
jarfile=${bundle.dir}/${bundle.name}.jar
basedir=${output.dir}
include name=**/
/jar
/target

Basically, I've got a manifest.mf file in the source tree of my osgi
bundle, which happens to look something like this:

Bundle-Activator: tutorial.example6.Activator
Import-Package: tutorial.example5.service
Bundle-Name: Spell Check Client
Bundle-Description: A bundle that uses the spell check service
Bundle-Vendor: Some Vendor Name
Bundle-Version: 1.0.0

The Ant task *merges* my custom manifest with some tool generated
manifest entries and produces a manifest file in the jar's /meta-inf
directory that looks like this:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.5.0_03-b07 (Sun Microsystems Inc.)
Bundle-Activator: tutorial.example2.Activator
Export-Package: tutorial.example2.service
Bundle-Name: English Dictionary
Bundle-Description: A bundle that registers an English dictionary
service
Bundle-Vendor: Some Vendor Name
Bundle-Version: 1.0.0
 
 Unfortunately the JAR plugin documentation does not yet go 
 deep enough into the manifest element, but it's fields are seen here:
 
 http://maven.apache.org/maven2/plugins/maven-jar-plugin/jar-mojo.html
 
 archive is:
 http://svn.apache.org/repos/asf/maven/components/trunk/maven-a
rchiver/src/main/java/org/apache/maven/archiver/MavenArchiveConfiguratio
n.java
 
 manifest in there is:
 http://svn.apache.org/repos/asf/maven/components/trunk/maven-a
rchiver/src/main/java/org/apache/maven/archiver/ManifestConfiguration.ja
va
 
 though you can add your own manifestFile instead of a 
 manifest element.
 

I'll check into these resources.  Worst case, I guess I try out
Maven-2's new plug-in development interface.  I suppose it would be nice
to just include a manifest file in the POM's
buildresources/resources/build nodes, so that M2 would
automatically include a custom manifest that I specify in the JAR just
like I can tell maven to include other resources like property and XML
files.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[M2] Manifest.mf

2005-07-15 Thread Bennett, Timothy (JIS/Applications)
All,

Can someone point me in the right direction to find some information
about how to customize the manifest.mf file that m2 creates and includes
in the jar?

I'm trying to use m2 to build my OSGi bundles, and OSGi requires the
bundle meta-data to be added to the jar manifest.  I know how to do this
in Ant, but I'd prefer to use M2.

Regards and thanks,
Timothy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]