Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] src.includes ignored by tycho-source-plugin

Hi Jan,

It's exotic, no doubt. But it's supported by PDE Ant driven build,
probably for a reason. I'm continually faced with the task of
repackaging oss jars, distributions which are usually a jar and a
sources zip. Of course, it would be easy to also re-compile them. I
like to keep those released jars intact for no particural reason, well
sometimes they are signed.  Not a big argument, I know.

Thanks for the support!

Regards,
Balazs

On Fri, Feb 17, 2012 at 2:21 PM, Sievers, Jan <jan.sievers@xxxxxxx> wrote:
> for now the directive is hardcoded to ;roots:="."
>
> This works as long as you specify sources as actual source folders using source.* in build.properties.
>
> Adding alternative source roots would be an enhancement IMHO is only needed in the case where you don't compile sources, but only want to include them with a package root not in the source jar root. Usecase seems kind of exotic to me but if you come up with an example that makes sense and can't be built as proposed above we may consider it.
>
> Jan
>
> -----Original Message-----
> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Balazs Varnai
> Sent: Freitag, 17. Februar 2012 14:09
> To: Tycho user list
> Subject: Re: [tycho-user] src.includes ignored by tycho-source-plugin
>
> Hi,
>
> I was satisfied with Jan Rosczak's workaround, but it doesn't work in
> Eclipse IDE. If both bundles and they corresponding source bundles are
> included in a target definition, the IDE can't attach the source code.
> Looked at the Eclipse PDE help
> (http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Ftasks%2Fpde_individual_source.htm),
> and it does apply a strict naming convention.
>
> In example 2
>
> org.eclipse.pde.build/                  org.eclipse.pde.build.source.jar
>  - pdebuild.jar                          - pdebuildsrc/org/**/*.java
>  - lib/pdebuild-ant.jar                  - lib/pdebuild-antsrc/org/**/*.java
>
> So, if I have jar in the root, I will need "jarnamesrc" folder for the
> sources. This is actually easy to do, just putting these folders under
> "src/". However the second step would be to specify these roots in the
> MANIFEST.MF.
>
> Eclipse-SourceBundle:
> org.eclipse.pde.build;version="3.4.0.N20071128-0010";roots:="pdebuildsrc,lib/pdebuild-antsrc"
>
> Is there any chance to configure tycho to add (even statically) the
> roots directive? This should be done by adding
> "src.additionalRoots=pdebuildsrc" to the build.properties.
>
> Thanks!
>
> Regards,
> Balazs
>
> On Fri, Feb 17, 2012 at 1:46 PM, Sievers, Jan <jan.sievers@xxxxxxx> wrote:
>> OK, got it now.
>>
>> OsgiSourceMojo will skip source jar creaton if there are no source.* entries in build.properties.
>> It should also honor src.includes. No source dirs but only src.includes is a corner case but still source jar creation should not be skipped in this case.
>>
>> Created https://bugs.eclipse.org/bugs/show_bug.cgi?id=371877
>>
>> Adding an empty source dir should work around the issue.
>>
>> Jan
>>
>> -----Original Message-----
>> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Balazs Varnai
>> Sent: Freitag, 17. Februar 2012 11:56
>> To: Tycho user list
>> Subject: Re: [tycho-user] src.includes ignored by tycho-source-plugin
>>
>> Hi,
>>
>> Thanks Jan! Your workaround worked fine. I had to add the source in
>> the build.properties, but it won't be compiled into the output jar.
>> Source bundle is created as excepted.
>>
>> source.. = src/
>>
>> Regards,
>> Balazs
>>
>>
>> On Fri, Feb 17, 2012 at 9:36 AM, Rosczak, Jan <Jan.Rosczak@xxxxxxxx> wrote:
>>> Hi,
>>>
>>> I had a similar problem. My approach was to remove the src.includes from the build.properties file and add the following to my pom.xml:
>>>
>>>                        <!-- Prevent compilation of source bundle -->
>>>                        <plugin>
>>>                                <groupId>org.eclipse.tycho</groupId>
>>>                                <artifactId>tycho-compiler-plugin</artifactId>
>>>                                <executions>
>>>                                        <execution>
>>>                                                <id>default-compile</id>
>>>                                                <phase>none</phase>
>>>                                        </execution>
>>>                                </executions>
>>>                        </plugin>
>>>                        <plugin>
>>>                        <groupId>org.eclipse.tycho</groupId>
>>>                        <artifactId>tycho-source-plugin</artifactId>
>>>                        <configuration>
>>>                                <usePdeSourceRoots>false</usePdeSourceRoots>
>>>                        </configuration>
>>>                          <executions>
>>>                                <execution>
>>>                                        <id>plugin-source</id>
>>>                                        <goals>
>>>                                                <goal>plugin-source</goal>
>>>                                        </goals>
>>>                                </execution>
>>>                          </executions>
>>>                        </plugin>
>>>
>>> Maybe it is even enough to stop the tycho compiler from compiling the source files.
>>>
>>> Regards
>>> Jan Rosczak
>>>
>>> -----Original Message-----
>>> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Balazs Varnai
>>> Sent: Friday, February 17, 2012 9:32 AM
>>> To: tycho-user@xxxxxxxxxxx
>>> Subject: [tycho-user] src.includes ignored by tycho-source-plugin
>>>
>>> Hi All,
>>>
>>> I am repackaging external jars as bundles. I also would like to attach
>>> the source code to the bundles. But my approach is a bit different
>>> than normal build, because I don't want to compile the sources. Thus,
>>> I don't want include "source.${jarfile} = src/" in my build.properties
>>> file. This would result the complete build of the jar, eventually the
>>> creation of the source bundle too.
>>>
>>> I tried "src.includes" in PDE (export->generate source bundles).
>>> Worked fine, one bundle with the jar and one with sources of the jar.
>>> But in tycho 0.14.0, the tycho-source-plugin does not generate a
>>> source plugin? Any suggestion?
>>>
>>> Thanks!
>>>
>>> Regards,
>>> Balazs Varnai
>>>
>>> The build.properties content:
>>>
>>>    build.properties
>>>    src.includes = src/
>>>    bin.includes = META-INF/,\
>>>                   plugin.properties,\
>>>                   guava-11.0.1.jar
>>>
>>> The pom content:
>>>
>>> as usual packaging->eclipse-plugin
>>>
>>> build->tycho-source-plugin->goal plugin-source
>>> _______________________________________________
>>> tycho-user mailing list
>>> tycho-user@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/tycho-user
>>> _______________________________________________
>>> tycho-user mailing list
>>> tycho-user@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/tycho-user
>> _______________________________________________
>> tycho-user mailing list
>> tycho-user@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/tycho-user
>> _______________________________________________
>> tycho-user mailing list
>> tycho-user@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/tycho-user
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top