You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stadelmann Josef <jo...@axa-winterthur.ch> on 2011/01/13 16:23:29 UTC

why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?

On OpenVMS, with JDK 1.5, and maven 3.0

I can download now perfectly forcing basic authentication toward our
proxy server.

But as downloading artefacts from repositories works now perfect, I want
to do bigger steps.

i.e. building the svnkit 

so here we go


IA64>mvn "-Dhttp.auth.preference=Basic --version"
Apache Maven 3.0 (r1036088; 2010-11-23 18:19:59+0100)
Java version: 1.5.0
Java home: /dkb3/java$150/jre
Default locale: en, platform encoding: ISO8859-1
OS name: "openvms" version: "v8.3-1h1" arch: "ia64" Family: "openvms"
IA64>
IA64> set default dkb3:[sw-projekte.asf.svnkit.tags.1_3_3]
IA64>
IA64>mvn "-Dhttp.auth.preference=Basic clean install"
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building SVNKit 1.3.3
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ svnkit ---
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
svnkit ---
[WARNING] Using platform encoding (ISO8859-1 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/dkb3/sw-projekte/asf/svnkit/tags/1_3_3/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
svnkit ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources
(default-testResources) @ svnkit ---
[WARNING] Using platform encoding (ISO8859-1 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/dkb3/sw-projekte/asf/svnkit/tags/1_3_3/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile)
@ svnkit ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.5:test (default-test) @ svnkit ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ svnkit ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 6.099s
[INFO] Finished at: Thu Jan 13 14:05:34 CET 2011
[INFO] Final Memory: 4M/62M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (default-jar) on
project svnkit: Error assembling JAR: Failed to read filesystem
attributes for: /dkb3/sw-projekte/asf/svnkit/tags/1_3_3/pom.xml: Failed
to retrieve numeric file attributes using: '/bin/sh -c ls -1nlad
/dkb3/sw-projekte/asf/svnkit/tags/1_3_3/pom.xml': Error while executing
process. Child creation error: no such file or directory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
IA64>dir

:-(

How can java catch file system attributes better?

Why do we use a Unix shell command to create a child prozess
(sub-process in openvms) by Java just to catch a file system attribute? 

Creating child processes is an overkill and slows down maven and other
SW when used.

This claim is placed - because not every operating system has by default
- a Unix command shell - to create a child process - to execute a
directory command - just to get a file system attribute!


But it seems that on my OpenVMS with default DCL command language, the
maven version 3 under java and a JVM attempts to place a command which
should create a child process just to execute a ls command used to
retrieve a file attribute. 

I call it a style break, we should not do it from Java and not assume
Unix or the like shells avail, 
or we are at risk that over time fewer system will support what maven
attempts to do.

Josef.Stadelmann
@axa-winterthur.ch





Re: AW: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?

Posted by Kristian Rosenvold <kr...@gmail.com>.
This would seem like its related to the format of the output of

/bin/sh -c ls -1nlad /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml

from OpenVMS.

I fixed a bug in this code some time ago, and in the process I encoded the
format of the screen scraping into a unit test. So at least there is 
test coverage.

You can see the test in
https://github.com/sonatype/plexus-components/commit/13e8d84c0eff1bb26229b1ab904b343d2983a452

Looks like you need to make adjustments to the code/test for OpenVMS.

Kristian



Den 17.01.2011 12:18, skrev Stadelmann Josef:
> Thank you all for helping me. You are right I seem to be the only one using maven on OpenVMS. Still ramping up; I've never built maven on OpenVMS due to some JSVN catch down problem and a HP JAVA JVM crash.
>
> Next development server running OpenVMS will bring me back a 100% patched OS and a stable running JVM; then I can catch down sources using jsvn (svnkit) more easy. Then allows me building maven using thze ant bootstrap and/or bump it all up to most recent maven versions as I did so many times on my VISTA PC. The results seen on OpenVMS are very very promising for ANT, JSVN and MAVEN; integration among platforms is all for me. NetBeans IDE with distributed NetBeans from HP allows me to have local PC based projects as well as remote projects running/debugging on OpenVMS.
>
> Aim : have a fast reliable development environment both VISTA PC with Visual Studio 2010, WCF 3.5, VB.NET, C#.NET AND NetBeans e all based toward my Apache Axis2/J+C Servers on OPenVMS integrating via HP WSIT our very large Spezpla OpenVMS Legacy Server with its Oracle 10g DB.
>
>
> To deliver a bit more insigth to the current problem I am faced with - here the log - part - with the error and the -e and -X switch set.
>
> ....
> ....
> [INFO] No tests to run.
> [INFO]
> [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ sqljet ---
> [DEBUG] org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1:
> [DEBUG]    org.apache.maven:maven-plugin-api:jar:2.0.6:compile
> [DEBUG]    org.apache.maven:maven-project:jar:2.0.6:compile
> [DEBUG]       org.apache.maven:maven-settings:jar:2.0.6:compile
> [DEBUG]       org.apache.maven:maven-profile:jar:2.0.6:compile
> [DEBUG]       org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
> [DEBUG]          org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
> [DEBUG]       org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
> [DEBUG]       org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
> [DEBUG]          junit:junit:jar:3.8.1:compile
> [DEBUG]          classworlds:classworlds:jar:1.1-alpha-2:compile
> [DEBUG]    org.apache.maven:maven-model:jar:2.0.6:runtime
> [DEBUG]    org.apache.maven:maven-artifact:jar:2.0.6:compile
> [DEBUG]    org.apache.maven:maven-archiver:jar:2.4.1:compile
> [DEBUG]       org.codehaus.plexus:plexus-interpolation:jar:1.13:compile
> [DEBUG]    org.codehaus.plexus:plexus-archiver:jar:1.0:compile
> [DEBUG]       org.codehaus.plexus:plexus-io:jar:1.0:compile
> [DEBUG]    commons-lang:commons-lang:jar:2.1:compile
> [DEBUG]    org.codehaus.plexus:plexus-utils:jar:2.0.5:compile
> [DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-jar-plugin:2.3.1
> [DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-jar-plugin:2.3.1
> [DEBUG]   Included: org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1
> [DEBUG]   Included: junit:junit:jar:3.8.1
> [DEBUG]   Included: org.apache.maven:maven-archiver:jar:2.4.1
> [DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.13
> [DEBUG]   Included: org.codehaus.plexus:plexus-archiver:jar:1.0
> [DEBUG]   Included: org.codehaus.plexus:plexus-io:jar:1.0
> [DEBUG]   Included: commons-lang:commons-lang:jar:2.1
> [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
> [DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6
> [DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.6
> [DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.6
> [DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.6
> [DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6
> [DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6
> [DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6
> [DEBUG]   Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
> [DEBUG]   Excluded: classworlds:classworlds:jar:1.1-alpha-2
> [DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.6
> [DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.6
> [DEBUG] Configuring mojo org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar from plugin realm ClassRealm[plugin>org.apache.maven.pl
> ugins:maven-jar-plugin:2.3.1, parent: ClassRealm[maven.api, parent: null]]
> [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar' with basic configurator -->
> [DEBUG]   (f) classesDirectory = /dkb3/sw-projekte/asf/sqljet/trunk/target/classes
> [DEBUG]   (f) defaultManifestFile = /dkb3/sw-projekte/asf/sqljet/trunk/target/classes/META-INF/MANIFEST.MF
> [DEBUG]   (f) finalName = sqljet-1.1.0
> [DEBUG]   (f) forceCreation = false
> [DEBUG]   (f) outputDirectory = /dkb3/sw-projekte/asf/sqljet/trunk/target
> [DEBUG]   (f) project = MavenProject: org.tmatesoft.sqljet:sqljet:1.1.0 @ /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml
> [DEBUG]   (f) useDefaultManifestFile = false
> [DEBUG] -- end configuration --
> [WARNING] JAR will be empty - no content was marked for inclusion!
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 6.604s
> [INFO] Finished at: Mon Jan 17 10:43:59 CET 2011
> [INFO] Final Memory: 5M/111M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (default-jar) on project sqljet: Error assembling
>   JAR: Failed to read filesystem attributes for: /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml: Failed to retrieve numeric file attribut
> es using: '/bin/sh -c ls -1nlad /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml': Error while executing process. Child creation error: no
>   such file or directory ->  [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (
> default-jar) on project sqljet: Error assembling JAR
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203)
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
>          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)
>          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
>          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
>          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
>          at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>          at java.lang.reflect.Method.invoke(Method.java:592)
>          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>          at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling JAR
>          at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:223)
>          at org.apache.maven.plugin.jar.AbstractJarMojo.execute(AbstractJarMojo.java:235)
>          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
>          ... 20 more
> Caused by: org.codehaus.plexus.archiver.ArchiverException: Failed to read filesystem attributes for: /dkb3/sw-projekte/asf/sqljet/tr
> unk/pom.xml
>          at org.codehaus.plexus.archiver.ArchiveEntry.createFileEntry(ArchiveEntry.java:161)
>          at org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:374)
>          at org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:290)
>          at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:487)
>          at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:216)
>          ... 23 more
> Caused by: java.io.IOException: Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlad /dkb3/sw-projekte/asf/sqljet
> /trunk/pom.xml'
>          at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.executeLs(PlexusIoResourceAttributeUtils.java
> :287)
>          at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.getFileAttributesByPath(PlexusIoResourceAttri
> buteUtils.java:223)
>          at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.getFileAttributes(PlexusIoResourceAttributeUt
> ils.java:168)
>          at org.codehaus.plexus.archiver.ArchiveEntry.createFileEntry(ArchiveEntry.java:157)
>          ... 27 more
> Caused by: org.codehaus.plexus.util.cli.CommandLineException: Error while executing process.
>          at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:656)
>          at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:144)
>          at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:107)
>          at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.executeLs(PlexusIoResourceAttributeUtils.java
> :277)
>          ... 30 more
> Caused by: java.io.IOException: Child creation error: no such file or directory
>
>          at java.lang.UNIXProcess.forkAndExec(Native Method)
>          at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
>          at java.lang.ProcessImpl.start(ProcessImpl.java:65)
>          at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
>          at java.lang.Runtime.exec(Runtime.java:591)
>          at java.lang.Runtime.exec(Runtime.java:507)
>          at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:636)
>          ... 33 more
> [ERROR]
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> IA64>
>
>
> I promise the file /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml is there ....
>
> AND - if I would know what File Attributes this plexus code likes to isolate as integer, then I might be more able to provide a solution patch. (not promised yet, but a dependency).
>
> Josef.Stadelmann
> @axa-winterthur.ch
>
>
> -----Ursprüngliche Nachricht-----
> Von: Kristian Rosenvold [mailto:kristian.rosenvold@gmail.com]
> Gesendet: Freitag, 14. Januar 2011 08:40
> An: Maven Users List
> Betreff: Re: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?
>
> I have looked at this code earlier, and it actually forks *2* shells to
> get file attributes when creating any kind of xAR archive.
>
> There is definitely room for improvement here, especially on the "posix"
> implementation. The last time I googled this it
> was not as trivial as one could think.
>
> It's quite far down on the list of my priorities, but if anyone makes a
> patch for this it *will*
> be reviewed ;)
>
> Kristian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


AW: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Thank you all for helping me. You are right I seem to be the only one using maven on OpenVMS. Still ramping up; I've never built maven on OpenVMS due to some JSVN catch down problem and a HP JAVA JVM crash. 

Next development server running OpenVMS will bring me back a 100% patched OS and a stable running JVM; then I can catch down sources using jsvn (svnkit) more easy. Then allows me building maven using thze ant bootstrap and/or bump it all up to most recent maven versions as I did so many times on my VISTA PC. The results seen on OpenVMS are very very promising for ANT, JSVN and MAVEN; integration among platforms is all for me. NetBeans IDE with distributed NetBeans from HP allows me to have local PC based projects as well as remote projects running/debugging on OpenVMS.

Aim : have a fast reliable development environment both VISTA PC with Visual Studio 2010, WCF 3.5, VB.NET, C#.NET AND NetBeans e all based toward my Apache Axis2/J+C Servers on OPenVMS integrating via HP WSIT our very large Spezpla OpenVMS Legacy Server with its Oracle 10g DB.


To deliver a bit more insigth to the current problem I am faced with - here the log - part - with the error and the -e and -X switch set.

....
....
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ sqljet ---
[DEBUG] org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1:
[DEBUG]    org.apache.maven:maven-plugin-api:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-project:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-settings:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-profile:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
[DEBUG]          org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
[DEBUG]       org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG]          junit:junit:jar:3.8.1:compile
[DEBUG]          classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG]    org.apache.maven:maven-model:jar:2.0.6:runtime
[DEBUG]    org.apache.maven:maven-artifact:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-archiver:jar:2.4.1:compile
[DEBUG]       org.codehaus.plexus:plexus-interpolation:jar:1.13:compile
[DEBUG]    org.codehaus.plexus:plexus-archiver:jar:1.0:compile
[DEBUG]       org.codehaus.plexus:plexus-io:jar:1.0:compile
[DEBUG]    commons-lang:commons-lang:jar:2.1:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:2.0.5:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-jar-plugin:2.3.1
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-jar-plugin:2.3.1
[DEBUG]   Included: org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1
[DEBUG]   Included: junit:junit:jar:3.8.1
[DEBUG]   Included: org.apache.maven:maven-archiver:jar:2.4.1
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.13
[DEBUG]   Included: org.codehaus.plexus:plexus-archiver:jar:1.0
[DEBUG]   Included: org.codehaus.plexus:plexus-io:jar:1.0
[DEBUG]   Included: commons-lang:commons-lang:jar:2.1
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6
[DEBUG]   Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
[DEBUG]   Excluded: classworlds:classworlds:jar:1.1-alpha-2
[DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.6
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar from plugin realm ClassRealm[plugin>org.apache.maven.pl
ugins:maven-jar-plugin:2.3.1, parent: ClassRealm[maven.api, parent: null]]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar' with basic configurator -->
[DEBUG]   (f) classesDirectory = /dkb3/sw-projekte/asf/sqljet/trunk/target/classes
[DEBUG]   (f) defaultManifestFile = /dkb3/sw-projekte/asf/sqljet/trunk/target/classes/META-INF/MANIFEST.MF
[DEBUG]   (f) finalName = sqljet-1.1.0
[DEBUG]   (f) forceCreation = false
[DEBUG]   (f) outputDirectory = /dkb3/sw-projekte/asf/sqljet/trunk/target
[DEBUG]   (f) project = MavenProject: org.tmatesoft.sqljet:sqljet:1.1.0 @ /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml
[DEBUG]   (f) useDefaultManifestFile = false
[DEBUG] -- end configuration --
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.604s
[INFO] Finished at: Mon Jan 17 10:43:59 CET 2011
[INFO] Final Memory: 5M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (default-jar) on project sqljet: Error assembling
 JAR: Failed to read filesystem attributes for: /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml: Failed to retrieve numeric file attribut
es using: '/bin/sh -c ls -1nlad /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml': Error while executing process. Child creation error: no
 such file or directory -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (
default-jar) on project sqljet: Error assembling JAR
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling JAR
        at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:223)
        at org.apache.maven.plugin.jar.AbstractJarMojo.execute(AbstractJarMojo.java:235)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
        ... 20 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: Failed to read filesystem attributes for: /dkb3/sw-projekte/asf/sqljet/tr
unk/pom.xml
        at org.codehaus.plexus.archiver.ArchiveEntry.createFileEntry(ArchiveEntry.java:161)
        at org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:374)
        at org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:290)
        at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:487)
        at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:216)
        ... 23 more
Caused by: java.io.IOException: Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlad /dkb3/sw-projekte/asf/sqljet
/trunk/pom.xml'
        at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.executeLs(PlexusIoResourceAttributeUtils.java
:287)
        at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.getFileAttributesByPath(PlexusIoResourceAttri
buteUtils.java:223)
        at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.getFileAttributes(PlexusIoResourceAttributeUt
ils.java:168)
        at org.codehaus.plexus.archiver.ArchiveEntry.createFileEntry(ArchiveEntry.java:157)
        ... 27 more
Caused by: org.codehaus.plexus.util.cli.CommandLineException: Error while executing process.
        at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:656)
        at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:144)
        at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:107)
        at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.executeLs(PlexusIoResourceAttributeUtils.java
:277)
        ... 30 more
Caused by: java.io.IOException: Child creation error: no such file or directory

        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
        at java.lang.ProcessImpl.start(ProcessImpl.java:65)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
        at java.lang.Runtime.exec(Runtime.java:591)
        at java.lang.Runtime.exec(Runtime.java:507)
        at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:636)
        ... 33 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
IA64>


I promise the file /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml is there ....

AND - if I would know what File Attributes this plexus code likes to isolate as integer, then I might be more able to provide a solution patch. (not promised yet, but a dependency).

Josef.Stadelmann
@axa-winterthur.ch


