I'd like to display the license information contained in a file that
has been assembled into an executable jar file assembly when the user
passes a command line parameter.

I'm not sure if this is a maven issue, really, but the executable
assembly was created using the maven assembly plugin.

When viewing the jar file contents, the file appears in the top level
of the jar:
...
 -rw-r--r--       137  27-Apr-2007  10:24:08
META-INF/maven/com.mycompany/crawler-common/pom.properties
 -rw-r--r--       967  23-Apr-2007  14:05:36
META-INF/maven/com.mycompany/crawler-common/pom.xml
 -rw-r--r--     14918  27-Apr-2007  10:24:08
com/mycompany/crawler/console/ConsoleApp.class
 -rw-r--r--      2827  27-Apr-2007  10:24:08  LICENSE.apache_1.1.txt
 -rw-r--r--     10317  27-Apr-2007  10:24:08  LICENSE.apache_2.0.txt
 -rw-r--r--     11950  27-Apr-2007  10:24:08  LICENSE.cpl_1.0.txt
 -rw-r--r--      4083  27-Apr-2007  10:24:08  LICENSE.dom-documentation.txt
 -rw-r--r--      3595  27-Apr-2007  10:24:08  LICENSE.dom-software.txt
 -rw-r--r--       804  27-Apr-2007  10:24:08  LICENSE.sax.txt
 -rw-r--r--       731  27-Apr-2007  10:24:08  log4j.properties
 -rw-r--r--       138  27-Apr-2007  10:24:08
META-INF/maven/com.mycompany/mycompany-console/pom.properties

If I want to display the LICENSE.apache_1.1.txt file, how can I access
it programatically?

I tried the simple
       File testFilePresence = new File("LICENSE.apache_1.1.txt");
       if(testFilePresence.exists())
       {
           logger.info("file " + testFilePresence.getName()+" is visible");
       }
       else
       {
           logger.info("file " + testFilePresence.getAbsolutePath()+"
is NOT visible");
           logger.info("file " + testFilePresence.getName()+" is NOT
visible");
       }

and it is not visible.

Thanks in advance.

--
Ed

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

Reply via email to