You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by amit kumar <am...@gmail.com> on 2007/12/27 13:35:16 UTC

Maven Variable to take the system date?

---------- Forwarded message ----------
From: amit kumar <am...@gmail.com>
Date: Dec 27, 2007 6:00 PM
Subject: Maven Variable to take the system date?
To: users-help@maven.apache.org


Hi all,

I am wondering if their is any Maven variable that can be used to obtain
date of the system, I want to use this as the folder name in which my maven
builds will go in to.

 I fancy for something like  <directory>maven.variable.for.date</directory>
in the build tag of pom.xml.

So that every day the builds would go into a new directory. Is there any
workaround if the variable doesn't exist?

Please guide on the same.

Regards,

Amit

Re: Maven Variable to take the system date?

Posted by amit kumar <am...@gmail.com>.
Thanks, its working now.

On Dec 31, 2007 7:36 PM, Jerome Lacoste <je...@gmail.com> wrote:

> On Dec 31, 2007 9:26 AM, amit kumar <am...@gmail.com> wrote:
> > Oh, can I cope up with this?Any workaround?
>
> change your format:
>
>    <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
>
> to something that suits your OS.
>
> Jerome
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven Variable to take the system date?

Posted by Jerome Lacoste <je...@gmail.com>.
On Dec 31, 2007 9:26 AM, amit kumar <am...@gmail.com> wrote:
> Oh, can I cope up with this?Any workaround?

change your format:

    <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>

to something that suits your OS.

Jerome

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


Re: Maven Variable to take the system date?

Posted by amit kumar <am...@gmail.com>.
Oh, can I cope up with this?Any workaround?

On 12/31/07, Dan Tran <da...@gmail.com> wrote:
>
> ':' is not allowed in windows filename.
>
> -D
>
> On Dec 30, 2007 11:22 PM, amit kumar <am...@gmail.com> wrote:
> > Hi,
> > Thanks. I am using Windows XP and this is the build tag for my pom.xml.
> >
> > *<build>*
> > *<finalName>${project.artifactId}-${project.version
> > }-r${buildNumber}</finalName
> >  <pluginManagement>
> >       <plugins>
> >         <plugin>
> >           <groupId>org.apache.maven.plugins</groupId>
> >           <artifactId>maven-jar-plugin</artifactId>
> >           <version>2.1</version>
> >         </plugin>
> >       </plugins>
> >     </pluginManagement>
> > <plugins>
> > <plugin>
> >         <groupId>org.codehaus.mojo</groupId>
> >         <artifactId>buildnumber-maven-plugin</artifactId>
> >         <executions>
> >           <execution>
> >             <phase>validate</phase>
> >             <goals>
> >               <goal>create</goal>
> >             </goals>
> >           </execution>
> >         </executions>
> >         <configuration>
> >           <doCheck>true</doCheck>
> >           <doUpdate>true</doUpdate>
> >      <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
> >           <items>
> >             <item>timestamp</item>
> >           </items>
> >         </configuration>
> >       </plugin>
> > <plugin>
> >         <groupId>org.apache.maven.plugins</groupId>
> >         <artifactId>maven-jar-plugin</artifactId>
> >         <configuration>
> >           <archive>
> >             <manifest>
> >
> > <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
> >             </manifest>
> >             <manifestEntries>
> >
> <Implementation-Build>${buildNumber}</Implementation-Build>
> >             </manifestEntries>
> >           </archive>
> >         </configuration>
> >       </plugin>
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-compiler-plugin</artifactId>
> > <configuration>
> > <source>1.5</source>
> > <target>1.5</target>
> > <optimize>true</optimize>
> > </configuration>
> >  </plugin>
> >     </plugins>
> > </build>*
> >
> >
> > It throws error whenever I am trying to use ${buildNumber}.
> > **
> > *[INFO] [jar:jar]
> > [INFO] Building jar: D:\myProject\target\2007-12-31 12:48:20.jar
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Error assembling JAR*
> >
> > *Embedded error: Problem creating jar: D:\myProject\target\2007-12-31
> 12:48:
> > 20.jar (The parameter is incorrect) (and the archive is probably corrupt
> but
> > I could not delete it)
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Trace
> > org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling
> JAR
> >         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:564)
> >         at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > (DefaultLifecycleExecutor.java:480)
> >         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > DefaultLifecycleExecutor.java:459)
> >         at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > (DefaultLifecycleExecutor.java:311)
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > DefaultLifecycleExecutor.java:278)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > DefaultLifecycleExecutor.java:143)
> >         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
> :334)
> >         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)*
> >
> > If its a problem of OS, what could be the workaround for the same as I
> need
> > to add something unique to my builds, so that we can differentiate
> between
> > the various builds of same artifact.
> >
> >
> > Regards,
> > Amit
> >
> >
> >
> > On 12/31/07, Wayne Fay <wa...@gmail.com> wrote:
> > >
> > > I assume this file name is invalid in your operating system:
> > > D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar
> > >
> > > (Note the space and : characters.)
> > >
> > > Wayne
> > >
> > > On 12/28/07, amit kumar <am...@gmail.com> wrote:
> > > > After using the buildnumber-maven-plugin I am seeing the an error
> while
> > > the
> > > > Maven is assembling the jar.
> > > >
> > > > I had put the error trace below.
> > > >
> > > > _____________________________________________
> > > > \smslib>mvn package -e
> > > > Error stacktraces are turned on.
> > > > NFO] Scanning for projects...
> > > > NFO]
> > > >
> > >
> ----------------------------------------------------------------------------
> > > > NFO] Building Unnamed - SMSLib:SMSLib:jar:0.0.2
> > > > NFO]    task-segment: [package]
> > > > NFO]
> > > >
> > >
> ----------------------------------------------------------------------------
> > > > NFO] [buildnumber:create {execution: default}]
> > > > NFO] Storing buildNumber: 2007-12-28 16:12:45 at timestamp:
> > > 1198838565000
> > > > NFO] [resources:resources]
> > > > NFO] Using default encoding to copy filtered resources.
> > > > wnloading: http://192.168.0.32/javax/comm/comm/2.0/comm-2.0.pom
> > > > wnloading:
> > > http://repo1.maven.org/maven2/javax/comm/comm/2.0/comm-2.0.pom
> > > > wnloading:
> > > > http://192.168.0.32/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
> > > > wnloading:
> > > >
> > >
> http://repo1.maven.org/maven2/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
> > > > wnloading:
> > > >
> > >
> http://192.168.0.32/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
> > > > wnloading:
> > > >
> > >
> http://repo1.maven.org/maven2/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
> > > > NFO] [compiler:compile]
> > > > NFO] Compiling 58 source files to D:\smslib\target\classes
> > > > NFO] [resources:testResources]
> > > > NFO] Using default encoding to copy filtered resources.
> > > > NFO] [compiler:testCompile]
> > > > NFO] No sources to compile
> > > > NFO] [surefire:test]
> > > > NFO] No tests to run.
> > > > NFO] [jar:jar]
> > > > NFO] Building jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:
> > > 45.jar
> > > > NFO]
> > > >
> ------------------------------------------------------------------------
> > > > RROR] BUILD ERROR
> > > > NFO]
> > > >
> ------------------------------------------------------------------------
> > > > NFO] Error assembling JAR
> > > >
> > > > bedded error: Problem creating jar: D:\smslib\target\SMSLib-
> > > > 0.0.2-r2007-12-28
> > > > 6:12:45.jar (The parameter is incorrect) (and the archive is
> probably
> > > > corrupt but I could not delete it)
> > > > NFO]
> > > >
> ------------------------------------------------------------------------
> > > > NFO] Trace
> > > > g.apache.maven.lifecycle.LifecycleExecutionException: Error
> assembling
> > > JAR
> > > >      at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> > > (
> > > > DefaultLifecycleExecutor.java:564)
> > > >      at
> > > >
> > >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > > > (DefaultLifecycleExecutor.java:480)
> > > >      at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > > > DefaultLifecycleExecutor.java:459)
> > > >      at
> > > >
> > >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > > > (DefaultLifecycleExecutor.java:311)
> > > >      at
> > > >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > > > DefaultLifecycleExecutor.java:278)
> > > >      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > > > DefaultLifecycleExecutor.java:143)
> > > >      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
> :334)
> > > >      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> > > >      at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> > > >      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:585)
> > > >      at org.codehaus.classworlds.Launcher.launchEnhanced(
> Launcher.java
> > > :315)
> > > >      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> > > >      at org.codehaus.classworlds.Launcher.mainWithExitCode(
> Launcher.java
> > > > :430)
> > > >      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > > > used by: org.apache.maven.plugin.MojoExecutionException: Error
> > > assembling
> > > > JAR
> > > >      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
> > > > AbstractJarMojo.java:162)
> > > >      at org.apache.maven.plugin.jar.AbstractJarMojo.execute(
> > > > AbstractJarMojo.java:174)
> > > >      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > > > DefaultPluginManager.java:443)
> > > >      at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> > > (
> > > > DefaultLifecycleExecutor.java:539)
> > > >      ... 16 more
> > > > used by: org.codehaus.plexus.archiver.ArchiverException: Problem
> > > creating
> > > > jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar (The
> > > parameter
> > > > is incorrect) (and the archive is probably corrupt but I could not
> > > delete
> > > > t)
> > > >      at
> > > >
> org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
> > > > AbstractZipArchiver.java:424)
> > > >      at
> > > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(
> > > > AbstractZipArchiver.java:250)
> > > >      at org.apache.maven.archiver.MavenArchiver.createArchive(
> > > > MavenArchiver.java:402)
> > > >      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
> > > > AbstractJarMojo.java:155)
> > > >      ... 19 more
> > > > used by: java.io.FileNotFoundException: D:\smslib\target\SMSLib-
> > > > 0.0.2-r2007-1
> > > > 28 16:12:45.jar (The parameter is incorrect)
> > > >      at java.io.FileOutputStream.open(Native Method)
> > > >      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> > > >      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
> > > >      at org.codehaus.plexus.archiver.zip.ZipOutputStream.<init>(
> > > > ZipOutputStream.java:263)
> > > >      at
> > > >
> org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
> > > > AbstractZipArchiver.java:336)
> > > >      ... 22 more
> > > > NFO]
> > > >
> ------------------------------------------------------------------------
> > > > NFO] Total time: 15 seconds
> > > > NFO] Finished at: Fri Dec 28 16:12:55 GMT+05:30 2007
> > > > NFO] Final Memory: 6M/14M
> > > > NFO]
> > > >
> ------------------------------------------------------------------------
> > > >
> > > >
> > > > Thanks and regards,
> > > > Amit
> > > >
> > > >
> > > > On Dec 28, 2007 1:28 PM, amit kumar <am...@gmail.com>
> wrote:
> > > >
> > > > > Hi,
> > > > > Apologize for anything annoying. But the thing is the link you had
> > > given
> > > > > in previous mail contained
> > > > >
> > > > > <plugin>
> > > > >       <groupId>org.codehaus.mojo</groupId>
> > > > >       <artifactId>maven-buildnumber-plugin</artifactId>
> > > > >       <version>0.9.6</version>
> > > > >       <executions>
> > > > >
> > > > > in the usage part, but the actual version is 1.0-beta-1, so only I
> was
> > > > > getting this error.
> > > > > I was able to load the from the repository.
> > > > > Upgraded link I found here
> > > > > http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html
> > > > >
> > > > > Thanks once again.
> > > > >
> > > > >
> > > > > Regards,
> > > > > Amit
> > > > >
> > > > > On Dec 28, 2007 1:01 PM, Insitu <ab...@oqube.com> wrote:
> > > > >
> > > > > > Hello,
> > > > > > The plugin is located, as expected, on the central
> > > > > > repository. (eg.
> > >
> http://repo1.maven.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/
> > > > > > )
> > > > > >
> > > > > > What is your problem ?
> > > > > >
> > > > > > Regards
> > > > > > --
> > > > > > Arnaud Bailly, PhD
> > > > > > OQube - Software Engineering
> > > > > > http://www.oqube.com
> > > > > >
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > 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
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven Variable to take the system date?

Posted by Dan Tran <da...@gmail.com>.
':' is not allowed in windows filename.

-D

On Dec 30, 2007 11:22 PM, amit kumar <am...@gmail.com> wrote:
> Hi,
> Thanks. I am using Windows XP and this is the build tag for my pom.xml.
>
> *<build>*
> *<finalName>${project.artifactId}-${project.version
> }-r${buildNumber}</finalName
>  <pluginManagement>
>       <plugins>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-jar-plugin</artifactId>
>           <version>2.1</version>
>         </plugin>
>       </plugins>
>     </pluginManagement>
> <plugins>
> <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>buildnumber-maven-plugin</artifactId>
>         <executions>
>           <execution>
>             <phase>validate</phase>
>             <goals>
>               <goal>create</goal>
>             </goals>
>           </execution>
>         </executions>
>         <configuration>
>           <doCheck>true</doCheck>
>           <doUpdate>true</doUpdate>
>      <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
>           <items>
>             <item>timestamp</item>
>           </items>
>         </configuration>
>       </plugin>
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-jar-plugin</artifactId>
>         <configuration>
>           <archive>
>             <manifest>
>
> <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
>             </manifest>
>             <manifestEntries>
>               <Implementation-Build>${buildNumber}</Implementation-Build>
>             </manifestEntries>
>           </archive>
>         </configuration>
>       </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> <optimize>true</optimize>
> </configuration>
>  </plugin>
>     </plugins>
> </build>*
>
>
> It throws error whenever I am trying to use ${buildNumber}.
> **
> *[INFO] [jar:jar]
> [INFO] Building jar: D:\myProject\target\2007-12-31 12:48:20.jar
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error assembling JAR*
>
> *Embedded error: Problem creating jar: D:\myProject\target\2007-12-31 12:48:
> 20.jar (The parameter is incorrect) (and the archive is probably corrupt but
> I could not delete it)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling JAR
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:564)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java:480)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java:311)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)*
>
> If its a problem of OS, what could be the workaround for the same as I need
> to add something unique to my builds, so that we can differentiate between
> the various builds of same artifact.
>
>
> Regards,
> Amit
>
>
>
> On 12/31/07, Wayne Fay <wa...@gmail.com> wrote:
> >
> > I assume this file name is invalid in your operating system:
> > D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar
> >
> > (Note the space and : characters.)
> >
> > Wayne
> >
> > On 12/28/07, amit kumar <am...@gmail.com> wrote:
> > > After using the buildnumber-maven-plugin I am seeing the an error while
> > the
> > > Maven is assembling the jar.
> > >
> > > I had put the error trace below.
> > >
> > > _____________________________________________
> > > \smslib>mvn package -e
> > > Error stacktraces are turned on.
> > > NFO] Scanning for projects...
> > > NFO]
> > >
> > ----------------------------------------------------------------------------
> > > NFO] Building Unnamed - SMSLib:SMSLib:jar:0.0.2
> > > NFO]    task-segment: [package]
> > > NFO]
> > >
> > ----------------------------------------------------------------------------
> > > NFO] [buildnumber:create {execution: default}]
> > > NFO] Storing buildNumber: 2007-12-28 16:12:45 at timestamp:
> > 1198838565000
> > > NFO] [resources:resources]
> > > NFO] Using default encoding to copy filtered resources.
> > > wnloading: http://192.168.0.32/javax/comm/comm/2.0/comm-2.0.pom
> > > wnloading:
> > http://repo1.maven.org/maven2/javax/comm/comm/2.0/comm-2.0.pom
> > > wnloading:
> > > http://192.168.0.32/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
> > > wnloading:
> > >
> > http://repo1.maven.org/maven2/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
> > > wnloading:
> > >
> > http://192.168.0.32/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
> > > wnloading:
> > >
> > http://repo1.maven.org/maven2/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
> > > NFO] [compiler:compile]
> > > NFO] Compiling 58 source files to D:\smslib\target\classes
> > > NFO] [resources:testResources]
> > > NFO] Using default encoding to copy filtered resources.
> > > NFO] [compiler:testCompile]
> > > NFO] No sources to compile
> > > NFO] [surefire:test]
> > > NFO] No tests to run.
> > > NFO] [jar:jar]
> > > NFO] Building jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:
> > 45.jar
> > > NFO]
> > > ------------------------------------------------------------------------
> > > RROR] BUILD ERROR
> > > NFO]
> > > ------------------------------------------------------------------------
> > > NFO] Error assembling JAR
> > >
> > > bedded error: Problem creating jar: D:\smslib\target\SMSLib-
> > > 0.0.2-r2007-12-28
> > > 6:12:45.jar (The parameter is incorrect) (and the archive is probably
> > > corrupt but I could not delete it)
> > > NFO]
> > > ------------------------------------------------------------------------
> > > NFO] Trace
> > > g.apache.maven.lifecycle.LifecycleExecutionException: Error assembling
> > JAR
> > >      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> > (
> > > DefaultLifecycleExecutor.java:564)
> > >      at
> > >
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > > (DefaultLifecycleExecutor.java:480)
> > >      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > > DefaultLifecycleExecutor.java:459)
> > >      at
> > >
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > > (DefaultLifecycleExecutor.java:311)
> > >      at
> > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > > DefaultLifecycleExecutor.java:278)
> > >      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > > DefaultLifecycleExecutor.java:143)
> > >      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> > >      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> > >      at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> > >      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:585)
> > >      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> > :315)
> > >      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> > >      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> > > :430)
> > >      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > > used by: org.apache.maven.plugin.MojoExecutionException: Error
> > assembling
> > > JAR
> > >      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
> > > AbstractJarMojo.java:162)
> > >      at org.apache.maven.plugin.jar.AbstractJarMojo.execute(
> > > AbstractJarMojo.java:174)
> > >      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > > DefaultPluginManager.java:443)
> > >      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> > (
> > > DefaultLifecycleExecutor.java:539)
> > >      ... 16 more
> > > used by: org.codehaus.plexus.archiver.ArchiverException: Problem
> > creating
> > > jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar (The
> > parameter
> > > is incorrect) (and the archive is probably corrupt but I could not
> > delete
> > > t)
> > >      at
> > > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
> > > AbstractZipArchiver.java:424)
> > >      at
> > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(
> > > AbstractZipArchiver.java:250)
> > >      at org.apache.maven.archiver.MavenArchiver.createArchive(
> > > MavenArchiver.java:402)
> > >      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
> > > AbstractJarMojo.java:155)
> > >      ... 19 more
> > > used by: java.io.FileNotFoundException: D:\smslib\target\SMSLib-
> > > 0.0.2-r2007-1
> > > 28 16:12:45.jar (The parameter is incorrect)
> > >      at java.io.FileOutputStream.open(Native Method)
> > >      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> > >      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
> > >      at org.codehaus.plexus.archiver.zip.ZipOutputStream.<init>(
> > > ZipOutputStream.java:263)
> > >      at
> > > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
> > > AbstractZipArchiver.java:336)
> > >      ... 22 more
> > > NFO]
> > > ------------------------------------------------------------------------
> > > NFO] Total time: 15 seconds
> > > NFO] Finished at: Fri Dec 28 16:12:55 GMT+05:30 2007
> > > NFO] Final Memory: 6M/14M
> > > NFO]
> > > ------------------------------------------------------------------------
> > >
> > >
> > > Thanks and regards,
> > > Amit
> > >
> > >
> > > On Dec 28, 2007 1:28 PM, amit kumar <am...@gmail.com> wrote:
> > >
> > > > Hi,
> > > > Apologize for anything annoying. But the thing is the link you had
> > given
> > > > in previous mail contained
> > > >
> > > > <plugin>
> > > >       <groupId>org.codehaus.mojo</groupId>
> > > >       <artifactId>maven-buildnumber-plugin</artifactId>
> > > >       <version>0.9.6</version>
> > > >       <executions>
> > > >
> > > > in the usage part, but the actual version is 1.0-beta-1, so only I was
> > > > getting this error.
> > > > I was able to load the from the repository.
> > > > Upgraded link I found here
> > > > http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html
> > > >
> > > > Thanks once again.
> > > >
> > > >
> > > > Regards,
> > > > Amit
> > > >
> > > > On Dec 28, 2007 1:01 PM, Insitu <ab...@oqube.com> wrote:
> > > >
> > > > > Hello,
> > > > > The plugin is located, as expected, on the central
> > > > > repository. (eg.
> > http://repo1.maven.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/
> > > > > )
> > > > >
> > > > > What is your problem ?
> > > > >
> > > > > Regards
> > > > > --
> > > > > Arnaud Bailly, PhD
> > > > > OQube - Software Engineering
> > > > > http://www.oqube.com
> > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > 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
> >
> >
>

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