-----Ursprüngliche Nachricht-----
Von: Kristian Rosenvold [mailto:kristian.rosenvold@gmail.com] 
Gesendet: Freitag, 14. Januar 2011 08:40
An: Maven Users List
Betreff: Re: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?

I have looked at this code earlier, and it actually forks *2* shells to 
get file attributes when creating any kind of xAR archive.

There is definitely room for improvement here, especially on the "posix" 
implementation. The last time I googled this it
was not as trivial as one could think.

It's quite far down on the list of my priorities, but if anyone makes a 
patch for this it *will*
be reviewed ;)

Kristian


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?

Posted by Kristian Rosenvold <kr...@gmail.com>.
I have looked at this code earlier, and it actually forks *2* shells to 
get file attributes when creating any kind of xAR archive.

There is definitely room for improvement here, especially on the "posix" 
implementation. The last time I googled this it
was not as trivial as one could think.

It's quite far down on the list of my priorities, but if anyone makes a 
patch for this it *will*
be reviewed ;)

Kristian


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?

Posted by Wayne Fay <wa...@gmail.com>.
Thanks Laird! I actually looked (very briefly) for this code but I was
looking in plexus-utils, not plexus-components, doh.

Surely there is a better way to implement this. I need to trace this
code around and figure out why its doing this and see if maybe we can
use another approach to get the same results, without invoking a child
shell to exec ls etc.

