Hi Gert,
I tried with your build but I sitll get the error:
Exception in thread "main" java.lang.UnsupportedOperationException: Trying
to get a reader from an unknown format.
    at
org.geotools.coverage.grid.io.UnknownFormat.getReader(UnknownFormat.java:62)
    at org.geotools.tutorial.ImageLab.displayLayers(ImageLab.java:89)
    at org.geotools.tutorial.ImageLab.getLayersAndDisplay(ImageLab.java:73)
    at org.geotools.tutorial.ImageLab.main(ImageLab.java:53)

I'm running it on Ubuntu 14.04
Any ideas?
Anna.

2016-02-04 19:54 GMT+01:00 Anna Amat <anna.amat...@gmail.com>:

>
> Dear Gert,
> Thank you for your advice!
> In my last attempts I have included the Maven shade plugin instead of the
> assembly one. At the end I have managed to make the jar of the Quickstart
> example work but not the one loading the raster. Anyway I'm missing some of
> the configurations that you have writen so I will try it tomorrow and I'll
> let you know.
>
> Thanks!
> Anna.
>
>
> 2016-02-04 18:48 GMT+01:00 Gert van Spijker <gert.van.spij...@moovware.com
> >:
>
>> Just had a quick look at your link.
>> Without going very much into details it looks like you miss a maven
>> plugin element similar to:
>>             <plugin>
>>                 <!-- Build an executable JAR -->
>>                 <groupId>org.apache.maven.plugins</groupId>
>>                 <artifactId>maven-jar-plugin</artifactId>
>>                 <version>2.4</version>
>>                 <configuration>
>>                     <archive>
>>                         <manifest>
>>                             <addClasspath>true</addClasspath>
>>                             <classpathPrefix>lib/</classpathPrefix>
>>                             <mainClass>path.to.your.MainClass</mainClass>
>>                         </manifest>
>>                     </archive>
>>                 </configuration>
>>             </plugin>
>>
>> You should also consider using the Maven shade plugin rather than the
>> assembly plugin. I am using this:
>>             <plugin>
>>                 <groupId>org.apache.maven.plugins</groupId>
>>                 <artifactId>maven-shade-plugin</artifactId>
>>                 <executions>
>>                     <execution>
>>                         <phase>package</phase>
>>                         <goals>
>>                             <goal>shade</goal>
>>                         </goals>
>>                         <configuration>
>>                             <transformers>
>>                                 <transformer
>>
>> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>>
>> <mainClass>path.to.your.MainClass</mainClass>
>>                                 </transformer>
>>                             </transformers>
>>                             <filters>
>>                                 <filter>
>>                                     <artifact>*:*</artifact>
>>                                     <excludes>
>>                                         <exclude>META-INF/*.SF</exclude>
>>                                         <exclude>META-INF/*.DSA</exclude>
>>                                         <exclude>META-INF/*.RSA</exclude>
>>                                     </excludes>
>>                                 </filter>
>>                             </filters>
>>                         </configuration>
>>                     </execution>
>>                 </executions>
>>             </plugin>
>>
>> The assembly plugin is not recommended. If you google for it you will
>> find out why.
>>
>> Gert
>>
>> On 04/02/16 09:10, Anna Amat wrote:
>>
>>
>> Hello,
>>
>> I would like to know if there is any tutorial or if anyone can give me
>> some hints on how to build an executable jar file using Eclipse and Maven
>> with geotools. I've been strugling with the geotools examples (Quickstart
>> and ImageLab) for more than a week and while they work when I run them from
>> Eclipse they do not work when I use the jar with the dependencies. Please
>> see my last thread for an example (
>> http://sourceforge.net/p/geotools/mailman/message/34811758/)
>>
>> I would really much appreciate any help.
>>
>> Thank you,
>> Anna.
>>
>>
>> ------------------------------------------------------------------------------
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup 
>> Now!http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
>>
>>
>>
>> _______________________________________________
>> GeoTools-GT2-Users mailing 
>> listGeoTools-GT2-Users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>>
>>
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to