Re: Maven Variable to take the system date?

Posted by amit kumar <am...@gmail.com>.
Hi,
Thanks. I am using Windows XP and this is the build tag for my pom.xml.

*<build>*
*<finalName>${project.artifactId}-${project.version
}-r${buildNumber}</finalName
 <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
<plugins>
<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doCheck>true</doCheck>
          <doUpdate>true</doUpdate>
     <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
          <items>
            <item>timestamp</item>
          </items>
        </configuration>
      </plugin>
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>

<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
              <Implementation-Build>${buildNumber}</Implementation-Build>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<optimize>true</optimize>
</configuration>
 </plugin>
    </plugins>
</build>*


It throws error whenever I am trying to use ${buildNumber}.
**
*[INFO] [jar:jar]
[INFO] Building jar: D:\myProject\target\2007-12-31 12:48:20.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error assembling JAR*

*Embedded error: Problem creating jar: D:\myProject\target\2007-12-31 12:48:
20.jar (The parameter is incorrect) (and the archive is probably corrupt but
I could not delete it)
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling JAR
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:564)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)*

If its a problem of OS, what could be the workaround for the same as I need
to add something unique to my builds, so that we can differentiate between
the various builds of same artifact.


Regards,
Amit


On 12/31/07, Wayne Fay <wa...@gmail.com> wrote:
>
> I assume this file name is invalid in your operating system:
> D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar
>
> (Note the space and : characters.)
>
> Wayne
>
> On 12/28/07, amit kumar <am...@gmail.com> wrote:
> > After using the buildnumber-maven-plugin I am seeing the an error while
> the
> > Maven is assembling the jar.
> >
> > I had put the error trace below.
> >
> > _____________________________________________
> > \smslib>mvn package -e
> > Error stacktraces are turned on.
> > NFO] Scanning for projects...
> > NFO]
> >
> ----------------------------------------------------------------------------
> > NFO] Building Unnamed - SMSLib:SMSLib:jar:0.0.2
> > NFO]    task-segment: [package]
> > NFO]
> >
> ----------------------------------------------------------------------------
> > NFO] [buildnumber:create {execution: default}]
> > NFO] Storing buildNumber: 2007-12-28 16:12:45 at timestamp:
> 1198838565000
> > NFO] [resources:resources]
> > NFO] Using default encoding to copy filtered resources.
> > wnloading: http://192.168.0.32/javax/comm/comm/2.0/comm-2.0.pom
> > wnloading:
> http://repo1.maven.org/maven2/javax/comm/comm/2.0/comm-2.0.pom
> > wnloading:
> > http://192.168.0.32/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
> > wnloading:
> >
> http://repo1.maven.org/maven2/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
> > wnloading:
> >
> http://192.168.0.32/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
> > wnloading:
> >
> http://repo1.maven.org/maven2/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
> > NFO] [compiler:compile]
> > NFO] Compiling 58 source files to D:\smslib\target\classes
> > NFO] [resources:testResources]
> > NFO] Using default encoding to copy filtered resources.
> > NFO] [compiler:testCompile]
> > NFO] No sources to compile
> > NFO] [surefire:test]
> > NFO] No tests to run.
> > NFO] [jar:jar]
> > NFO] Building jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:
> 45.jar
> > NFO]
> > ------------------------------------------------------------------------
> > RROR] BUILD ERROR
> > NFO]
> > ------------------------------------------------------------------------
> > NFO] Error assembling JAR
> >
> > bedded error: Problem creating jar: D:\smslib\target\SMSLib-
> > 0.0.2-r2007-12-28
> > 6:12:45.jar (The parameter is incorrect) (and the archive is probably
> > corrupt but I could not delete it)
> > NFO]
> > ------------------------------------------------------------------------
> > NFO] Trace
> > g.apache.maven.lifecycle.LifecycleExecutionException: Error assembling
> JAR
> >      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> (
> > DefaultLifecycleExecutor.java:564)
> >      at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > (DefaultLifecycleExecutor.java:480)
> >      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > DefaultLifecycleExecutor.java:459)
> >      at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > (DefaultLifecycleExecutor.java:311)
> >      at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > DefaultLifecycleExecutor.java:278)
> >      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > DefaultLifecycleExecutor.java:143)
> >      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> >      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >      at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> >      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:585)
> >      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
> >      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> > :430)
> >      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > used by: org.apache.maven.plugin.MojoExecutionException: Error
> assembling
> > JAR
> >      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
> > AbstractJarMojo.java:162)
> >      at org.apache.maven.plugin.jar.AbstractJarMojo.execute(
> > AbstractJarMojo.java:174)
> >      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > DefaultPluginManager.java:443)
> >      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> (
> > DefaultLifecycleExecutor.java:539)
> >      ... 16 more
> > used by: org.codehaus.plexus.archiver.ArchiverException: Problem
> creating
> > jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar (The
> parameter
> > is incorrect) (and the archive is probably corrupt but I could not
> delete
> > t)
> >      at
> > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
> > AbstractZipArchiver.java:424)
> >      at
> org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(
> > AbstractZipArchiver.java:250)
> >      at org.apache.maven.archiver.MavenArchiver.createArchive(
> > MavenArchiver.java:402)
> >      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
> > AbstractJarMojo.java:155)
> >      ... 19 more
> > used by: java.io.FileNotFoundException: D:\smslib\target\SMSLib-
> > 0.0.2-r2007-1
> > 28 16:12:45.jar (The parameter is incorrect)
> >      at java.io.FileOutputStream.open(Native Method)
> >      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> >      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
> >      at org.codehaus.plexus.archiver.zip.ZipOutputStream.<init>(
> > ZipOutputStream.java:263)
> >      at
> > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
> > AbstractZipArchiver.java:336)
> >      ... 22 more
> > NFO]
> > ------------------------------------------------------------------------
> > NFO] Total time: 15 seconds
> > NFO] Finished at: Fri Dec 28 16:12:55 GMT+05:30 2007
> > NFO] Final Memory: 6M/14M
> > NFO]
> > ------------------------------------------------------------------------
> >
> >
> > Thanks and regards,
> > Amit
> >
> >
> > On Dec 28, 2007 1:28 PM, amit kumar <am...@gmail.com> wrote:
> >
> > > Hi,
> > > Apologize for anything annoying. But the thing is the link you had
> given
> > > in previous mail contained
> > >
> > > <plugin>
> > >       <groupId>org.codehaus.mojo</groupId>
> > >       <artifactId>maven-buildnumber-plugin</artifactId>
> > >       <version>0.9.6</version>
> > >       <executions>
> > >
> > > in the usage part, but the actual version is 1.0-beta-1, so only I was
> > > getting this error.
> > > I was able to load the from the repository.
> > > Upgraded link I found here
> > > http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html
> > >
> > > Thanks once again.
> > >
> > >
> > > Regards,
> > > Amit
> > >
> > > On Dec 28, 2007 1:01 PM, Insitu <ab...@oqube.com> wrote:
> > >
> > > > Hello,
> > > > The plugin is located, as expected, on the central
> > > > repository. (eg.
> http://repo1.maven.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/
> > > > )
> > > >
> > > > What is your problem ?
> > > >
> > > > Regards
> > > > --
> > > > Arnaud Bailly, PhD
> > > > OQube - Software Engineering
> > > > http://www.oqube.com
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > 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: Maven Variable to take the system date?

Posted by Wayne Fay <wa...@gmail.com>.
I assume this file name is invalid in your operating system:
D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar

(Note the space and : characters.)

Wayne

On 12/28/07, amit kumar <am...@gmail.com> wrote:
> After using the buildnumber-maven-plugin I am seeing the an error while the
> Maven is assembling the jar.
>
> I had put the error trace below.
>
> _____________________________________________
> \smslib>mvn package -e
> Error stacktraces are turned on.
> NFO] Scanning for projects...
> NFO]
> ----------------------------------------------------------------------------
> NFO] Building Unnamed - SMSLib:SMSLib:jar:0.0.2
> NFO]    task-segment: [package]
> NFO]
> ----------------------------------------------------------------------------
> NFO] [buildnumber:create {execution: default}]
> NFO] Storing buildNumber: 2007-12-28 16:12:45 at timestamp: 1198838565000
> NFO] [resources:resources]
> NFO] Using default encoding to copy filtered resources.
> wnloading: http://192.168.0.32/javax/comm/comm/2.0/comm-2.0.pom
> wnloading: http://repo1.maven.org/maven2/javax/comm/comm/2.0/comm-2.0.pom
> wnloading:
> http://192.168.0.32/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
> wnloading:
> http://repo1.maven.org/maven2/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
> wnloading:
> http://192.168.0.32/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
> wnloading:
> http://repo1.maven.org/maven2/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
> NFO] [compiler:compile]
> NFO] Compiling 58 source files to D:\smslib\target\classes
> NFO] [resources:testResources]
> NFO] Using default encoding to copy filtered resources.
> NFO] [compiler:testCompile]
> NFO] No sources to compile
> NFO] [surefire:test]
> NFO] No tests to run.
> NFO] [jar:jar]
> NFO] Building jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar
> NFO]
> ------------------------------------------------------------------------
> RROR] BUILD ERROR
> NFO]
> ------------------------------------------------------------------------
> NFO] Error assembling JAR
>
> bedded error: Problem creating jar: D:\smslib\target\SMSLib-
> 0.0.2-r2007-12-28
> 6:12:45.jar (The parameter is incorrect) (and the archive is probably
> corrupt but I could not delete it)
> NFO]
> ------------------------------------------------------------------------
> NFO] Trace
> g.apache.maven.lifecycle.LifecycleExecutionException: Error assembling JAR
>      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:564)
>      at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java:480)
>      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
>      at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java:311)
>      at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
>      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
>      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>      at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>      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:585)
>      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> :430)
>      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> used by: org.apache.maven.plugin.MojoExecutionException: Error assembling
> JAR
>      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
> AbstractJarMojo.java:162)
>      at org.apache.maven.plugin.jar.AbstractJarMojo.execute(
> AbstractJarMojo.java:174)
>      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
>      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
>      ... 16 more
> used by: org.codehaus.plexus.archiver.ArchiverException: Problem creating
> jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar (The parameter
> is incorrect) (and the archive is probably corrupt but I could not delete
> t)
>      at
> org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
> AbstractZipArchiver.java:424)
>      at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(
> AbstractZipArchiver.java:250)
>      at org.apache.maven.archiver.MavenArchiver.createArchive(
> MavenArchiver.java:402)
>      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
> AbstractJarMojo.java:155)
>      ... 19 more
> used by: java.io.FileNotFoundException: D:\smslib\target\SMSLib-
> 0.0.2-r2007-1
> 28 16:12:45.jar (The parameter is incorrect)
>      at java.io.FileOutputStream.open(Native Method)
>      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
>      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
>      at org.codehaus.plexus.archiver.zip.ZipOutputStream.<init>(
> ZipOutputStream.java:263)
>      at
> org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
> AbstractZipArchiver.java:336)
>      ... 22 more
> NFO]
> ------------------------------------------------------------------------
> NFO] Total time: 15 seconds
> NFO] Finished at: Fri Dec 28 16:12:55 GMT+05:30 2007
> NFO] Final Memory: 6M/14M
> NFO]
> ------------------------------------------------------------------------
>
>
> Thanks and regards,
> Amit
>
>
> On Dec 28, 2007 1:28 PM, amit kumar <am...@gmail.com> wrote:
>
> > Hi,
> > Apologize for anything annoying. But the thing is the link you had given
> > in previous mail contained
> >
> > <plugin>
> >       <groupId>org.codehaus.mojo</groupId>
> >       <artifactId>maven-buildnumber-plugin</artifactId>
> >       <version>0.9.6</version>
> >       <executions>
> >
> > in the usage part, but the actual version is 1.0-beta-1, so only I was
> > getting this error.
> > I was able to load the from the repository.
> > Upgraded link I found here
> > http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html
> >
> > Thanks once again.
> >
> >
> > Regards,
> > Amit
> >
> > On Dec 28, 2007 1:01 PM, Insitu <ab...@oqube.com> wrote:
> >
> > > Hello,
> > > The plugin is located, as expected, on the central
> > > repository. (eg. http://repo1.maven.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/
> > > )
> > >
> > > What is your problem ?
> > >
> > > Regards
> > > --
> > > Arnaud Bailly, PhD
> > > OQube - Software Engineering
> > > http://www.oqube.com
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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: Maven Variable to take the system date?

Posted by amit kumar <am...@gmail.com>.
After using the buildnumber-maven-plugin I am seeing the an error while the
Maven is assembling the jar.

I had put the error trace below.

_____________________________________________
\smslib>mvn package -e
Error stacktraces are turned on.
NFO] Scanning for projects...
NFO]
----------------------------------------------------------------------------
NFO] Building Unnamed - SMSLib:SMSLib:jar:0.0.2
NFO]    task-segment: [package]
NFO]
----------------------------------------------------------------------------
NFO] [buildnumber:create {execution: default}]
NFO] Storing buildNumber: 2007-12-28 16:12:45 at timestamp: 1198838565000
NFO] [resources:resources]
NFO] Using default encoding to copy filtered resources.
wnloading: http://192.168.0.32/javax/comm/comm/2.0/comm-2.0.pom
wnloading: http://repo1.maven.org/maven2/javax/comm/comm/2.0/comm-2.0.pom
wnloading:
http://192.168.0.32/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
wnloading:
http://repo1.maven.org/maven2/org/apache/log4j/log4j/1.2.13/log4j-1.2.13.pom
wnloading:
http://192.168.0.32/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
wnloading:
http://repo1.maven.org/maven2/org/apache/commons/net/commons-net/1.4.1/commons-net-1.4.1.pom
NFO] [compiler:compile]
NFO] Compiling 58 source files to D:\smslib\target\classes
NFO] [resources:testResources]
NFO] Using default encoding to copy filtered resources.
NFO] [compiler:testCompile]
NFO] No sources to compile
NFO] [surefire:test]
NFO] No tests to run.
NFO] [jar:jar]
NFO] Building jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar
NFO]
------------------------------------------------------------------------
RROR] BUILD ERROR
NFO]
------------------------------------------------------------------------
NFO] Error assembling JAR

bedded error: Problem creating jar: D:\smslib\target\SMSLib-
0.0.2-r2007-12-28
6:12:45.jar (The parameter is incorrect) (and the archive is probably
corrupt but I could not delete it)
NFO]
------------------------------------------------------------------------
NFO] Trace
g.apache.maven.lifecycle.LifecycleExecutionException: Error assembling JAR
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:564)
      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:480)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:459)
      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:311)
      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
      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:585)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
used by: org.apache.maven.plugin.MojoExecutionException: Error assembling
JAR
      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
AbstractJarMojo.java:162)
      at org.apache.maven.plugin.jar.AbstractJarMojo.execute(
AbstractJarMojo.java:174)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:443)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:539)
      ... 16 more
used by: org.codehaus.plexus.archiver.ArchiverException: Problem creating
jar: D:\smslib\target\SMSLib-0.0.2-r2007-12-28 16:12:45.jar (The parameter
is incorrect) (and the archive is probably corrupt but I could not delete
t)
      at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
AbstractZipArchiver.java:424)
      at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(
AbstractZipArchiver.java:250)
      at org.apache.maven.archiver.MavenArchiver.createArchive(
MavenArchiver.java:402)
      at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
AbstractJarMojo.java:155)
      ... 19 more
used by: java.io.FileNotFoundException: D:\smslib\target\SMSLib-
0.0.2-r2007-1
28 16:12:45.jar (The parameter is incorrect)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
      at org.codehaus.plexus.archiver.zip.ZipOutputStream.<init>(
ZipOutputStream.java:263)
      at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(
AbstractZipArchiver.java:336)
      ... 22 more
NFO]
------------------------------------------------------------------------
NFO] Total time: 15 seconds
NFO] Finished at: Fri Dec 28 16:12:55 GMT+05:30 2007
NFO] Final Memory: 6M/14M
NFO]
------------------------------------------------------------------------


Thanks and regards,
Amit


On Dec 28, 2007 1:28 PM, amit kumar <am...@gmail.com> wrote:

> Hi,
> Apologize for anything annoying. But the thing is the link you had given
> in previous mail contained
>
> <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>maven-buildnumber-plugin</artifactId>
>       <version>0.9.6</version>
>       <executions>
>
> in the usage part, but the actual version is 1.0-beta-1, so only I was
> getting this error.
> I was able to load the from the repository.
> Upgraded link I found here
> http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html
>
> Thanks once again.
>
>
> Regards,
> Amit
>
> On Dec 28, 2007 1:01 PM, Insitu <ab...@oqube.com> wrote:
>
> > Hello,
> > The plugin is located, as expected, on the central
> > repository. (eg. http://repo1.maven.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/
> > )
> >
> > What is your problem ?
> >
> > Regards
> > --
> > Arnaud Bailly, PhD
> > OQube - Software Engineering
> > http://www.oqube.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: Maven Variable to take the system date?

Posted by amit kumar <am...@gmail.com>.
Hi,
Apologize for anything annoying. But the thing is the link you had given in
previous mail contained

<plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>maven-buildnumber-plugin</artifactId>
      <version>0.9.6</version>
      <executions>

in the usage part, but the actual version is 1.0-beta-1, so only I was
getting this error.
I was able to load the from the repository.
Upgraded link I found here
http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html

Thanks once again.


Regards,
Amit

On Dec 28, 2007 1:01 PM, Insitu <ab...@oqube.com> wrote:

> Hello,
> The plugin is located, as expected, on the central
> repository. (eg.
> http://repo1.maven.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/)
>
> What is your problem ?
>
> Regards
> --
> Arnaud Bailly, PhD
> OQube - Software Engineering
> http://www.oqube.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven Variable to take the system date?

Posted by Insitu <ab...@oqube.com>.
Hello,
The plugin is located, as expected, on the central
repository. (eg. http://repo1.maven.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/)  

What is your problem ?

Regards
-- 
Arnaud Bailly, PhD
OQube - Software Engineering
http://www.oqube.com


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


Re: Maven Variable to take the system date?

Posted by amit kumar <am...@gmail.com>.
Hi I am not able to locate the plug in on Maven2 repository? Is it only a
Maven 1 plugin?

On 12/27/07, Insitu <ab...@oqube.com> wrote:
>
> Hello,
> You can use this plugin without references to any SCM whatsoever:
> http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html
>
> Regards,
> --
> Arnaud Bailly, PhD
> OQube - Software Engineering
> http://www.oqube.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven Variable to take the system date?

Posted by Insitu <ab...@oqube.com>.
Hello,
You can use this plugin without references to any SCM whatsoever: http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html 

Regards,
-- 
Arnaud Bailly, PhD
OQube - Software Engineering
http://www.oqube.com


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


Re: Maven Variable to take the system date?

Posted by amit kumar <am...@gmail.com>.
Hello,
Thanks for the help. Actually my SCM is CVS, and the mojo tells the only
supported SCM is subversion.
More over the reason behind the creating the folder name with date was the
fastest way to recognize the version of builds( for testing team to pickup).

Does there exist any such variable or any workaround?

Regards,
Hemant Malik

PS: The usage on the given link resulted me an error telling the plug in not
available. I searched on mvnrepository and found the below tag that worked

<dependency>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>buildnumber-maven-plugin</artifactId>
    <version>1.0-beta-1</version>
</dependency>

http://www.mvnrepository.com/artifact/org.codehaus.mojo/buildnumber-maven-plugin


On Dec 27, 2007 7:36 PM, Insitu <ab...@oqube.com> wrote:

> Hello,
> You could use
> http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/introduction.html
>
> HTH
> --
> Arnaud Bailly, PhD
> OQube - Software Engineering
> http://www.oqube.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven Variable to take the system date?

Posted by Insitu <ab...@oqube.com>.
Hello,
You could use http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/introduction.html 

HTH
-- 
Arnaud Bailly, PhD
OQube - Software Engineering
http://www.oqube.com


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