Wayne

On Thu, Jan 13, 2011 at 1:00 PM, Laird Nelson <lj...@gmail.com> wrote:
> Hi, Wayne; this has nothing to do with the JDK and everything to do with
> Plexus.
>
> http://plexus.codehaus.org/plexus-components/plexus-io/xref/org/codehaus/plexus/components/io/attributes/PlexusIoResourceAttributeUtils.html#255
>
> Best,
> Laird
>
> On Thu, Jan 13, 2011 at 1:51 PM, Wayne Fay <wa...@gmail.com> wrote:
>
>> > [ERROR] Failed to execute goal
>> > org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (default-jar) on
>> > project svnkit: Error assembling JAR: Failed to read filesystem
>> > attributes for: /dkb3/sw-projekte/asf/svnkit/tags/1_3_3/pom.xml: Failed
>> > to retrieve numeric file attributes using: '/bin/sh -c ls -1nlad
>> > /dkb3/sw-projekte/asf/svnkit/tags/1_3_3/pom.xml': Error while executing
>> > process. Child creation error: no such file or directory -> [Help 1]
>> > [ERROR]
>> > [ERROR] To see the full stack trace of the errors, re-run Maven with the
>> > -e switch.
>> > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> > [ERROR]
>>
>> Well, what does it look like when you run with -e or -X? Don't send
>> the full output back to the list -- post it at pastebin.org and send
>> us a link, unless you can chop it down to the bare minimum of info
>> yourself.
>>
>> > How can java catch file system attributes better?
>> >
>> > Why do we use a Unix shell command to create a child prozess
>> > (sub-process in openvms) by Java just to catch a file system attribute?
>>
>> You'd have to ask the JDK folks these questions. What JDK are you
>> using, and from what vendor?
>>
>> > But it seems that on my OpenVMS with default DCL command language, the
>> > maven version 3 under java and a JVM attempts to place a command which
>> > should create a child process just to execute a ls command used to
>> > retrieve a file attribute.
>>
>> Most likely the Java code written by the Maven team (or Java code
>> being used in Maven that is actually from plexus-utils or another
>> library) is simply leveraging standard Java file io routines which
>> happen to use the child process to execute ls etc. If there was a
>> better way to get this information, I'd expect it would have been
>> implemented, or perhaps OpenVMS is just not very well supported by the
>> Java platform? Maybe you could dig deep into the code (debug Maven,
>> plexus, and the jdk itself in Netbeans or something), find where this
>> child process thing is coming from, and offer up a patch to the
>> appropriate party?
>>
>> > I call it a style break, we should not do it from Java and not assume
>> > Unix or the like shells avail,
>> > or we are at risk that over time fewer system will support what maven
>> > attempts to do.
>>
>> This has very little to do with Maven, and is primarily the "fault" of
>> the JDK on OpenVMS. I would assume that a better approach to finding
>> the file attributes is available, but no one cares enough about
>> OpenVMS to implement it or pay for it? You are literally the only
>> person I've seen post questions on this list about OpenVMS (Nabble
>> archives reveal 1 other person has posted about it minimally) so it
>> seems to be a pretty low-use OS, at least as far as Maven is
>> concerned.
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?

Posted by Laird Nelson <lj...@gmail.com>.
Hi, Wayne; this has nothing to do with the JDK and everything to do with
Plexus.

http://plexus.codehaus.org/plexus-components/plexus-io/xref/org/codehaus/plexus/components/io/attributes/PlexusIoResourceAttributeUtils.html#255

Best,
Laird

On Thu, Jan 13, 2011 at 1:51 PM, Wayne Fay <wa...@gmail.com> wrote:

> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (default-jar) on
> > project svnkit: Error assembling JAR: Failed to read filesystem
> > attributes for: /dkb3/sw-projekte/asf/svnkit/tags/1_3_3/pom.xml: Failed
> > to retrieve numeric file attributes using: '/bin/sh -c ls -1nlad
> > /dkb3/sw-projekte/asf/svnkit/tags/1_3_3/pom.xml': Error while executing
> > process. Child creation error: no such file or directory -> [Help 1]
> > [ERROR]
> > [ERROR] To see the full stack trace of the errors, re-run Maven with the
> > -e switch.
> > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> > [ERROR]
>
> Well, what does it look like when you run with -e or -X? Don't send
> the full output back to the list -- post it at pastebin.org and send
> us a link, unless you can chop it down to the bare minimum of info
> yourself.
>
> > How can java catch file system attributes better?
> >
> > Why do we use a Unix shell command to create a child prozess
> > (sub-process in openvms) by Java just to catch a file system attribute?
>
> You'd have to ask the JDK folks these questions. What JDK are you
> using, and from what vendor?
>
> > But it seems that on my OpenVMS with default DCL command language, the
> > maven version 3 under java and a JVM attempts to place a command which
> > should create a child process just to execute a ls command used to
> > retrieve a file attribute.
>
> Most likely the Java code written by the Maven team (or Java code
> being used in Maven that is actually from plexus-utils or another
> library) is simply leveraging standard Java file io routines which
> happen to use the child process to execute ls etc. If there was a
> better way to get this information, I'd expect it would have been
> implemented, or perhaps OpenVMS is just not very well supported by the
> Java platform? Maybe you could dig deep into the code (debug Maven,
> plexus, and the jdk itself in Netbeans or something), find where this
> child process thing is coming from, and offer up a patch to the
> appropriate party?
>
> > I call it a style break, we should not do it from Java and not assume
> > Unix or the like shells avail,
> > or we are at risk that over time fewer system will support what maven
> > attempts to do.
>
> This has very little to do with Maven, and is primarily the "fault" of
> the JDK on OpenVMS. I would assume that a better approach to finding
> the file attributes is available, but no one cares enough about
> OpenVMS to implement it or pay for it? You are literally the only
> person I've seen post questions on this list about OpenVMS (Nabble
> archives reveal 1 other person has posted about it minimally) so it
> seems to be a pretty low-use OS, at least as far as Maven is
> concerned.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?

Posted by Wayne Fay <wa...@gmail.com>.
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (default-jar) on
> project svnkit: Error assembling JAR: Failed to read filesystem
> attributes for: /dkb3/sw-projekte/asf/svnkit/tags/1_3_3/pom.xml: Failed
> to retrieve numeric file attributes using: '/bin/sh -c ls -1nlad
> /dkb3/sw-projekte/asf/svnkit/tags/1_3_3/pom.xml': Error while executing
> process. Child creation error: no such file or directory -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]

Well, what does it look like when you run with -e or -X? Don't send
the full output back to the list -- post it at pastebin.org and send
us a link, unless you can chop it down to the bare minimum of info
yourself.

> How can java catch file system attributes better?
>
> Why do we use a Unix shell command to create a child prozess
> (sub-process in openvms) by Java just to catch a file system attribute?

You'd have to ask the JDK folks these questions. What JDK are you
using, and from what vendor?

> But it seems that on my OpenVMS with default DCL command language, the
> maven version 3 under java and a JVM attempts to place a command which
> should create a child process just to execute a ls command used to
> retrieve a file attribute.

Most likely the Java code written by the Maven team (or Java code
being used in Maven that is actually from plexus-utils or another
library) is simply leveraging standard Java file io routines which
happen to use the child process to execute ls etc. If there was a
better way to get this information, I'd expect it would have been
implemented, or perhaps OpenVMS is just not very well supported by the
Java platform? Maybe you could dig deep into the code (debug Maven,
plexus, and the jdk itself in Netbeans or something), find where this
child process thing is coming from, and offer up a patch to the
appropriate party?

> I call it a style break, we should not do it from Java and not assume
> Unix or the like shells avail,
> or we are at risk that over time fewer system will support what maven
> attempts to do.

This has very little to do with Maven, and is primarily the "fault" of
the JDK on OpenVMS. I would assume that a better approach to finding
the file attributes is available, but no one cares enough about
OpenVMS to implement it or pay for it? You are literally the only
person I've seen post questions on this list about OpenVMS (Nabble
archives reveal 1 other person has posted about it minimally) so it
seems to be a pretty low-use OS, at least as far as Maven is
concerned.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org