You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Niklaus Giger <ni...@member.fsf.org> on 2012/10/06 00:12:47 UTC

Generated plugin contains files with wrong path

Hi

I have a fairly large project (150 Eclipse-Plugins) where I have about 3 
errors, which all look similars: instead of having a jar-file and some 
compiled classes the generated package(:plugin) looks like this:

> " zip.vim version v25
> " Browsing zipfile
> /opt/elexis-problem/elexis-base/ch.elexis.mail/target/ch.elexis.mail-2.0.1
> .20121005.jar " Select a file with cursor and press ENTER
> 
> META-INF/
> META-INF/MANIFEST.MF
> META-INF/MANIFEST.MF.orig
> activation.jar/
> activation.jar/ch/
> activation.jar/ch/elexis/
> activation.jar/ch/elexis/mail/
> activation.jar/ch/elexis/mail/Activator.class
> activation.jar/ch/elexis/mail/Mailbox.class
> activation.jar/ch/elexis/mail/Mailer.class
> activation.jar/ch/elexis/mail/Messages.class
> activation.jar/ch/elexis/mail/PreferenceConstants.class
> activation.jar/ch/elexis/mail/Preferences.class
> activation.jar/ch/elexis/mail/QFADialog.class
> activation.jar/ch/elexis/mail/SMTPAuthenticator.class
> activation.jar/ch/elexis/mail/SendQFA.class
> ch/
> ch/elexis/
> ch/elexis/mail/
> ch/elexis/mail/messages.properties
> ch/elexis/mail/messages_en.properties
> ch/elexis/mail/messages_fr.properties
> mail.jar
> medelexis.xml
> plugin.xml

The corresponding fragment looks like this in the buildfile:
  define 'ch.elexis.mail', :base_dir=>'elexis-base/ch.elexis.mail',
	 :version=> '2.0.1' do
    check package(:plugin), 'plugin should include 2 local jars' do
      it.should contain('activation.jar')
      it.should contain('mail.jar')
    end
    package(:plugin).include(_('activation.jar'))
    package(:plugin).include(_('mail.jar'))
    dependencies << projects('ch.rgw.utility', 'ch.elexis')
  end

If I rename my source folder in order to avoid compilation, the jars get 
packed correctly. Any ideas why 4 of about 50 plugin which contain jars don't 
work? How do I debug this? Using --trace I just see 


Packaging elexis-ch.elexis.mail-2.0.1.20121005.jar
<..>
** Invoke /opt/elexis-problem/elexis-
base/ch.elexis.mail/target/ch.elexis.mail-2.0.1.20121005.jar (first_time)
Adding medelexis.xml
Adding activation.jar
Adding mail.jar
Adding META-INF/MANIFEST.MF.orig
Adding META-INF/MANIFEST.MF
Adding META-INF
Adding activation.jar/ch
Adding activation.jar/ch/elexis
Adding activation.jar/ch/elexis/mail
Adding activation.jar/ch/elexis/mail/SMTPAuthenticator.class
Adding activation.jar/ch/elexis/mail/QFADialog.class
<..>

Thanks in advance for any advice.

Best regards

-- 
Niklaus Giger

Re: Generated plugin contains files with wrong path (buildr4osgi)

Posted by Antoine Toulme <an...@lunar-ocean.com>.
The fix looks correct to me. 


On Friday, October 19, 2012 at 9:53 AM, Niklaus Giger wrote:

> Hi Antoine
> 
> I have pushed 
> https://github.com/ngiger/buildr4osgi/commit/16ab63c614ac166c0ed5123bfb871b4ec422fc39 
> as a workaround into my buildr4osgi fork.
> 
> I splitted the work into two parts. First I do the stuff to get the java 
> sources compile with
> > unless compile.target.nil?
> > 
> > plugin.path('.').include compile.target, :as=>'.'
> > plugin.path('.').include properties.target, :as=>'.' unless
> > properties.target.nil?
> > 
> > end
> > 
> 
> then I add all jars or whatever files (except the bin subdirectory) using
> > unless manifest["Bundle-ClassPath"].nil? || compile.target.nil?
> > 
> > plugin.with :manifest=> manifest, :meta_inf=>meta_inf
> > manifest["Bundle-ClassPath"].split(",").each do |entry|
> > 
> > next if entry.eql?('bin') or entry.eql?('bin/') # skip this
> > at this is the default output of an eclipse plugin.include
> > project._(entry), :as=>entry
> > 
> > end
> > plugin.with [resources.target, p_r.target].compact
> > 
> > else
> > 
> > plugin.with [compile.target, resources.target, p_r.target,
> > properties.target].compact
> > 
> > end
> > 
> > plugin.process_qualifier
> > 
> > end
> > 
> 
> But I am not sure whether I understood all the implications of my change. 
> Antoine, do you think this the correct? In any case I will contact you about 
> my proposals to fix the buildr4osgi problems.
> 
> Best regards
> 
> Niklaus
> 
> > Hey guys,
> > 
> > I tried to understand the problem over the week-end. I haven't touched this
> > code in a while.
> > I kept thinking about this, and I can't remember where Bundle-ClassPath
> > entries had more than one entry.
> > So I'm guessing this is an oversight from me.
> > 
> > Niklaus, happy to give you more rights so you can merge in a fix and make
> > it work for you - just cycling over the entries instead of picking the
> > first one should do.
> > 
> > Antoine
> <..> 
> 
> 



