You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "A. Fuat Sungur" <af...@gmail.com> on 2010/05/26 09:47:11 UTC
how can i build a jar file without doing junit test?
Hi,
i am new user of maven and i confess that i like it. its Very handy tool . i
have a question, building a jar file takes too much time because of junit
test are being performed. how can i build a jar file without doing junit
test?
thanks
--
A.Fuat Sungur
http://sungur.wordpress.com
Re: how can i build a jar file without doing junit test?
Posted by Mert Caliskan <mc...@gmail.com>.
you can skip the tests
but that is evil...!
add param : -Dmaven.test.skip=true to your command.
Mert.
On 26.May.2010, at 10:47, A. Fuat Sungur wrote:
> Hi,
>
> i am new user of maven and i confess that i like it. its Very handy tool . i
> have a question, building a jar file takes too much time because of junit
> test are being performed. how can i build a jar file without doing junit
> test?
>
> thanks
>
> --
> A.Fuat Sungur
> http://sungur.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: how can i build a jar file without doing junit test?
Posted by Ben Caradoc-Davies <Be...@csiro.au>.
On 26/05/10 16:16, Stephen Connolly wrote:
> "mvn package -DskipTests" is better and shorter to type and easier to
> remember
And also builds test jars (but does not run them), preserving
cross-project test dependencies.
--
Ben Caradoc-Davies <Be...@csiro.au>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: how can i build a jar file without doing junit test?
Posted by Martin Schayna <ma...@abra.eu>.
This form is compatible with Maven 1:
C:\....\"%MAVEN_HOME%\bin\maven" -Dmaven.test.skip=true jar
On 26.5.2010 12:48, A. Fuat Sungur wrote:
> that is amazing, lots of people answered immediately. But i did not mention
> which version i am using. I am using maven 1.0.2, i know this is older but i
> have to ( i am using heritrtix crawler and it's documentation talks about
> maven version 2.x should not be used ).
>
> I am currently build a jar file as below :
>
> C:\....\"%MAVEN_HOME%\bin\maven" jar
>
> i tried to add "-DskipTests" but it didn't work :
>
> [junit] Running org.archive.util.fingerprint.MemLongFPSetTest
> [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0,266 sec
> [junit] Running org.archive.util.InterruptibleCharSequenceTest
> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 28,672 sec
> [junit] Running org.archive.util.IoUtilsTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,187 sec
> [junit] Running org.archive.util.JmxUtilsTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,234 sec
> [junit] Running org.archive.util.MimetypeUtilsTest
> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0,187 sec
> [junit] Running org.archive.util.ms.DocTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,359 sec
> [junit] Running org.archive.util.ms.PieceReaderTest
> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,235 sec
> [junit] Running org.archive.util.PaddingStringBufferTest
> [junit] Tests run: 11, Failures: 0, Errors: 0, Time elapsed: 0,187 sec
> [junit] Running org.archive.util.SurtPrefixSetTest
> [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0,25 sec
> [junit] Running org.archive.util.SURTTest
> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0,203 sec
> [junit] Running org.archive.util.TextUtilsTest
> [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0,203 sec
> [junit] Running org.archive.util.UriUtilsTest
> [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0,203 sec
>
> thanks.
>
> On Wed, May 26, 2010 at 11:21 AM, Anders Hammar<an...@hammar.net> wrote:
>
>
>> Good. I'm sure we were about to confuse the poor guy with all these
>> different suggestions.
>>
>> Maven proclaims standardization, but yet there are sometimes so many ways
>> you can do things...:-)
>>
>> /Anders
>> On Wed, May 26, 2010 at 10:16, Stephen Connolly<
>> stephen.alan.connolly@gmail.com> wrote:
>>
>>
>>> "mvn package -DskipTests" is better and shorter to type and easier to
>>> remember
>>>
>>> On 26 May 2010 08:50, fradj zayen<za...@gmail.com> wrote:
>>>
>>>
>>>> Hi,
>>>> you should run the following command line:
>>>> mvn package -Dtest=false -DfailIFNoTests=false
>>>>
>>>> Hope it helps
>>>> Regards
>>>>
>>>> 2010/5/26 A. Fuat Sungur<af...@gmail.com>
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> i am new user of maven and i confess that i like it. its Very handy
>>>>>
>>> tool
>>>
>>>> .
>>>>
>>>>> i
>>>>> have a question, building a jar file takes too much time because of
>>>>>
>>> junit
>>>
>>>>> test are being performed. how can i build a jar file without doing
>>>>>
>>> junit
>>>
>>>>> test?
>>>>>
>>>>> thanks
>>>>>
>>>>> --
>>>>> A.Fuat Sungur
>>>>> http://sungur.wordpress.com
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Zayen Fradj
>>>> Ingénieur Informaticien
>>>> Sun Certified Programmer
>>>>
>>>>
>>>
>>
>
>
>
Re: how can i build a jar file without doing junit test?
Posted by "A. Fuat Sungur" <af...@gmail.com>.
that is amazing, lots of people answered immediately. But i did not mention
which version i am using. I am using maven 1.0.2, i know this is older but i
have to ( i am using heritrtix crawler and it's documentation talks about
maven version 2.x should not be used ).
I am currently build a jar file as below :
C:\....\"%MAVEN_HOME%\bin\maven" jar
i tried to add "-DskipTests" but it didn't work :
[junit] Running org.archive.util.fingerprint.MemLongFPSetTest
[junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0,266 sec
[junit] Running org.archive.util.InterruptibleCharSequenceTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 28,672 sec
[junit] Running org.archive.util.IoUtilsTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,187 sec
[junit] Running org.archive.util.JmxUtilsTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,234 sec
[junit] Running org.archive.util.MimetypeUtilsTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0,187 sec
[junit] Running org.archive.util.ms.DocTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,359 sec
[junit] Running org.archive.util.ms.PieceReaderTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,235 sec
[junit] Running org.archive.util.PaddingStringBufferTest
[junit] Tests run: 11, Failures: 0, Errors: 0, Time elapsed: 0,187 sec
[junit] Running org.archive.util.SurtPrefixSetTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0,25 sec
[junit] Running org.archive.util.SURTTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0,203 sec
[junit] Running org.archive.util.TextUtilsTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0,203 sec
[junit] Running org.archive.util.UriUtilsTest
[junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0,203 sec
thanks.
On Wed, May 26, 2010 at 11:21 AM, Anders Hammar <an...@hammar.net> wrote:
> Good. I'm sure we were about to confuse the poor guy with all these
> different suggestions.
>
> Maven proclaims standardization, but yet there are sometimes so many ways
> you can do things...:-)
>
> /Anders
> On Wed, May 26, 2010 at 10:16, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
> > "mvn package -DskipTests" is better and shorter to type and easier to
> > remember
> >
> > On 26 May 2010 08:50, fradj zayen <za...@gmail.com> wrote:
> >
> > > Hi,
> > > you should run the following command line:
> > > mvn package -Dtest=false -DfailIFNoTests=false
> > >
> > > Hope it helps
> > > Regards
> > >
> > > 2010/5/26 A. Fuat Sungur <af...@gmail.com>
> > >
> > > > Hi,
> > > >
> > > > i am new user of maven and i confess that i like it. its Very handy
> > tool
> > > .
> > > > i
> > > > have a question, building a jar file takes too much time because of
> > junit
> > > > test are being performed. how can i build a jar file without doing
> > junit
> > > > test?
> > > >
> > > > thanks
> > > >
> > > > --
> > > > A.Fuat Sungur
> > > > http://sungur.wordpress.com
> > > >
> > >
> > >
> > >
> > > --
> > > Zayen Fradj
> > > Ingénieur Informaticien
> > > Sun Certified Programmer
> > >
> >
>
--
A.Fuat Sungur
http://sungur.wordpress.com
Re: how can i build a jar file without doing junit test?
Posted by Anders Hammar <an...@hammar.net>.
Good. I'm sure we were about to confuse the poor guy with all these
different suggestions.
Maven proclaims standardization, but yet there are sometimes so many ways
you can do things...:-)
/Anders
On Wed, May 26, 2010 at 10:16, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> "mvn package -DskipTests" is better and shorter to type and easier to
> remember
>
> On 26 May 2010 08:50, fradj zayen <za...@gmail.com> wrote:
>
> > Hi,
> > you should run the following command line:
> > mvn package -Dtest=false -DfailIFNoTests=false
> >
> > Hope it helps
> > Regards
> >
> > 2010/5/26 A. Fuat Sungur <af...@gmail.com>
> >
> > > Hi,
> > >
> > > i am new user of maven and i confess that i like it. its Very handy
> tool
> > .
> > > i
> > > have a question, building a jar file takes too much time because of
> junit
> > > test are being performed. how can i build a jar file without doing
> junit
> > > test?
> > >
> > > thanks
> > >
> > > --
> > > A.Fuat Sungur
> > > http://sungur.wordpress.com
> > >
> >
> >
> >
> > --
> > Zayen Fradj
> > Ingénieur Informaticien
> > Sun Certified Programmer
> >
>
Re: how can i build a jar file without doing junit test?
Posted by Stephen Connolly <st...@gmail.com>.
"mvn package -DskipTests" is better and shorter to type and easier to
remember
On 26 May 2010 08:50, fradj zayen <za...@gmail.com> wrote:
> Hi,
> you should run the following command line:
> mvn package -Dtest=false -DfailIFNoTests=false
>
> Hope it helps
> Regards
>
> 2010/5/26 A. Fuat Sungur <af...@gmail.com>
>
> > Hi,
> >
> > i am new user of maven and i confess that i like it. its Very handy tool
> .
> > i
> > have a question, building a jar file takes too much time because of junit
> > test are being performed. how can i build a jar file without doing junit
> > test?
> >
> > thanks
> >
> > --
> > A.Fuat Sungur
> > http://sungur.wordpress.com
> >
>
>
>
> --
> Zayen Fradj
> Ingénieur Informaticien
> Sun Certified Programmer
>
Re: how can i build a jar file without doing junit test?
Posted by fradj zayen <za...@gmail.com>.
Hi,
you should run the following command line:
mvn package -Dtest=false -DfailIFNoTests=false
Hope it helps
Regards
2010/5/26 A. Fuat Sungur <af...@gmail.com>
> Hi,
>
> i am new user of maven and i confess that i like it. its Very handy tool .
> i
> have a question, building a jar file takes too much time because of junit
> test are being performed. how can i build a jar file without doing junit
> test?
>
> thanks
>
> --
> A.Fuat Sungur
> http://sungur.wordpress.com
>
--
Zayen Fradj
Ingénieur Informaticien
Sun Certified Programmer
Re: how can i build a jar file without doing junit test?
Posted by Thomas Markus <t....@proventis.net>.
Hi,
specify -Dmaven.test.skip=true
mvn -Dmaven.test.skip=true package
regards
Thomas
Am 26.05.2010 09:47, schrieb A. Fuat Sungur:
> Hi,
>
> i am new user of maven and i confess that i like it. its Very handy tool . i
> have a question, building a jar file takes too much time because of junit
> test are being performed. how can i build a jar file without doing junit
> test?
>
> thanks
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: how can i build a jar file without doing junit test?
Posted by Antonio Petrelli <an...@gmail.com>.
2010/5/26 A. Fuat Sungur <af...@gmail.com>:
> i am new user of maven and i confess that i like it. its Very handy tool . i
> have a question, building a jar file takes too much time because of junit
> test are being performed. how can i build a jar file without doing junit
> test?
http://maven.apache.org/general.html#skip-test
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: how can i build a jar file without doing junit test?
Posted by Raphaël Flores <rf...@moulon.inra.fr>.
Le 26.05.2010 09:47, A. Fuat Sungur a écrit :
> Hi,
>
> i am new user of maven and i confess that i like it. its Very handy tool . i
> have a question, building a jar file takes too much time because of junit
> test are being performed. how can i build a jar file without doing junit
> test?
>
> thanks
>
Hello,
You can use the |-Dmaven.test.skip=true| or |-DskipTests=true| options
in your command line, as described here:
http://maven.apache.org/general.html#skip-test
Don't hesitate to check online FAQ & documentation to discover features
and tips. ;-)
--
Raphaël Flores
Téléphone : 01 69 33 23 76
UMR de Génétique Végétale, INRA, Univ. Paris-Sud,
CNRS, AgroParisTech, F-91190 Gif-sur-Yvette, France
Re: how can i build a jar file without doing junit test?
Posted by Baptiste MATHUS <ml...@batmat.net>.
Hi,
It's very bad practice, but it's actually handy sometimes.
Add -DskipTests on the command line when you want to disable tests for an
execution.
I hope you're not doing it when you want to provide the corresponding jar to
someone else. You should only do that for example when you KNOW the tests
are passing and you're doing an internal test for you.
Cheers.
2010/5/26 A. Fuat Sungur <af...@gmail.com>
> Hi,
>
> i am new user of maven and i confess that i like it. its Very handy tool .
> i
> have a question, building a jar file takes too much time because of junit
> test are being performed. how can i build a jar file without doing junit
> test?
>
> thanks
>
> --
> A.Fuat Sungur
> http://sungur.wordpress.com
>
--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !