Re: Print on the same line.

2008-12-11 Thread Matthias Grunwalde
Would System.out.flush() help? Alternatively, System.err.println - the error
stream isn't buffered; the output stream is buffered, hence needing to write
a newline.

On Thu, Dec 11, 2008 at 1:12 PM, Stelios Philippou [EMAIL PROTECTED]wrote:

 I running a long application on an X session that i do not view it as it
 runs headless.

 I just see the command line that i am using in order to help me debug.

 Since there are a lot of steps in the  program that i am performing i want
 it to show some sort of progress bar.

 I have managed to make this work if i run the program with out maven.
 When i try to do it with mvn the out.print command will not show me
 anything
 until i actually print a new line.

 This is killing me as my screen will end up filling with a lot of junk as i
 want to keep a progress bar that the system is actually running and not
 have
 crushed.

 I just want to know how i will be able to do the normal
 out.print and display it with out having to use println.

 I hope it is clear what i am asking.


 --sTelios




-- 
Matthias Grünwalde


surefire - compatibility with ant/junit-batchtest XML - system-out and system-err

2008-12-10 Thread Matthias Grunwalde
Hi,
Is surefire 2.4.3's XML output intended to be consumable by Ant 1.7.1's
junitreport task?
It seems to be mostly compatible, however, there seems to be a discrepancy -
could surefire experts comment on this?

Should the system-out.../system-out and system-err.../system-err
elements be part of the testsuite, or attached to the testcase in which
they were generated?

The reason I ask is that our build-everything-from-scratch Ant script is not
producing links to the System output/error in the HTML Test Results for
artifacts built by Maven, but it is producing these links for those built by
Ant (we're currently migrating individual Ant-based projects to Maven, but
the overall build is controlled by Ant).

For example, please consider the following Ant output and Surefire output..
the test code:

import org.junit.Assert;
import org.junit.Test;
public class DieTest
{
   @Test
   public void alwaysFail()
   {
  System.out.println(here is some standard output);
  System.err.println(and here is some standard error text);
  Assert.fail(This test will always fail); // line 21
   }
}

The Surefire 2.4.3 output:
?xml version=1.0 encoding=UTF-8 ?
testsuite errors=0 skipped=0 tests=1 time=0.031 failures=1
name=DieTest
  properties
 ... yadda yadda yadda
  /properties
  testcase classname=DieTest time=0 name=alwaysFail
failure type=java.lang.AssertionError message=This test will always
failjava.lang.AssertionError: This test will always fail
at org.junit.Assert.fail(Assert.java:69)
at DieTest.alwaysFail(DieTest.java:21)
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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:75)
at
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:36)
at
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
/failure
system-outhere is some standard output
/system-out
system-errand here is some standard error text
/system-err
  /testcase
/testsuite

versus Ant 1.7.1's batchtest (formatter=xml):

?xml version=1.0 encoding=UTF-8 ?
testsuite errors=0 failures=1 hostname=TOAST name=DieTest tests=1
time=0.078 timestamp=2008-12-10T15:55:58
  properties
 ... yadda yadda yadda
  /properties
testcase classname=DieTest name=alwaysFail time=0.015
failure message=This test will always fail
type=junit.framework.AssertionFailedErrorjunit.framework.AssertionFailedError:
This test will always fail
at DieTest.alwaysFail(Unknown Source)
/failure
  /testcase
  system-out![CDATA[here is some standard output
]]/system-out
  system-err![CDATA[and here is some standard error text
]]/system-err
/testsuite


Thanks in advance.
-- 
Matthias Grünwalde


Supressing the download progress animation when downloading dependencies

2008-09-24 Thread Matthias Grunwalde
Hi,
When performing a clean build, maven will download all necessary
dependencies to the local repository. While it's doing this, it shows an
animation giving the amount it has downloaded, with the final file size.
This changes - is overwritten on the same line - during the download.

This is creating rather long lines of progress information in our build
server logs - can it be suppressed?

Thanks in advance,
Matthias

-- 
Matthias Grünwalde


Re: problem using the buildnumber plugin with maven

2008-09-05 Thread Matthias Grunwalde

Wayne, you state that the groupId, artifactId and version are always used
when publishing to a repo, so I tried specifying ${buildNumber} as the
version, as in
 version${buildNumber}/version

However, this didn't get interpolated correctly, leading to an artifact in
my repo called ArtifactId-${buildNumber}.

If I do the same using a normal property, as in:
version${my.property}/version
...
properties
   my.property111/my.property
/properties

Then I get an ArtifactId-111 in my repo.

Does this seem like a bug in the build number plugin, that it isn't
interpolating correctly, or that the ${buildNumber} is a kind of property
that doesn't get interpolated when specified in a version.../version
section?

Is this the same problem as
http://jira.codehaus.org/browse/MOJO-909
?

Kind regards,
Matthias.



Wayne Fay wrote:
 
 Sorry, I didn't intend to mislead you. I was only trying to address
 part of your question, the how do I get buildnumber to put its number
 in my artifact's name during the build part, not the how do I get
 that artifact installed with that same name which, as Wendy says, is
 not possible.
 
 Artifacts always go into the local repo cache using the groupId,
 artifactId, and version you have declared in the pom -- it completely
 ignores the finalName.
 
 finalName is only useful for changing the name of a war/ear and then
 pulling it out of /target to use it for something else directly.
 
 Wayne
 

-- 
View this message in context: 
http://www.nabble.com/problem-using-the-buildnumber-plugin-with-maven-tp17077968p19335391.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



POM reference mistake - changing the reporting output directory

2008-05-19 Thread Matthias Grunwalde
Hi,
The POM reference at
http://maven.apache.org/pom.html#Reporting
seems to have a mistake... the example states

  reporting
plugins
  plugin
outputDirectory${basedir}/target/site/outputDirectory
artifactIdmaven-project-info-reports-plugin/artifactId
version2.0.1/version
reportSets
  reportSet/reportSet
/reportSets
  /plugin
/plugins
  /reporting


but this doesn't allow me to change the output directory for the 'site'
goal. The following however, does:

  reporting
outputDirectory/my/custom/site/directory/outputDirectory
plugins
  plugin
artifactIdmaven-project-info-reports-plugin/artifactId
  /plugin
/plugins
  /reporting

Found using mvn help:effective-pom, and trial-and-error. I tried searching
the documentation for more info on this, but couldn't find it - perhaps
http://maven.apache.org/plugins/maven-project-info-reports-plugin/ has
potential for improvement?

Thanks,
Matthias
-- 
Matthias Grünwalde