Re: Generated plugin contains files with wrong path (buildr4osgi)

Posted by Niklaus Giger <ni...@member.fsf.org>.
Hi Antoine

I have pushed 
https://github.com/ngiger/buildr4osgi/commit/16ab63c614ac166c0ed5123bfb871b4ec422fc39 
as a workaround into my buildr4osgi fork.

I splitted the work into two parts. First I do the stuff to get the java 
sources compile with
>         unless compile.target.nil?
>         
>           plugin.path('.').include compile.target, :as=>'.'
>           plugin.path('.').include properties.target, :as=>'.' unless
>           properties.target.nil?
>         
>         end
then I add all jars or whatever files (except the bin subdirectory) using
>         unless manifest["Bundle-ClassPath"].nil? || compile.target.nil?
>         
>           plugin.with :manifest=> manifest, :meta_inf=>meta_inf
>           manifest["Bundle-ClassPath"].split(",").each do |entry|
>           
>             next if entry.eql?('bin') or  entry.eql?('bin/')  # skip this
>             at this is the default output of an eclipse plugin.include
>             project._(entry), :as=>entry
>           
>           end
>           plugin.with [resources.target, p_r.target].compact
>         
>         else
>         
>           plugin.with [compile.target, resources.target, p_r.target,
>           properties.target].compact
>         
>         end
>         
>         plugin.process_qualifier
>       
>       end
But I am not sure whether I understood all the implications of my change. 
Antoine, do you think this the correct? In any case I will contact you about 
my proposals to fix the buildr4osgi problems.

Best regards

Niklaus

> Hey guys,
> 
> I tried to understand the problem over the week-end. I haven't touched this
> code in a while.
> I kept thinking about this, and I can't remember where Bundle-ClassPath
> entries had more than one entry.
> So I'm guessing this is an oversight from me.
> 
> Niklaus, happy to give you more rights so you can merge in a fix and make
> it work for you - just cycling over the entries instead of picking the
> first one should do.
> 
> Antoine
>
<..> 

Re: Generated plugin contains files with wrong path (buildr4osgi)

Posted by Antoine Toulme <an...@lunar-ocean.com>.
Hey guys,

I tried to understand the problem over the week-end. I haven't touched this
code in a while.
I kept thinking about this, and I can't remember where Bundle-ClassPath
entries had more than one entry.
So I'm guessing this is an oversight from me.

Niklaus, happy to give you more rights so you can merge in a fix and make
it work for you - just cycling over the entries instead of picking the
first one should do.

Antoine

On Mon, Oct 8, 2012 at 9:54 AM, Alex Boisvert <al...@gmail.com>wrote:

> Antoine, if you have a few cycles today... could you provide your take on
> this?
>
> thanks!
> alex
>
>
> On Fri, Oct 5, 2012 at 6:24 PM, Niklaus Giger <
> niklaus.giger@member.fsf.org> wrote:
>
>> **
>>
>> Hi
>>
>>
>>
>> I think I now the region where bug lies. I think buildr4osgi assumes in
>>
>> lib/buildr4osgi/osgi/packaging.rb (around line 280) that the first entry
>> in the Bundle-ClassPath is a '.'. Which is not always the case in my
>> projects.
>>
>>
>>
>> But I don't yet understand why buildr4osgi reads only the first entry and
>> not more.
>>
>>
>>
>> Best regards
>>
>>
>>
>> Niklaus
>>
>>
>>
>>
>>
>> > Hi
>>
>> >
>>
>> > I'm getting closer the following diff makes the error disapper:
>>
>> > > diff --git a/ch.elexis.mail/META-INF/MANIFEST.MF
>>
>> > > b/ch.elexis.mail/META-INF/MANIFEST.MF ---
>>
>> > > a/ch.elexis.mail/META-INF/MANIFEST.MF
>>
>> > > +++ b/ch.elexis.mail/META-INF/MANIFEST.MF
>>
>> > > @@ -14,9 +14,9 @@
>>
>> > >
>>
>> > > org.eclipse.ui.forms,
>>
>> > > ch.rgw.utility,
>>
>> > > ch.elexis;bundle-version="2.1.0"
>>
>> > >
>>
>> > > -Bundle-ClassPath: activation.jar,
>>
>> > > +Bundle-ClassPath: .,
>>
>> > >
>>
>> > > mail.jar,
>>
>> > >
>>
>> > > - .
>>
>> > > + activation.jar
>>
>> > >
>>
>> > > Export-Package: ch.elexis.mail,
>>
>> > >
>>
>> > > com.sun.activation.registries,
>>
>> > > com.sun.activation.viewers,
>>
>> >
>>
>> > But running the trace with and without the patch did not show and
>>
>> > interesting diff.
>>
>> >
>>
>> > Best regards
>>
>> >
>>
>> > Niklaus
>>
>> >
>>
>> > > Hi
>>
>> > >
>>
>> > > Not very successful at creating a really smallish project.
>>
>> > >
>>
>> > > Size is now 4 projects, 5,7 MB java code, 1 extension of mine. Time to
>>
>> > > run less than a minute.
>>
>> > >
>>
>> > > I will try tomorrow or after my vacation to hunt it down even further.
>>
>> > >
>>
>> > > Best regards
>>
>> > >
>>
>> > > > Sorry, no idea why that's happening. If you can set up a smallish
>>
>> > > > project that I could test on, I'm sure I could track this down.
>>
>> > > >
>>
>> > > > alex
>>
>> > > >
>>
>> > > > On Fri, Oct 5, 2012 at 3:12 PM, Niklaus Giger
>>
>> > > >
>>
>> > > > <ni...@member.fsf.org>wrote:
>>
>> > > > > Hi
>>
>> > > > >
>>
>> > > > > I have a fairly large project (150 Eclipse-Plugins) where I have
>>
>> > > > > about 3 errors, which all look similars: instead of having a
>>
>> > > > > jar-file and some
>>
>> > > > >
>>
>> > > > > compiled classes the generated package(:plugin) looks like this:
>>
>> > > > > > " zip.vim version v25
>>
>> > > > > > " Browsing zipfile
>>
>> > > > >
>>
>> > > > >
>> /opt/elexis-problem/elexis-base/ch.elexis.mail/target/ch.elexis.mail-
>>
>> > > > > 2. 0. 1
>>
>> > > > >
>>
>> > > > > > .20121005.jar " Select a file with cursor and press ENTER
>>
>> > > > > >
>>
>> > > > > > META-INF/
>>
>> > > > > > META-INF/MANIFEST.MF
>>
>> > > > > > META-INF/MANIFEST.MF.orig
>>
>> > > > > > activation.jar/
>>
>> > > > > > activation.jar/ch/
>>
>> > > > > > activation.jar/ch/elexis/
>>
>> > > > > > activation.jar/ch/elexis/mail/
>>
>> > > > > > activation.jar/ch/elexis/mail/Activator.class
>>
>> > > > > > activation.jar/ch/elexis/mail/Mailbox.class
>>
>> > > > > > activation.jar/ch/elexis/mail/Mailer.class
>>
>> > > > > > activation.jar/ch/elexis/mail/Messages.class
>>
>> > > > > > activation.jar/ch/elexis/mail/PreferenceConstants.class
>>
>> > > > > > activation.jar/ch/elexis/mail/Preferences.class
>>
>> > > > > > activation.jar/ch/elexis/mail/QFADialog.class
>>
>> > > > > > activation.jar/ch/elexis/mail/SMTPAuthenticator.class
>>
>> > > > > > activation.jar/ch/elexis/mail/SendQFA.class
>>
>> > > > > > ch/
>>
>> > > > > > ch/elexis/
>>
>> > > > > > ch/elexis/mail/
>>
>> > > > > > ch/elexis/mail/messages.properties
>>
>> > > > > > ch/elexis/mail/messages_en.properties
>>
>> > > > > > ch/elexis/mail/messages_fr.properties
>>
>> > > > > > mail.jar
>>
>> > > > > > medelexis.xml
>>
>> > > > > > plugin.xml
>>
>> > > > >
>>
>> > > > > The corresponding fragment looks like this in the buildfile:
>>
>> > > > > define 'ch.elexis.mail', :base_dir=>'elexis-base/ch.elexis.mail',
>>
>> > > > >
>>
>> > > > > :version=> '2.0.1' do
>>
>> > > > >
>>
>> > > > > check package(:plugin), 'plugin should include 2 local jars' do
>>
>> > > > >
>>
>> > > > > it.should contain('activation.jar')
>>
>> > > > > it.should contain('mail.jar')
>>
>> > > > >
>>
>> > > > > end
>>
>> > > > > package(:plugin).include(_('activation.jar'))
>>
>> > > > > package(:plugin).include(_('mail.jar'))
>>
>> > > > > dependencies << projects('ch.rgw.utility', 'ch.elexis')
>>
>> > > > >
>>
>> > > > > end
>>
>> > > > >
>>
>> > > > > If I rename my source folder in order to avoid compilation, the
>> jars
>>
>> > > > > get packed correctly. Any ideas why 4 of about 50 plugin which
>>
>> > > > > contain jars don't
>>
>> > > > > work? How do I debug this? Using --trace I just see
>>
>> > > > >
>>
>> > > > >
>>
>> > > > > Packaging elexis-ch.elexis.mail-2.0.1.20121005.jar
>>
>> > > > > <..>
>>
>> > > > > ** Invoke /opt/elexis-problem/elexis-
>>
>> > > > > base/ch.elexis.mail/target/ch.elexis.mail-2.0.1.20121005.jar
>>
>> > > > > (first_time) Adding medelexis.xml
>>
>> > > > > Adding activation.jar
>>
>> > > > > Adding mail.jar
>>
>> > > > > Adding META-INF/MANIFEST.MF.orig
>>
>> > > > > Adding META-INF/MANIFEST.MF
>>
>> > > > > Adding META-INF
>>
>> > > > > Adding activation.jar/ch
>>
>> > > > > Adding activation.jar/ch/elexis
>>
>> > > > > Adding activation.jar/ch/elexis/mail
>>
>> > > > > Adding activation.jar/ch/elexis/mail/SMTPAuthenticator.class
>>
>> > > > > Adding activation.jar/ch/elexis/mail/QFADialog.class
>>
>> > > > > <..>
>>
>> > > > >
>>
>> > > > > Thanks in advance for any advice.
>>
>> > > > >
>>
>> > > > > Best regards
>>
>> > > > >
>>
>> > > > > --
>>
>> > > > > Niklaus Giger
>>
>> --
>>
>> Niklaus Giger
>>
>> Wieshoschet 6
>>
>> CH-8753 Mollis
>>
>> +41 (0)55 612 20 54 P
>>
>> +41 (0)77 473 02 59 Mobil
>>
>
>

Re: Generated plugin contains files with wrong path (buildr4osgi)

Posted by Alex Boisvert <al...@gmail.com>.
Antoine, if you have a few cycles today... could you provide your take on
this?

thanks!
alex


On Fri, Oct 5, 2012 at 6:24 PM, Niklaus Giger
<ni...@member.fsf.org>wrote:

> **
>
> Hi
>
>
>
> I think I now the region where bug lies. I think buildr4osgi assumes in
>
> lib/buildr4osgi/osgi/packaging.rb (around line 280) that the first entry
> in the Bundle-ClassPath is a '.'. Which is not always the case in my
> projects.
>
>
>
> But I don't yet understand why buildr4osgi reads only the first entry and
> not more.
>
>
>
> Best regards
>
>
>
> Niklaus
>
>
>
>
>
> > Hi
>
> >
>
> > I'm getting closer the following diff makes the error disapper:
>
> > > diff --git a/ch.elexis.mail/META-INF/MANIFEST.MF
>
> > > b/ch.elexis.mail/META-INF/MANIFEST.MF ---
>
> > > a/ch.elexis.mail/META-INF/MANIFEST.MF
>
> > > +++ b/ch.elexis.mail/META-INF/MANIFEST.MF
>
> > > @@ -14,9 +14,9 @@
>
> > >
>
> > > org.eclipse.ui.forms,
>
> > > ch.rgw.utility,
>
> > > ch.elexis;bundle-version="2.1.0"
>
> > >
>
> > > -Bundle-ClassPath: activation.jar,
>
> > > +Bundle-ClassPath: .,
>
> > >
>
> > > mail.jar,
>
> > >
>
> > > - .
>
> > > + activation.jar
>
> > >
>
> > > Export-Package: ch.elexis.mail,
>
> > >
>
> > > com.sun.activation.registries,
>
> > > com.sun.activation.viewers,
>
> >
>
> > But running the trace with and without the patch did not show and
>
> > interesting diff.
>
> >
>
> > Best regards
>
> >
>
> > Niklaus
>
> >
>
> > > Hi
>
> > >
>
> > > Not very successful at creating a really smallish project.
>
> > >
>
> > > Size is now 4 projects, 5,7 MB java code, 1 extension of mine. Time to
>
> > > run less than a minute.
>
> > >
>
> > > I will try tomorrow or after my vacation to hunt it down even further.
>
> > >
>
> > > Best regards
>
> > >
>
> > > > Sorry, no idea why that's happening. If you can set up a smallish
>
> > > > project that I could test on, I'm sure I could track this down.
>
> > > >
>
> > > > alex
>
> > > >
>
> > > > On Fri, Oct 5, 2012 at 3:12 PM, Niklaus Giger
>
> > > >
>
> > > > <ni...@member.fsf.org>wrote:
>
> > > > > Hi
>
> > > > >
>
> > > > > I have a fairly large project (150 Eclipse-Plugins) where I have
>
> > > > > about 3 errors, which all look similars: instead of having a
>
> > > > > jar-file and some
>
> > > > >
>
> > > > > compiled classes the generated package(:plugin) looks like this:
>
> > > > > > " zip.vim version v25
>
> > > > > > " Browsing zipfile
>
> > > > >
>
> > > > >
> /opt/elexis-problem/elexis-base/ch.elexis.mail/target/ch.elexis.mail-
>
> > > > > 2. 0. 1
>
> > > > >
>
> > > > > > .20121005.jar " Select a file with cursor and press ENTER
>
> > > > > >
>
> > > > > > META-INF/
>
> > > > > > META-INF/MANIFEST.MF
>
> > > > > > META-INF/MANIFEST.MF.orig
>
> > > > > > activation.jar/
>
> > > > > > activation.jar/ch/
>
> > > > > > activation.jar/ch/elexis/
>
> > > > > > activation.jar/ch/elexis/mail/
>
> > > > > > activation.jar/ch/elexis/mail/Activator.class
>
> > > > > > activation.jar/ch/elexis/mail/Mailbox.class
>
> > > > > > activation.jar/ch/elexis/mail/Mailer.class
>
> > > > > > activation.jar/ch/elexis/mail/Messages.class
>
> > > > > > activation.jar/ch/elexis/mail/PreferenceConstants.class
>
> > > > > > activation.jar/ch/elexis/mail/Preferences.class
>
> > > > > > activation.jar/ch/elexis/mail/QFADialog.class
>
> > > > > > activation.jar/ch/elexis/mail/SMTPAuthenticator.class
>
> > > > > > activation.jar/ch/elexis/mail/SendQFA.class
>
> > > > > > ch/
>
> > > > > > ch/elexis/
>
> > > > > > ch/elexis/mail/
>
> > > > > > ch/elexis/mail/messages.properties
>
> > > > > > ch/elexis/mail/messages_en.properties
>
> > > > > > ch/elexis/mail/messages_fr.properties
>
> > > > > > mail.jar
>
> > > > > > medelexis.xml
>
> > > > > > plugin.xml
>
> > > > >
>
> > > > > The corresponding fragment looks like this in the buildfile:
>
> > > > > define 'ch.elexis.mail', :base_dir=>'elexis-base/ch.elexis.mail',
>
> > > > >
>
> > > > > :version=> '2.0.1' do
>
> > > > >
>
> > > > > check package(:plugin), 'plugin should include 2 local jars' do
>
> > > > >
>
> > > > > it.should contain('activation.jar')
>
> > > > > it.should contain('mail.jar')
>
> > > > >
>
> > > > > end
>
> > > > > package(:plugin).include(_('activation.jar'))
>
> > > > > package(:plugin).include(_('mail.jar'))
>
> > > > > dependencies << projects('ch.rgw.utility', 'ch.elexis')
>
> > > > >
>
> > > > > end
>
> > > > >
>
> > > > > If I rename my source folder in order to avoid compilation, the
> jars
>
> > > > > get packed correctly. Any ideas why 4 of about 50 plugin which
>
> > > > > contain jars don't
>
> > > > > work? How do I debug this? Using --trace I just see
>
> > > > >
>
> > > > >
>
> > > > > Packaging elexis-ch.elexis.mail-2.0.1.20121005.jar
>
> > > > > <..>
>
> > > > > ** Invoke /opt/elexis-problem/elexis-
>
> > > > > base/ch.elexis.mail/target/ch.elexis.mail-2.0.1.20121005.jar
>
> > > > > (first_time) Adding medelexis.xml
>
> > > > > Adding activation.jar
>
> > > > > Adding mail.jar
>
> > > > > Adding META-INF/MANIFEST.MF.orig
>
> > > > > Adding META-INF/MANIFEST.MF
>
> > > > > Adding META-INF
>
> > > > > Adding activation.jar/ch
>
> > > > > Adding activation.jar/ch/elexis
>
> > > > > Adding activation.jar/ch/elexis/mail
>
> > > > > Adding activation.jar/ch/elexis/mail/SMTPAuthenticator.class
>
> > > > > Adding activation.jar/ch/elexis/mail/QFADialog.class
>
> > > > > <..>
>
> > > > >
>
> > > > > Thanks in advance for any advice.
>
> > > > >
>
> > > > > Best regards
>
> > > > >
>
> > > > > --
>
> > > > > Niklaus Giger
>
> --
>
> Niklaus Giger
>
> Wieshoschet 6
>
> CH-8753 Mollis
>
> +41 (0)55 612 20 54 P
>
> +41 (0)77 473 02 59 Mobil
>

Re: Generated plugin contains files with wrong path (buildr4osgi)

Posted by Niklaus Giger <ni...@member.fsf.org>.
Hi

I think I now the region where bug lies. I think buildr4osgi assumes in 
lib/buildr4osgi/osgi/packaging.rb (around line 280) that the first entry in 
the Bundle-ClassPath is a '.'. Which is not always the case in my projects.

But I don't yet understand why buildr4osgi reads only the first entry and not 
more. 

Best regards

Niklaus


> Hi
> 
> I'm getting closer the following diff makes the error disapper:
> > diff --git a/ch.elexis.mail/META-INF/MANIFEST.MF
> > b/ch.elexis.mail/META-INF/MANIFEST.MF ---
> > a/ch.elexis.mail/META-INF/MANIFEST.MF
> > +++ b/ch.elexis.mail/META-INF/MANIFEST.MF
> > @@ -14,9 +14,9 @@
> > 
> >   org.eclipse.ui.forms,
> >   ch.rgw.utility,
> >   ch.elexis;bundle-version="2.1.0"
> > 
> > -Bundle-ClassPath: activation.jar,
> > +Bundle-ClassPath: .,
> > 
> >   mail.jar,
> > 
> > - .
> > + activation.jar
> > 
> >  Export-Package: ch.elexis.mail,
> >  
> >   com.sun.activation.registries,
> >   com.sun.activation.viewers,
> 
> But running the trace with and without the patch did not show and
> interesting diff.
> 
> Best regards
> 
> Niklaus
> 
> > Hi
> > 
> > Not very successful at creating a really smallish project.
> > 
> > Size is now 4 projects, 5,7 MB java code, 1 extension of mine. Time to
> > run less than a minute.
> > 
> > I will try tomorrow or after my vacation to hunt it down even further.
> > 
> > Best regards
> > 
> > > Sorry, no idea why that's happening.  If you can set up a smallish
> > > project that I could test on, I'm sure I could track this down.
> > > 
> > > alex
> > > 
> > > On Fri, Oct 5, 2012 at 3:12 PM, Niklaus Giger
> > > 
> > > <ni...@member.fsf.org>wrote:
> > > > Hi
> > > > 
> > > > I have a fairly large project (150 Eclipse-Plugins) where I have
> > > > about 3 errors, which all look similars: instead of having a
> > > > jar-file and some
> > > > 
> > > > compiled classes the generated package(:plugin) looks like this:
> > > > > " zip.vim version v25
> > > > > " Browsing zipfile
> > > > 
> > > > /opt/elexis-problem/elexis-base/ch.elexis.mail/target/ch.elexis.mail-
> > > > 2. 0. 1
> > > > 
> > > > > .20121005.jar " Select a file with cursor and press ENTER
> > > > > 
> > > > > META-INF/
> > > > > META-INF/MANIFEST.MF
> > > > > META-INF/MANIFEST.MF.orig
> > > > > activation.jar/
> > > > > activation.jar/ch/
> > > > > activation.jar/ch/elexis/
> > > > > activation.jar/ch/elexis/mail/
> > > > > activation.jar/ch/elexis/mail/Activator.class
> > > > > activation.jar/ch/elexis/mail/Mailbox.class
> > > > > activation.jar/ch/elexis/mail/Mailer.class
> > > > > activation.jar/ch/elexis/mail/Messages.class
> > > > > activation.jar/ch/elexis/mail/PreferenceConstants.class
> > > > > activation.jar/ch/elexis/mail/Preferences.class
> > > > > activation.jar/ch/elexis/mail/QFADialog.class
> > > > > activation.jar/ch/elexis/mail/SMTPAuthenticator.class
> > > > > activation.jar/ch/elexis/mail/SendQFA.class
> > > > > ch/
> > > > > ch/elexis/
> > > > > ch/elexis/mail/
> > > > > ch/elexis/mail/messages.properties
> > > > > ch/elexis/mail/messages_en.properties
> > > > > ch/elexis/mail/messages_fr.properties
> > > > > mail.jar
> > > > > medelexis.xml
> > > > > plugin.xml
> > > > 
> > > > The corresponding fragment looks like this in the buildfile:
> > > >   define 'ch.elexis.mail', :base_dir=>'elexis-base/ch.elexis.mail',
> > > >   
> > > >          :version=> '2.0.1' do
> > > >     
> > > >     check package(:plugin), 'plugin should include 2 local jars' do
> > > >     
> > > >       it.should contain('activation.jar')
> > > >       it.should contain('mail.jar')
> > > >     
> > > >     end
> > > >     package(:plugin).include(_('activation.jar'))
> > > >     package(:plugin).include(_('mail.jar'))
> > > >     dependencies << projects('ch.rgw.utility', 'ch.elexis')
> > > >   
> > > >   end
> > > > 
> > > > If I rename my source folder in order to avoid compilation, the jars
> > > > get packed correctly. Any ideas why 4 of about 50 plugin which
> > > > contain jars don't
> > > > work? How do I debug this? Using --trace I just see
> > > > 
> > > > 
> > > > Packaging elexis-ch.elexis.mail-2.0.1.20121005.jar
> > > > <..>
> > > > ** Invoke /opt/elexis-problem/elexis-
> > > > base/ch.elexis.mail/target/ch.elexis.mail-2.0.1.20121005.jar
> > > > (first_time) Adding medelexis.xml
> > > > Adding activation.jar
> > > > Adding mail.jar
> > > > Adding META-INF/MANIFEST.MF.orig
> > > > Adding META-INF/MANIFEST.MF
> > > > Adding META-INF
> > > > Adding activation.jar/ch
> > > > Adding activation.jar/ch/elexis
> > > > Adding activation.jar/ch/elexis/mail
> > > > Adding activation.jar/ch/elexis/mail/SMTPAuthenticator.class
> > > > Adding activation.jar/ch/elexis/mail/QFADialog.class
> > > > <..>
> > > > 
> > > > Thanks in advance for any advice.
> > > > 
> > > > Best regards
> > > > 
> > > > --
> > > > Niklaus Giger
-- 
Niklaus Giger
Wieshoschet 6
CH-8753 Mollis
+41  (0)55 612 20 54 P
+41  (0)77 473 02 59 Mobil

Re: Generated plugin contains files with wrong path

Posted by Niklaus Giger <ni...@member.fsf.org>.
Hi

I'm getting closer the following diff makes the error disapper:
> diff --git a/ch.elexis.mail/META-INF/MANIFEST.MF
> b/ch.elexis.mail/META-INF/MANIFEST.MF ---
> a/ch.elexis.mail/META-INF/MANIFEST.MF
> +++ b/ch.elexis.mail/META-INF/MANIFEST.MF
> @@ -14,9 +14,9 @@
> 
>   org.eclipse.ui.forms,
>   ch.rgw.utility,
>   ch.elexis;bundle-version="2.1.0"
> 
> -Bundle-ClassPath: activation.jar,
> +Bundle-ClassPath: .,
> 
>   mail.jar,
> 
> - .
> + activation.jar
> 
>  Export-Package: ch.elexis.mail,
>  
>   com.sun.activation.registries,
>   com.sun.activation.viewers,
But running the trace with and without the patch did not show and interesting 
diff.

Best regards

Niklaus


> Hi
> 
> Not very successful at creating a really smallish project.
> 
> Size is now 4 projects, 5,7 MB java code, 1 extension of mine. Time to run
> less than a minute.
> 
> I will try tomorrow or after my vacation to hunt it down even further.
> 
> Best regards
> 
> > Sorry, no idea why that's happening.  If you can set up a smallish
> > project that I could test on, I'm sure I could track this down.
> > 
> > alex
> > 
> > On Fri, Oct 5, 2012 at 3:12 PM, Niklaus Giger
> > 
> > <ni...@member.fsf.org>wrote:
> > > Hi
> > > 
> > > I have a fairly large project (150 Eclipse-Plugins) where I have about
> > > 3 errors, which all look similars: instead of having a jar-file and
> > > some
> > > 
> > > compiled classes the generated package(:plugin) looks like this:
> > > > " zip.vim version v25
> > > > " Browsing zipfile
> > > 
> > > /opt/elexis-problem/elexis-base/ch.elexis.mail/target/ch.elexis.mail-2.
> > > 0. 1
> > > 
> > > > .20121005.jar " Select a file with cursor and press ENTER
> > > > 
> > > > META-INF/
> > > > META-INF/MANIFEST.MF
> > > > META-INF/MANIFEST.MF.orig
> > > > activation.jar/
> > > > activation.jar/ch/
> > > > activation.jar/ch/elexis/
> > > > activation.jar/ch/elexis/mail/
> > > > activation.jar/ch/elexis/mail/Activator.class
> > > > activation.jar/ch/elexis/mail/Mailbox.class
> > > > activation.jar/ch/elexis/mail/Mailer.class
> > > > activation.jar/ch/elexis/mail/Messages.class
> > > > activation.jar/ch/elexis/mail/PreferenceConstants.class
> > > > activation.jar/ch/elexis/mail/Preferences.class
> > > > activation.jar/ch/elexis/mail/QFADialog.class
> > > > activation.jar/ch/elexis/mail/SMTPAuthenticator.class
> > > > activation.jar/ch/elexis/mail/SendQFA.class
> > > > ch/
> > > > ch/elexis/
> > > > ch/elexis/mail/
> > > > ch/elexis/mail/messages.properties
> > > > ch/elexis/mail/messages_en.properties
> > > > ch/elexis/mail/messages_fr.properties
> > > > mail.jar
> > > > medelexis.xml
> > > > plugin.xml
> > > 
> > > The corresponding fragment looks like this in the buildfile:
> > >   define 'ch.elexis.mail', :base_dir=>'elexis-base/ch.elexis.mail',
> > >   
> > >          :version=> '2.0.1' do
> > >     
> > >     check package(:plugin), 'plugin should include 2 local jars' do
> > >     
> > >       it.should contain('activation.jar')
> > >       it.should contain('mail.jar')
> > >     
> > >     end
> > >     package(:plugin).include(_('activation.jar'))
> > >     package(:plugin).include(_('mail.jar'))
> > >     dependencies << projects('ch.rgw.utility', 'ch.elexis')
> > >   
> > >   end
> > > 
> > > If I rename my source folder in order to avoid compilation, the jars
> > > get packed correctly. Any ideas why 4 of about 50 plugin which contain
> > > jars don't
> > > work? How do I debug this? Using --trace I just see
> > > 
> > > 
> > > Packaging elexis-ch.elexis.mail-2.0.1.20121005.jar
> > > <..>
> > > ** Invoke /opt/elexis-problem/elexis-
> > > base/ch.elexis.mail/target/ch.elexis.mail-2.0.1.20121005.jar
> > > (first_time) Adding medelexis.xml
> > > Adding activation.jar
> > > Adding mail.jar
> > > Adding META-INF/MANIFEST.MF.orig
> > > Adding META-INF/MANIFEST.MF
> > > Adding META-INF
> > > Adding activation.jar/ch
> > > Adding activation.jar/ch/elexis
> > > Adding activation.jar/ch/elexis/mail
> > > Adding activation.jar/ch/elexis/mail/SMTPAuthenticator.class
> > > Adding activation.jar/ch/elexis/mail/QFADialog.class
> > > <..>
> > > 
> > > Thanks in advance for any advice.
> > > 
> > > Best regards
> > > 
> > > --
> > > Niklaus Giger
-- 
Niklaus Giger
Wieshoschet 6
CH-8753 Mollis
+41  (0)55 612 20 54 P
+41  (0)77 473 02 59 Mobil

Re: Generated plugin contains files with wrong path

Posted by Niklaus Giger <ni...@member.fsf.org>.
Hi

Not very successful at creating a really smallish project.

Size is now 4 projects, 5,7 MB java code, 1 extension of mine. Time to run 
less than a minute.

I will try tomorrow or after my vacation to hunt it down even further.

Best regards

> Sorry, no idea why that's happening.  If you can set up a smallish project
> that I could test on, I'm sure I could track this down.
> 
> alex
> 
> On Fri, Oct 5, 2012 at 3:12 PM, Niklaus Giger
> 
> <ni...@member.fsf.org>wrote:
> > Hi
> > 
> > I have a fairly large project (150 Eclipse-Plugins) where I have about 3
> > errors, which all look similars: instead of having a jar-file and some
> > 
> > compiled classes the generated package(:plugin) looks like this:
> > > " zip.vim version v25
> > > " Browsing zipfile
> > 
> > /opt/elexis-problem/elexis-base/ch.elexis.mail/target/ch.elexis.mail-2.0.
> > 1
> > 
> > > .20121005.jar " Select a file with cursor and press ENTER
> > > 
> > > META-INF/
> > > META-INF/MANIFEST.MF
> > > META-INF/MANIFEST.MF.orig
> > > activation.jar/
> > > activation.jar/ch/
> > > activation.jar/ch/elexis/
> > > activation.jar/ch/elexis/mail/
> > > activation.jar/ch/elexis/mail/Activator.class
> > > activation.jar/ch/elexis/mail/Mailbox.class
> > > activation.jar/ch/elexis/mail/Mailer.class
> > > activation.jar/ch/elexis/mail/Messages.class
> > > activation.jar/ch/elexis/mail/PreferenceConstants.class
> > > activation.jar/ch/elexis/mail/Preferences.class
> > > activation.jar/ch/elexis/mail/QFADialog.class
> > > activation.jar/ch/elexis/mail/SMTPAuthenticator.class
> > > activation.jar/ch/elexis/mail/SendQFA.class
> > > ch/
> > > ch/elexis/
> > > ch/elexis/mail/
> > > ch/elexis/mail/messages.properties
> > > ch/elexis/mail/messages_en.properties
> > > ch/elexis/mail/messages_fr.properties
> > > mail.jar
> > > medelexis.xml
> > > plugin.xml
> > 
> > The corresponding fragment looks like this in the buildfile:
> >   define 'ch.elexis.mail', :base_dir=>'elexis-base/ch.elexis.mail',
> >   
> >          :version=> '2.0.1' do
> >     
> >     check package(:plugin), 'plugin should include 2 local jars' do
> >     
> >       it.should contain('activation.jar')
> >       it.should contain('mail.jar')
> >     
> >     end
> >     package(:plugin).include(_('activation.jar'))
> >     package(:plugin).include(_('mail.jar'))
> >     dependencies << projects('ch.rgw.utility', 'ch.elexis')
> >   
> >   end
> > 
> > If I rename my source folder in order to avoid compilation, the jars get
> > packed correctly. Any ideas why 4 of about 50 plugin which contain jars
> > don't
> > work? How do I debug this? Using --trace I just see
> > 
> > 
> > Packaging elexis-ch.elexis.mail-2.0.1.20121005.jar
> > <..>
> > ** Invoke /opt/elexis-problem/elexis-
> > base/ch.elexis.mail/target/ch.elexis.mail-2.0.1.20121005.jar (first_time)
> > Adding medelexis.xml
> > Adding activation.jar
> > Adding mail.jar
> > Adding META-INF/MANIFEST.MF.orig
> > Adding META-INF/MANIFEST.MF
> > Adding META-INF
> > Adding activation.jar/ch
> > Adding activation.jar/ch/elexis
> > Adding activation.jar/ch/elexis/mail
> > Adding activation.jar/ch/elexis/mail/SMTPAuthenticator.class
> > Adding activation.jar/ch/elexis/mail/QFADialog.class
> > <..>
> > 
> > Thanks in advance for any advice.
> > 
> > Best regards
> > 
> > --
> > Niklaus Giger
-- 
Niklaus Giger
Wieshoschet 6
CH-8753 Mollis
+41  (0)55 612 20 54 P
+41  (0)77 473 02 59 Mobil

Re: Generated plugin contains files with wrong path

Posted by Alex Boisvert <al...@gmail.com>.
Sorry, no idea why that's happening.  If you can set up a smallish project
that I could test on, I'm sure I could track this down.

alex

On Fri, Oct 5, 2012 at 3:12 PM, Niklaus Giger
<ni...@member.fsf.org>wrote:

> Hi
>
> I have a fairly large project (150 Eclipse-Plugins) where I have about 3
> errors, which all look similars: instead of having a jar-file and some
> compiled classes the generated package(:plugin) looks like this:
>
> > " zip.vim version v25
> > " Browsing zipfile
> >
> /opt/elexis-problem/elexis-base/ch.elexis.mail/target/ch.elexis.mail-2.0.1
> > .20121005.jar " Select a file with cursor and press ENTER
> >
> > META-INF/
> > META-INF/MANIFEST.MF
> > META-INF/MANIFEST.MF.orig
> > activation.jar/
> > activation.jar/ch/
> > activation.jar/ch/elexis/
> > activation.jar/ch/elexis/mail/
> > activation.jar/ch/elexis/mail/Activator.class
> > activation.jar/ch/elexis/mail/Mailbox.class
> > activation.jar/ch/elexis/mail/Mailer.class
> > activation.jar/ch/elexis/mail/Messages.class
> > activation.jar/ch/elexis/mail/PreferenceConstants.class
> > activation.jar/ch/elexis/mail/Preferences.class
> > activation.jar/ch/elexis/mail/QFADialog.class
> > activation.jar/ch/elexis/mail/SMTPAuthenticator.class
> > activation.jar/ch/elexis/mail/SendQFA.class
> > ch/
> > ch/elexis/
> > ch/elexis/mail/
> > ch/elexis/mail/messages.properties
> > ch/elexis/mail/messages_en.properties
> > ch/elexis/mail/messages_fr.properties
> > mail.jar
> > medelexis.xml
> > plugin.xml
>
> The corresponding fragment looks like this in the buildfile:
>   define 'ch.elexis.mail', :base_dir=>'elexis-base/ch.elexis.mail',
>          :version=> '2.0.1' do
>     check package(:plugin), 'plugin should include 2 local jars' do
>       it.should contain('activation.jar')
>       it.should contain('mail.jar')
>     end
>     package(:plugin).include(_('activation.jar'))
>     package(:plugin).include(_('mail.jar'))
>     dependencies << projects('ch.rgw.utility', 'ch.elexis')
>   end
>
> If I rename my source folder in order to avoid compilation, the jars get
> packed correctly. Any ideas why 4 of about 50 plugin which contain jars
> don't
> work? How do I debug this? Using --trace I just see
>
>
> Packaging elexis-ch.elexis.mail-2.0.1.20121005.jar
> <..>
> ** Invoke /opt/elexis-problem/elexis-
> base/ch.elexis.mail/target/ch.elexis.mail-2.0.1.20121005.jar (first_time)
> Adding medelexis.xml
> Adding activation.jar
> Adding mail.jar
> Adding META-INF/MANIFEST.MF.orig
> Adding META-INF/MANIFEST.MF
> Adding META-INF
> Adding activation.jar/ch
> Adding activation.jar/ch/elexis
> Adding activation.jar/ch/elexis/mail
> Adding activation.jar/ch/elexis/mail/SMTPAuthenticator.class
> Adding activation.jar/ch/elexis/mail/QFADialog.class
> <..>
>
> Thanks in advance for any advice.
>
> Best regards
>
> --
> Niklaus Giger
>