Re: Filtering resources

2016-01-14 Thread Thomas Sundberg
Hi!

On 14 January 2016 at 15:09, Stephen Connolly
 wrote:
> and how do I differentiate @foo@bar@@ whether that would be equivalent to
> either:
>
>  ${foo}bar${}
>
> or
>
>  ${foo${bar}}
>

This is obviously a complicated example if you allow empty tokens when
using the same delimiter as start and end indicator.

I don't think empty tokes are reasonable. I can't come up with sample
code that would do any reasonable filtering with

@@

Specifying this token in a property file would look like this:

 = the actual value

So, to me empty tokens are an error or an indication of something else.

Empty tokens when using different delimiters such as ${} is possible
to detect since there are different start and end indicators. But the
question on what you should replace them with is still valid.

>
> if using ${ } style delimiters for the start and end?
>
> At least with ${ } style delimiters one can count braces...
>
> how about @foo@bar@manchu@ is that supposed to be ${foo${bar}manchu} or
> ${foo}bar${manchu}
>

I would go with the latter. Which is consistent with how filtering in
Maven is implemented today.

This limits the possibilities a bit on where you can place nested
tokens. Using the same delimiter, you would only be able to place them
at the beginning or end. That is relying two or more of them next to
each other.

Given this, then would the example

@foo@bar@@

be equal to

 ${foo${bar}}

And

@@foo@bar@

be equal to

${${foo}bar}

Using the same delimiter to indicate start and end of a token is
complicated and it would have been nice if it wasn't allowed. But it
is. And heavily used in the filtering case I need to resolve.

>
> Start trying to answer that question and you will see that the rules get
> very fast very quickly
>

I don't really see that it would be extremely complicated. Definitely
complicated using the same delimiter, but not impossible. Using
different delimiters for start and stop would make it easier.
Remembering Scheme, a lisp dialect, makes me wish for parentheses as
delimiters.

It actually surprises me that nested tokens isn't properly supported
in the case ${${foo}bar} or  ${foo${bar}}
But it isn't when I am testing with Maven 3.3.9 and maven-filtering 3.0.0.

Cheers,
Thomas





>
> On 14 January 2016 at 09:10, Thomas Sundberg  wrote:
>
>> Hi!
>>
>> On 13 January 2016 at 19:01, Robert Scholte  wrote:
>> > Hi,
>> >
>> > What would you expect when start and end delimiters are the same in
>> > combination with nested expression. Don't think that'll ever work.
>> > I assume that in your case @PoolSize.@ and @@ are evaluated.
>> > AFAIK only with different delimiters nested expressions could work.
>> >
>>
>> As long as the delimiters are matched, I would expect a recursive
>> resolution of them.
>>
>> That is,
>>
>> @foo@bar@@
>>
>> would first resolve the smallest part, @bar@ to something. Say
>> 'ResolvedBar'.
>> Then it should resolve the larger part @fooResolvedBar@ to whatever
>> 'fooResolvedBar' should be resolved to.
>>
>> That is the behaviour that I would like to see. And the behaviour I
>> interpret the closed bug is refering to.
>> https://issues.apache.org/jira/browse/MRESOURCES-70
>>
>> Just doing a token replacement token by token is easy to implement. A
>> recursive resolution is more complicated to implement.
>>
>> Cheers
>> Thomas
>>
>>
>> > thanks,
>> > Robert
>> >
>> > Op Wed, 13 Jan 2016 14:58:29 +0100 schreef Thomas Sundberg :
>> >
>> >
>> >> Hi!
>> >>
>> >> Filtering resources that uses @ as delimiters works.
>> >>
>> >> This example works as expected:
>> >> @Environment@
>> >>
>> >>
>> >> But my use case involves filtering nested resources. An example looks
>> like
>> >> this:
>> >>
>> >> @PoolSize.@Environment@@
>> >>
>> >> There seem to exist a closed bug regarding nested variables.
>> >> https://issues.apache.org/jira/browse/MRESOURCES-70
>> >>
>> >> Does anybody have another suggestion or should I implement my own
>> >> filtering as a custom resource filter?
>> >>
>> >> /Thomas
>> >>
>> >>
>> >> On 13 January 2016 at 12:04, James Hutton 
>> >> wrote:
>> >>>
>> >>> You could also look at DefaultMavenResourcesFiltering
>> >>>
>> >>> <
>> http://maven.apache.org/shared/maven-filtering/apid

Re: Filtering resources

2016-01-14 Thread Thomas Sundberg
Hi!

On 13 January 2016 at 19:01, Robert Scholte  wrote:
> Hi,
>
> What would you expect when start and end delimiters are the same in
> combination with nested expression. Don't think that'll ever work.
> I assume that in your case @PoolSize.@ and @@ are evaluated.
> AFAIK only with different delimiters nested expressions could work.
>

As long as the delimiters are matched, I would expect a recursive
resolution of them.

That is,

@foo@bar@@

would first resolve the smallest part, @bar@ to something. Say 'ResolvedBar'.
Then it should resolve the larger part @fooResolvedBar@ to whatever
'fooResolvedBar' should be resolved to.

That is the behaviour that I would like to see. And the behaviour I
interpret the closed bug is refering to.
https://issues.apache.org/jira/browse/MRESOURCES-70

Just doing a token replacement token by token is easy to implement. A
recursive resolution is more complicated to implement.

Cheers
Thomas


> thanks,
> Robert
>
> Op Wed, 13 Jan 2016 14:58:29 +0100 schreef Thomas Sundberg :
>
>
>> Hi!
>>
>> Filtering resources that uses @ as delimiters works.
>>
>> This example works as expected:
>> @Environment@
>>
>>
>> But my use case involves filtering nested resources. An example looks like
>> this:
>>
>> @PoolSize.@Environment@@
>>
>> There seem to exist a closed bug regarding nested variables.
>> https://issues.apache.org/jira/browse/MRESOURCES-70
>>
>> Does anybody have another suggestion or should I implement my own
>> filtering as a custom resource filter?
>>
>> /Thomas
>>
>>
>> On 13 January 2016 at 12:04, James Hutton 
>> wrote:
>>>
>>> You could also look at DefaultMavenResourcesFiltering
>>>
>>> <http://maven.apache.org/shared/maven-filtering/apidocs/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.html>
>>> for
>>> an example. I think this is still using plexus so you'll have to have the
>>> component.xml iirc that is needed for components.
>>>
>>> On Tue, Jan 12, 2016 at 5:33 PM, Baptiste Mathus  wrote:
>>>
>>>> In general, though it would surely work too, better avoid using
>>>> maven-antrun-plugin.
>>>> Maven is about standardizing your build process, using antrun is gonna
>>>> add
>>>> issues with IDEs and so on.
>>>>
>>>> Anyway, what you ask for doesn't seem to me to require custom filtering.
>>>> '@' is a standard delimiter (see
>>>>
>>>>
>>>> http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters
>>>> ),
>>>> so it should work out of the box.
>>>>
>>>> Just enable filtering on the resources folders you want and you should
>>>> be
>>>> done.
>>>>
>>>> Cheers
>>>>
>>>>
>>>> 2016-01-12 23:26 GMT+01:00 Matt Benson :
>>>>
>>>> > If you just want to get it done, use the maven-antrun-plugin with Ant
>>>> > filtersets.
>>>> >
>>>> > Matt
>>>> >
>>>> > On Tue, Jan 12, 2016 at 4:14 PM, Thomas Sundberg  wrote:
>>>> > > Hi!
>>>> > >
>>>> > > I need to be able to filter files where the values to replace are
>>>> defind
>>>> > as
>>>> > >
>>>> > > @aPlaceHolderThatNeedToBeSubstituted@
>>>> > >
>>>> > > Does anyone know of a good, working example where a custom resource
>>>> > > filter is implemented?
>>>> > >
>>>> > > I had a look at
>>>> > >
>>>> >
>>>>
>>>> http://maven.apache.org/plugins/maven-resources-plugin/examples/custom-resource-filters.html
>>>> > > and it is a bit sketchy. A complete, annotated example would be nice
>>>> > > where all details needed to implement this interface
>>>> > > MavenResourcesFiltering are shared.
>>>> > >
>>>> > > A Git repo to clone would be the most awesome tip I can think of.
>>>> > >
>>>> > > Cheers,
>>>> > > Thomas
>>>> > >
>>>> > > --
>>>> > > Thomas Sundberg
>>>> > > M. Sc. in Computer Science
>>>> > >
>>>> > > Mobile: +46 70 767 33 15
>>>> > > Blog: http://thomassundberg.wordpress.com/
>>>> > > Twitter: @thomassundberg
>>>> > >
>>>> > > Better software through faster feedback
>>>> > >
>>>> > >
>>>> > > -
>>>> > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>>> > > For additional commands, e-mail: users-h...@maven.apache.org
>>>> > >
>>>> >
>>>> > -
>>>> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>>> > For additional commands, e-mail: users-h...@maven.apache.org
>>>> >
>>>> >
>>>>
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Filtering resources

2016-01-13 Thread Thomas Sundberg
Hi!

Filtering resources that uses @ as delimiters works.

This example works as expected:
@Environment@


But my use case involves filtering nested resources. An example looks like this:

@PoolSize.@Environment@@

There seem to exist a closed bug regarding nested variables.
https://issues.apache.org/jira/browse/MRESOURCES-70

Does anybody have another suggestion or should I implement my own
filtering as a custom resource filter?

/Thomas


On 13 January 2016 at 12:04, James Hutton  wrote:
> You could also look at DefaultMavenResourcesFiltering
> <http://maven.apache.org/shared/maven-filtering/apidocs/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.html>
> for
> an example. I think this is still using plexus so you'll have to have the
> component.xml iirc that is needed for components.
>
> On Tue, Jan 12, 2016 at 5:33 PM, Baptiste Mathus  wrote:
>
>> In general, though it would surely work too, better avoid using
>> maven-antrun-plugin.
>> Maven is about standardizing your build process, using antrun is gonna add
>> issues with IDEs and so on.
>>
>> Anyway, what you ask for doesn't seem to me to require custom filtering.
>> '@' is a standard delimiter (see
>>
>> http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters
>> ),
>> so it should work out of the box.
>>
>> Just enable filtering on the resources folders you want and you should be
>> done.
>>
>> Cheers
>>
>>
>> 2016-01-12 23:26 GMT+01:00 Matt Benson :
>>
>> > If you just want to get it done, use the maven-antrun-plugin with Ant
>> > filtersets.
>> >
>> > Matt
>> >
>> > On Tue, Jan 12, 2016 at 4:14 PM, Thomas Sundberg  wrote:
>> > > Hi!
>> > >
>> > > I need to be able to filter files where the values to replace are
>> defind
>> > as
>> > >
>> > > @aPlaceHolderThatNeedToBeSubstituted@
>> > >
>> > > Does anyone know of a good, working example where a custom resource
>> > > filter is implemented?
>> > >
>> > > I had a look at
>> > >
>> >
>> http://maven.apache.org/plugins/maven-resources-plugin/examples/custom-resource-filters.html
>> > > and it is a bit sketchy. A complete, annotated example would be nice
>> > > where all details needed to implement this interface
>> > > MavenResourcesFiltering are shared.
>> > >
>> > > A Git repo to clone would be the most awesome tip I can think of.
>> > >
>> > > Cheers,
>> > > Thomas
>> > >
>> > > --
>> > > Thomas Sundberg
>> > > M. Sc. in Computer Science
>> > >
>> > > Mobile: +46 70 767 33 15
>> > > Blog: http://thomassundberg.wordpress.com/
>> > > Twitter: @thomassundberg
>> > >
>> > > Better software through faster feedback
>> > >
>> > > -
>> > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> > > For additional commands, e-mail: users-h...@maven.apache.org
>> > >
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> > For additional commands, e-mail: users-h...@maven.apache.org
>> >
>> >
>>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Filtering resources

2016-01-12 Thread Thomas Sundberg
Hi!

I need to be able to filter files where the values to replace are defind as

@aPlaceHolderThatNeedToBeSubstituted@

Does anyone know of a good, working example where a custom resource
filter is implemented?

I had a look at
http://maven.apache.org/plugins/maven-resources-plugin/examples/custom-resource-filters.html
and it is a bit sketchy. A complete, annotated example would be nice
where all details needed to implement this interface
MavenResourcesFiltering are shared.

A Git repo to clone would be the most awesome tip I can think of.

Cheers,
Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Create multi-module archetype with one module only active in a profile

2014-08-29 Thread Thomas Sundberg
On 29 August 2014 09:22, Thomas Larsson  wrote:
> Hello all.
>
> I am trying to create an archetype with two modules, one main and one itest.
> I would like to have the itest module only active when run with a profile.
>
> In my original project, the root pom includes a part like this:
>
> 
> 
> itest
> 
> itest
> 
> 
> 
>
> However, in the archetype-metadata.xml reference there is nothing mentioned
> about profiles.
>
> Is there anyway accomplish this?
>

Are you able to create an archetype that creates a multi module project?

Can you create an archetype that contains a profile?

What happened when you combined the result of the two actions above?
(Given that they both worked?)

I am seldom working with archetypes so I haven't tried to create one
that creates a multi module project with a profile.

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Custom plugin dependencies

2014-07-27 Thread Thomas Sundberg
On 27 July 2014 12:02, Mansour Al Akeel  wrote:
> Thomas,
> Thank you for the fast response. Unfortunately this is not the case.
> I have generate a maven plugin project from the archetype, and add:
>
> 
> org.apache.ddlutils
> ddlutils
> 1.1
> 
>

Interesting, when I search for the artifact you declare above at
http://search.maven.org I can only find version 1.0, not version 1.1

What happens if you declare version 1.0?

>
> I added the import statement to my Mojo:
>
> import org.apache.ddlutils.task.DdlToDatabaseTask;
>
> and declare it:
>
> private DdlToDatabaseTask ddlToDatabaseTask;
>
>
> Now when I do:
>
> mvn install
> and try to run the Mojo, I get
>
> java.lang.NoClassDefFoundError: org/apache/tools/ant/Task
>
> So I am wondering, how to make this library available to the plugin ?
>

You could consider adding a dependency in your project to the Ant plugin.

Search at Central Repository and see what you can find.

/Thomas


>
> On Sun, Jul 27, 2014 at 5:10 AM, Thomas Sundberg  wrote:
>> On 27 July 2014 10:05, Mansour Al Akeel  wrote:
>>> I am writing a custom plug in. This plugin has other dependencies. How
>>> can I make these dependencies available when running the plugin
>>> without having to add them manually ??
>>
>> I assume that your dependencies are declared in your plugin project.
>> If they are, then they will be downloaded and made available
>> automatically by Maven.
>>
>> /Thomas
>>
>> --
>> Thomas Sundberg
>> M. Sc. in Computer Science
>>
>> Mobile: +46 70 767 33 15
>> Blog: http://thomassundberg.wordpress.com/
>> Twitter: @thomassundberg
>>
>> Better software through faster feedback
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Custom plugin dependencies

2014-07-27 Thread Thomas Sundberg
On 27 July 2014 10:05, Mansour Al Akeel  wrote:
> I am writing a custom plug in. This plugin has other dependencies. How
> can I make these dependencies available when running the plugin
> without having to add them manually ??

I assume that your dependencies are declared in your plugin project.
If they are, then they will be downloaded and made available
automatically by Maven.

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: org.codehaus.mojo:versions-maven-plugin:2.0:update-properties

2013-05-08 Thread Thomas Sundberg
On 8 May 2013 22:27, Stephen Connolly  wrote:
> On 8 May 2013 20:28, Thomas Sundberg  wrote:
>
>> On 8 May 2013 21:13, Wayne Fay  wrote:
>> >> It works well for artifacts in Nexus that was deployed from Maven.
>> >> Unfortunately, we have some artifacts that consist of zip files and
>> >> has been generated from an Ant build.
>> >
>> > I assume the plugin queries your MRM and looks at the versions in
>> > maven-metadata.xml. How are the zip files being deployed to your MRM?
>> > Or are they just installed locally in ~/.m2, or what?
>> >
>>
>> The files are uploaded to the Nexus server and are expected to be
>> downloaded from it as well. If the maven-metadata is updated properly
>> or not is something I need to check.
>>
>> >> My question is, does anybody know how an updated version is located by
>> >> the version plugin? It seems to me that it doesn't just look at all
>> >> versions for an artifact and then uses the largest number.
>> >
>> > I assume Stephen C. will give us an authoritative reply soon.
>>
>> I am hooping for an answer from Stephen.
>>
>
> Looks at the versions in the metadata, and then looks at all the
> dependencies that use that property and then looks for the highest common
> version that is available for all those dependencies using the sorting rule
> defined for the dependencies (behaviour is either undefined or throw an
> error if the different dependencies have different sorting rules that
> result in an effective different order... you'd need to check the code to
> be sure)
>

Thanks

/Thomas

--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: org.codehaus.mojo:versions-maven-plugin:2.0:update-properties

2013-05-08 Thread Thomas Sundberg
On 8 May 2013 21:50, Wayne Fay  wrote:
>> The files are uploaded to the Nexus server and are expected to be
>> downloaded from it as well. If the maven-metadata is updated properly
>> or not is something I need to check.
>
> OK... but HOW is that happening? "mvn deploy:deploy-file" or another
> similar process, or upload via the Nexus GUI, or what?
>

They are uploaded from a home brewed ant script that I am being forced
to live with.

/Thomas

--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: org.codehaus.mojo:versions-maven-plugin:2.0:update-properties

2013-05-08 Thread Thomas Sundberg
On 8 May 2013 21:13, Wayne Fay  wrote:
>> It works well for artifacts in Nexus that was deployed from Maven.
>> Unfortunately, we have some artifacts that consist of zip files and
>> has been generated from an Ant build.
>
> I assume the plugin queries your MRM and looks at the versions in
> maven-metadata.xml. How are the zip files being deployed to your MRM?
> Or are they just installed locally in ~/.m2, or what?
>

The files are uploaded to the Nexus server and are expected to be
downloaded from it as well. If the maven-metadata is updated properly
or not is something I need to check.

>> My question is, does anybody know how an updated version is located by
>> the version plugin? It seems to me that it doesn't just look at all
>> versions for an artifact and then uses the largest number.
>
> I assume Stephen C. will give us an authoritative reply soon.

I am hooping for an answer from Stephen.

> Otherwise you can check the plugin source code pretty easily since it
> is open source.

Yes, and I will do that. But today I was unfortunately to tiered. And
could ask the list and see if somebody knew the answer right away.


Cheers
Thomas

--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



org.codehaus.mojo:versions-maven-plugin:2.0:update-properties

2013-05-08 Thread Thomas Sundberg
Hi!

I am trying to use the plugin versions-maven-plugin to update some
properties. I have properties that refers to version for a dependency.
It works well for artifacts in Nexus that was deployed from Maven.
Unfortunately, we have some artifacts that consist of zip files and
has been generated from an Ant build.

The referred artifacts are downloaded properly when I set the version
manually and then build my project. However, if I use the
org.codehaus.mojo:versions-maven-plugin:2.0:update-properties then it
only detects changed properties for artifacts deployed from Maven
projects.

An example of a property I want to have updated may be
1.15.0.17 and the version number I want to have inserted
could be 1.15.0.18

Our version number come in some kind of logical order, we have a
strict increasing number system.

My question is, does anybody know how an updated version is located by
the version plugin? It seems to me that it doesn't just look at all
versions for an artifact and then uses the largest number.

Any hints?
Thomas

--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Handle XSDs with Maven and Nexus?

2013-04-09 Thread Thomas Sundberg
Hi!

Thanks for all suggestions. I will contemplate this and see what we
come up with.

Cheers
Thomas


On 8 April 2013 16:31, Wayne Fay  wrote:
>> How would you publish a XSD for a project and make it available for
>> other Maven builds?
>
> I expect that MRRP would be a part of the solution:
> http://maven.apache.org/plugins/maven-remote-resources-plugin/
>
> Wayne
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Handle XSDs with Maven and Nexus?

2013-04-08 Thread Thomas Sundberg
Hi!

We seem to want to publish XSDs (XML Schema Definitions) in a project.
I have been told that we want to make XSDs available at a well known
url.

We are using Maven and I tried to sell the idea that we create a jar
that contains the XSD and add this as a dependency in a Maven build.
This wasn't a good enough solution.

How would you publish a XSD for a project and make it available for
other Maven builds?

We are using Nexus so publishing there is an option.

/Thomas

--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



[ANN] Maven – the simplest possible introduction?

2013-02-24 Thread Thomas Sundberg
Hi!

I just wrote a blog on getting started with Maven It might help
someone to get a small example up and running.
http://thomassundberg.wordpress.com/2013/02/24/maven-the-simplest-possible-introduction/

Cheers
Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: how to include a directory for a web application generated with an archetype

2012-11-13 Thread Thomas Sundberg
On 13 November 2012 20:26, daniel echalar  wrote:
> Hi,
>
> II have created a maven project using a webapp archetype, the result is
> that in my generated directory structure, there is not the src/main/java
> directory, (there is where I want to put my servlets), so ,how can I do
> that?

Depending on your os, mkdir or something similar. If you are missing a
directory, try to create it. The Archetype you used is perhaps broken
or doesn't behave as you wanted. Add your dir manually.

/Thomas


-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Maven and special building behaviour

2012-10-19 Thread Thomas Sundberg
On 19 October 2012 10:15, kenduron  wrote:
> Hello,
>
> perhaps you can help me.
>
> I got a WAR (web archive) which is built with maven.
> It works perfectly.
>
> mvn clean package install
>
> But from now on, I need to create and additional special version of this war
> from the same code base. In this special version, some modification will be
> done:
>
> - some classes are removed from the war (indeed controller classes)
> - a configuration file is changed
>
> the special version is a limited version of the normal version.
>
> It should be deployed with a special tag, e.g.
>
> MyWar - Version 1.0.0 - specialEdition.

Probably not, it should be deployed with a specific name that differs
it from the normal artifact. Not a special tag.

>
> Is this possible with maven?

Yes

> If so, how?

You divide your project in different modules. Everything common should
be in a common module, anything specific should be in a specific
module. Typically one module per artifact.

The common module should create a jar that the specific modules depends on.
These specific modules should all depend om the common module, add
it's specific difference and finally produce a war as deployable
artifact.

This would be the Maven way. Common things in one module, specific
things in specific modules.

>
> Branching in svn is overwhelming

Branching my be the root of all evil. Avoid if possible.




HTH
Thomas



>
> Thanks you
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Maven pom.xml ?

2012-10-19 Thread Thomas Sundberg
On 19 October 2012 09:36, jiapei100  wrote:
> Hi, sorry for my naive question:I've got a maven project, in which there is a
> file pom.xml .My naive question:1) By using bash, what is the command line
> to build a .jar from pom.xml ?*maven  pom.xml  -> project.jar ?*2)

You would use

mvn package

to build a jar. It will end up in the ./target directory.

This is of course dependent of how you pom looks like.

The simplest possible pom would look something like this:


4.0.0
se.somath.maven
simplest-possible
1.0.0-SNAPSHOT


As you see, there is no packaging specified. This means that the
default packaging will be used and the default packaging is a jar.


> By
> using Eclipse, how to build a .jar from this pom.xml within the project?

I have no idea, life is to short to use Eclipse.

HTH
Thomas


>
>
>
> -
> Welcome to Vision Open
> http://www.visionopen.com
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Maven-pom-xml-tp5727069.html
> Sent from the Maven - Users mailing list archive at Nabble.com.



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Fwd: [Cucumber] Cucumber-JVM on JDK 7

2012-10-04 Thread Thomas Sundberg
Hi!

A bug discovered by the lead developer for Cucumber-jvm.

/Thomas


-- Forwarded message --
From: aslak hellesoy 
Date: 4 October 2012 20:40
Subject: [Cucumber] Cucumber-JVM on JDK 7
To: Cucumber Users 


I'm trying to build Cucumber-JVM on JDK 7, but I can't due to a Maven bug:

http://jira.codehaus.org/browse/MCOMPILER-183

If anyone in here would like to help fixing this bug it would be much
appreciated.

Cheers,
Aslak

--
-- Rules --

1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers
http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a
new topic instead.

You received this message because you are subscribed to the Google
Groups Cukes group. To post to this group, send email to
cu...@googlegroups.com. To unsubscribe from this group, send email to
cukes+unsubscr...@googlegroups.com. For more options, visit this group
at https://groups.google.com/d/forum/cukes?hl=en




-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Writing my own mojo - how do I specify a default goal?

2012-07-21 Thread Thomas Sundberg
On 21 July 2012 20:51, Wayne Fay  wrote:
>>> Plugin that does not have execution defined but it still executes (as you
>>> say you'd want) is usually bound to lifecycle of the packaging in it's
>>> lifecycle mapping. So, unless you write your own packaging (I doubt this is
>>> what you need), you are left to declare plugin _with_ executions.
>>
>> But it is either a well guarded secret how to package a plugin so it
>> has knowledge about when it should be executed or impossible.
>
> There is no great conspiracy at work here. You simply fail to
> understand what is meant by the term "packaging." Tamás is not saying
> you need to package your plugin a particular way for this to work. He
> is literally talking about Maven's concept of a package (jar, war,
> ear, pom, etc) and how that determines the lifecycle which will be
> used and thus which plugins are bound to the build.

Yes, that was the part I failed to understand.

>
> Read more here:
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Packaging
>
> If you really want to do this, read Robert's links. It is nontrivial
> stuff but can certainly be done if this is truly what you require.

I have gotten it to work now and while preparing dinner I suddenly
understood what Tamas meant. The pointers Robert gave me was good and
got me in the right direction.

> Most people find this to be way more than they need and resort to
> providing a couple extra lines of configuration in their plugin
> declarations instead.

You are probably right. Adding the extra configuration makes it easier
to execute your own Mojo, but for some reasons I didn't want them
there. I ended up with an additional true
instead. I guess that's something I have to live with.

Thanks for your help!
Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Writing my own mojo - how do I specify a default goal?

2012-07-21 Thread Thomas Sundberg
Hi!

On 21 July 2012 10:45, Tamás Cservenák  wrote:
> You cannot have that, you need to bind the goal at least (and goal usually
> have a "preferred" phase it will bind to).
> Plugin that does not have execution defined but it still executes (as you
> say you'd want) is usually bound to lifecycle of the packaging in it's
> lifecycle mapping. So, unless you write your own packaging (I doubt this is
> what you need), you are left to declare plugin _with_ executions.

This is what I want. I want to package my plugin so that it knows
which phase to execute in. It is also ok for my use case if the
execution phase is impossible to change.

But it is either a well guarded secret how to package a plugin so it
has knowledge about when it should be executed or impossible.

So, assuming that it is a matter of packaging, does anybody have any
good pointers I could look at?

/Thomas





>
> Thanks,
> ~t~
>
> On Sat, Jul 21, 2012 at 10:13 AM, Thomas Sundberg  wrote:
>
>> Hi!
>>
>> I am trying to write my own Maven plugin. I want to be able to specify
>> it in a build without specifying any additional parameters. I don't
>> seem to find any example after some googling. In a perfect world, I
>> would like to write my pom like this:
>>
>> 
>> 
>> 
>> se.somath
>> publisher-plugin
>> 1.0-SNAPSHOT
>> 
>> 
>> 
>>
>> That is, just specify that this plugin should be used.
>>
>> At the moment I have to specify it like this:
>>
>> 
>> 
>> 
>> se.somath
>> publisher-plugin
>> 1.0-SNAPSHOT
>> 
>> 
>> 
>> process
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> Currently I have just one goal and it doesn't take any parameters.
>>
>> This question might be better to send to the developers list, but I
>> don't follow that list and I assume that there are some mojo
>> developers following this list that might be able to assist me.
>>
>> Thomas
>>
>> --
>> Thomas Sundberg
>> M. Sc. in Computer Science
>>
>> Mobile: +46 70 767 33 15
>> Blog: http://thomassundberg.wordpress.com/
>> Twitter: @thomassundberg
>>
>> Better software through faster feedback
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Writing my own mojo - how do I specify a default goal?

2012-07-21 Thread Thomas Sundberg
Hi!

I am trying to write my own Maven plugin. I want to be able to specify
it in a build without specifying any additional parameters. I don't
seem to find any example after some googling. In a perfect world, I
would like to write my pom like this:




se.somath
publisher-plugin
1.0-SNAPSHOT




That is, just specify that this plugin should be used.

At the moment I have to specify it like this:




se.somath
publisher-plugin
1.0-SNAPSHOT



process







Currently I have just one goal and it doesn't take any parameters.

This question might be better to send to the developers list, but I
don't follow that list and I assume that there are some mojo
developers following this list that might be able to assist me.

Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Code coverage report for multi module maven project reports zero in some modules

2012-07-01 Thread Thomas Sundberg
On 1 July 2012 03:51,   wrote:
> Yes, I have moduleA, moduleB, moduleC, moduleD, moduleE and module F. I
> run JUnit tests from module F.

This is not the way the Cobertura plugin expects you to do stuff. I
have solved this scenario with a mix if Maven and And. If you are
interested, take a look at
http://thomassundberg.wordpress.com/2012/02/18/test-coverage-in-a-multi-module-maven-project/

HTH
Thomas



>
> The report in the moduleF/target... directory has the required coverage
> information. However, the coverage report in the other modules reports
> line and code coverage as zero.
>
> I did try to use the aggregate option with setting it to true, to see an
> aggregate coverage report for all modules, it gives the aggregate report,
> but again only for packages in moduleF(from where we run JUnit tests) and
> reports as zero for all other modules.
>
> I am trying what was suggested in the first response to this question.
>
> Is there a way that we generate the code coverage report for all modules,
> with out using ant and only with use of cobertura ?
>
> Thanks
>
>> Aggregated cobertura report will execute cobertura on each module and then
>> merge the single reports. It will not help if, for example, you have tests
>> in module A and want to have coverage of module B.
>>
>>
>> On Sat, Jun 30, 2012 at 10:46 AM, Patrick Mohr  wrote:
>>
>>> On Sat, Jun 30, 2012 at 12:18 AM, Aliaksei Lahachou <
>>> aliaksei.lahac...@gmail.com> wrote:
>>>
>>> > Hi!
>>> >
>>> > cobertura:cobertura executes it's own lifecycle: instruments the
>>> classes,
>>> > instrumented classes are saved to target/generated-classes/cobertura,
>>> and
>>> > executes unit tests. Instrumented classes dump coverage data to
>>> > target/conbertura/cobertura.ser. There are two things to understand:
>>> >
>>> > 1. When cobertura:cobertura is executed, dependencies are not
>>> instrumented.
>>> > You have to have enabled instrumentation, see cobertura:instrument
>>> goal.
>>> > This will produce jars with instrumented classes, so be careful not to
>>> > distribute them.
>>> > 2. Each module will write coverage data to it's own
>>> > target/conbertura/cobertura.ser file. I think it's possible to
>>> configure
>>> > instrumentation so that all jars write to the same cobertura.ser file,
>>> but
>>> > I don't know whether it's normal, and I never tried that.
>>> >
>>> >
>>> I want to say that there's a cobertura target.  Something like
>>> cobertura:aggregate that will combine the results off all the unit
>>> tests,
>>> for the module that's being tested.  That probably won't be what you
>>> want,
>>> but I think it would be a lot closer.  This is all from memory though,
>>> so
>>> make sure to check it's actually what you want.
>>>
>>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: using maven modules

2012-05-03 Thread Thomas Sundberg
On Fri, May 4, 2012 at 3:36 AM, Billy Newman  wrote:
> A while back I had some questions about building some jars that only differ
> in the properties files stored in the jar.  I was going to use classifiers
> to differentiate the jars but was advised against it.
>
> My company has many, many different deployments and for these jars they
> want to keep the properties file packaged with the jars.
>
> I was think about maybe having a parent project that contains the java
> source (since the code is the same for each jar).  Then maybe child modules
> that have the properties files in the resources directory.  Then each child
> module can build the java code and throw in the properties file ( i dont
> really care that if I build the same byte code many time as the build is
> very fast).  This idea came to mind because I have unit tests for the jar
> files that test the code against the different properties files.  I.E. when
> I build the source and throw in the properties the unit test will run).  So
> each module will run the unit tests against its property file.
>
> Unfortunately my idea only really works in my head.  My problem is that the
> parent module cannot contain the java source code as the parent module
> needs to be a pom.

If I were to build something similar to what you described, I would
keep the production java source in one module that produces a jar. The
modules with the properties would then be dependent on the production
code jar module and produce the jars with the property file and
include the production jar. I would probably keep the test classes
with each property module. I assume the with different properties,
there will be different result for the tests.

All modules could reside on the same level in a multi module project
or you could have some kind of hierarchy with the property modules
separated. It really doesn't matter from a Maven perspective.

Explore the maven-assembly-plugin [1] for more inspiration on how to
include a jar within a jar. I wrote an example about how to create an
executable jar from Maven a while ago [2], it is similar in the sense
that packages all it's dependencies in the resulting jar.

Maybe this can inspire you to a new idea?
Thomas





[1] http://maven.apache.org/plugins/maven-assembly-plugin/
[2] 
http://thomassundberg.wordpress.com/2011/03/05/create-an-executable-jar-from-maven/
>
> Any one have any ideas on how I can setup my maven project hierarchy such
> that the code lives in one place and the resources live in another (maybe a
> child module).  Such that when I build I build from the same source each
> time but insert a different properties file, then test each one.
>
> I think they can all live in one group, but have different artifactids:
> ie. group - com.test.module
> artifacts - module-type1.jar, module-type2.jar, module-type3.jar
>
> Thanks in advance for any ideas.



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: How can I trigger a makefile through Maven? is there any plugin for this?

2012-04-25 Thread Thomas Sundberg
On Wed, Apr 25, 2012 at 10:24, bettypop  wrote:
> Basically, it is not recognizing the makefile as an operable program at all

Make files are not executables so this should not surprise anybody.

What you probably would want to do is execute 'make' and supply it
with the proper makefile as argument.

/Thomas


>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5664179.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: How can I trigger a makefile through Maven? is there any plugin for this?

2012-04-24 Thread Thomas Sundberg
Hi!

You might be interested in http://mojo.codehaus.org/exec-maven-plugin/

Or Google for 'maven exec plugin' and checkout the first hit.

/Thomas

On Wed, Apr 25, 2012 at 07:34, bettypop  wrote:
>
>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5663921.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Maven use case

2011-12-27 Thread Thomas Sundberg
Hi!

What about the source code needed for the web app? How do you plan to make
it available for the Maven process so the actual web app can be built?

/Thomas

On Fri, Dec 23, 2011 at 22:55, Michael Oliver wrote:

> Hi,
>
> I have been using Maven for some time, particularly with Spring Web
> Applications with AspectJ.  Frankly I know some developers, even some of
> mine still prefer Ant, but that's another story.
>
> I am writing because I want to explore another use case for Maven.
>
> I want to actually deploy Maven with its own local repository with Web
> Applications that are running as Software as a Service.  The concept is
> pretty simple, deploy a web application let's call it "MySaaS", then when
> an upgrade happens the administrator logs into MySaaS/admin and uploads a
> new pom.xml and executes a mvn install, where maven compiles, tests and
> deploys the upgrade with absolute minimum down time for the application.
>  Has anyone done anything like this?  Is this a good idea?  Am I crazy?
>
> Michael Oliver
> CTO, Corent Technology Inc.
> <http://www.corenttechnology.com>
> Mobile: +63-917-557-0990 *New!
> Office: +1(951) 260-0793
> Home: +1(951) 263-6601
> Skype: MikeOliverAZ
> Choice vs. Force
>
> <http://www.facebook.com/MikeOliverAZ><
> http://twitter.com/#%21/MikeOliverAZ><
> http://www.linkedin.com/pub/mike-oliver/0/1b9/197>
>
> See my Cloudbook
> profile.<http://cloudbook.net/community/contributors/michael-oliver>
>
> This email is intended only for the person to whom is addressed an/or
> otherwise authorized personnel. The information contained herein or
> referenced is confidential and the property of Corent Technology. If you
> are not the intended recipient, please be advised that viewing this message
> and any attachments, as well as copying, forwarding, printing, and
> disseminating any information related to this email is prohibited, and that
> you should not take any action based on the content of this email and/or
> its attachments. If you received this message in error, please contact the
> sender and destroy all copies of this email and any attachment. Please note
> that the views and opinions expressed herein are solely those of the author
> and do not necessarily reflect those of the company. No warranties or
> assurances are made in relation to the safety and content of this email and
> attachments. Corent Technology accepts no liability for any damage caused
> by any virus transmitted by or contained in this email and attachments. No
> liability is accepted for any consequence arising from this email.
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback


[off topic] Code style check

2011-08-01 Thread Thomas Sundberg
Hi!

Does anybody know of a setting in Sonar that will catch code written
as a train wreck waiting to happen?

What I mean is code written similar to this:

foo().bar().foobar().barfoo();

Calling the return value from one method immediately.

I have looked into the Sonar docs and can't find what I'm looking for easily.

If you have any hints, please mail me off list.

Thanks!
Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: combining maven projects

2011-07-17 Thread Thomas Sundberg
Hi!

On Sun, Jul 17, 2011 at 13:35, hariharansrc  wrote:
> i am a maven project with pom file for wicket jasper reports integration and
> another one for wicket-guice-hibernate now i want both of them to be in a
> single project.So anyone tell what to do for integrating  that.

Maybe a common aggregation project? One example of a pom that ties
modules together can be found at

http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/

/Thomas

>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/combine-two-maven-project-tp4593853p4596194.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Maven Fitnesse plugin

2011-05-16 Thread Thomas Sundberg
Hi!

How do you handle the fact that any uptodate Fitnesse version isn't
available from Maven central?
The latest version I found when I checked was 20081201, that is a more
then two years old release.

http://repo1.maven.org/maven2/org/fitnesse/fitnesse/20081201/

/Thomas


On Mon, May 16, 2011 at 10:36, Gijs Sijpesteijn
 wrote:
> Hi,
>
> I'm working on a Maven Fitnesse plugin. I know there are already two similar
> plugins, fitnesse-maven-plugin and trinidad, but the first is hardly
> maintained anymore and the later is missing some functionality and the
> latest release is from 2010.
> When running Fitnesse, you will need to specify the classpath for Fitnesse
> to use. This classpath is almost identical as the maven classpath. Maven is
> therefor perfect to extract this classpath and supply it to fitnesse. The
> plugin will generate the classpath for fitnesse. The plugin can be
> configured to include the /target/classes/ directory instead of a compiled
> jar. Jar's can be excluded, resources can be specified and static entries
> for the classpath for Fitnesse can be specified.
> The big advantace is that you do not have to maintain the version of your
> jar's to be maintained by hand, but will be generated as part of the maven
> build cycle.
> In the near future I would like the plugin to be able to execute the
> fitnesse tests as part of the build process. (Similar to the trinidad
> plugin).
> At the moment, I'm working for a financial customer and we are using our
> plugin with great success. I would really like this plugin to be shared with
> of the world, since I think there are developers out there facing the same
> problems.
>
> Cheers, Gijs Sijpesteijn
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Packaged jar cannot access class of a dependency??

2011-04-20 Thread Thomas Sundberg
On Wed, Apr 20, 2011 at 14:12, Chris24300  wrote:
> I thought maven would include the db4o jar in my project jar?
>
> If I specify -classpath and point to db4o.jar then java can't find my test
> class.
>
> bash-3.2$ java -classpath ./db4o-8.0.184.15484-all-java5.jar -jar
> Db4oServer.jar
>
> Does not even run..

If you want an executable jar, then you have to specify a main class
and make sure that what you need is included. I wrote a little about a
while ago. You can read it at

http://thomassundberg.wordpress.com/2011/03/05/create-an-executable-jar-from-maven/

HTH
Thomas

>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315628.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Using Maven in Desktop Application

2011-04-19 Thread Thomas Sundberg
On Tue, Apr 19, 2011 at 12:34, Alok  wrote:
> Hi ,
>
> I am developing an Desktop Application. I would like to use Maven as build
> tool . Please let me know , can i use maven in desktop application?

Maven is a build tool, it can build any Java project. It can build a
lot of other things as well, you need to specify more details if this
answer doesn't address your question.

HTH
Thomas


>
> Thanks in advance,
> Regards,
> Alok
>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Using-Maven-in-Desktop-Application-tp4312961p4312961.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Testing MDB's (integration / junit) how?

2011-04-10 Thread Thomas Sundberg
Hi!

I wrote a little about integration testing an EJB a while ago. It
doesn't test an MDB, but it builds a Stateless ejb, deploys it on a
JBoss and tests it. It could perhaps be used as a hint for you and how
to solve your problem.

http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/

HTH
Thomas

On Mon, Apr 11, 2011 at 06:16, Andrew Hughes  wrote:
> Howdy,
>
> I want to be able to check that the MDB's created actually execute and
> behave as expected.
>
> For reference, the EE5 tutorial (
> http://download.oracle.com/javaee/5/tutorial/doc/bnbpq.html) covers two
> equivalent "tests" :
>
>   - *Building, Deploying, and Running the simplemessage Application Using
>   NetBeans IDE*
>   - *Building, Deploying, and Running the simplemessage Application Using
>   Ant*
>
> I can't work out how this is best done in Maven (because surprise, surprise,
> the NetBean's ant scrips are less than intuitive) and I can't find any doco
> examples on this.
>
> Help would be excellent :)
>
> Cheers.
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Test phase for a command line tool (resend)

2011-03-21 Thread Thomas Sundberg
Hi!

You may some basic poms at my blog, http://thomassundberg.wordpress.com/

I would locate a test script in the project root and have it to point to a
self-contained jar in ./target

Another option would be to use the Resource plugin,
http://maven.apache.org/plugins/maven-resources-plugin/ and locate the
script in any good directory under src.

HTH
Thomas


On Mon, Mar 21, 2011 at 14:24, Rick Genter  wrote:

> Note: I sent this on Friday (2011-03-18) but saw no response, so am
> resending on the chance that it somehow got lost in transit.
>
> Caveat: I am new to Maven. I've read the online documentation but haven't
> found a good source of sample POMs other than for very basic configurations.
>
> I have a POM that builds a command-line tool. I figured out how to use the
> assembly plugin to build a self-contained jar, but now I need to be able to
> run a series of test cases using that jar and a custom shell script to
> invoke it. I have several questions:
>
> 1) Where do I put my custom shell script in the hierarchy? I've put the
> source into src/main/bin for now.
> 2) For testing I'd like to copy the shell script and self-contained jar
> (jar-with-dependencies) to a test directory (similar to test-classes) and
> run the jar from there. How do I do that?
> 3) The command-line tool analyzes compiled Java code from a jar and builds
> an XML file from the analysis. What I'd like to do for my test cases is
> compile a bunch of different tests into different jars, then for each jar
> run the tool over it, generating an XML file, and do a diff on the XML file
> against expected output. How do I do that?
> 3a) Alternatively I could write a test application that used Runtime.exec()
> to run the tool for each test case, then read in the resulting XML files
> using an XML parser and made a bunch of assertions about each file, but
> frankly I'd rather avoid writing the extra code. If I need to, however, how
> would I do that?
>
> I don't necessarily need the actual POMs written for me; pointers to more
> complete samples doing similar tasks would be fine. Thanks in advance.
> --
> Rick Genter
> rgen...@interactions.net
>
>
>
>
> ***
> This e-mail and any of its attachments may contain Interactions Corporation
> proprietary information, which is privileged, confidential, or subject to
> copyright belonging to the Interactions Corporation. This e-mail is
> intended
> solely for the use of the individual or entity to which it is addressed. If
> you
> are not the intended recipient of this e-mail, you are hereby notified that
> any
> dissemination, distribution, copying, or action taken in relation to the
> contents of and attachments to this e-mail is strictly prohibited and may
> be
> unlawful. If you have received this e-mail in error, please notify the
> sender
> immediately and permanently delete the original and any copy of this e-mail
> and
> any printout. Thank You.
>
> ***
>
>
> -----
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback


Re: Including dependencies in a jar

2011-03-09 Thread Thomas Sundberg
On Thu, Mar 10, 2011 at 04:50, Mark  wrote:
> Can you please explain the assembly plugin method?

Take a look at:

http://thomassundberg.wordpress.com/2011/03/05/create-an-executable-jar-from-maven/

/Thomas

>
> Thanks
>
> On 3/9/11 6:03 PM, Benson Margulies wrote:
>>
>> maven-shade-plugin, or just use the assembly plugin to colocate the
>> dependencies and ask the jar plugin to add a manifest to the main jar.
>>
>> On Wed, Mar 9, 2011 at 8:53 PM, Mark  wrote:
>>>
>>> Say I have the following dependency:
>>>
>>> 
>>> org.apache.mahout.commons
>>> commons-cli
>>> 2.0-mahout
>>> 
>>>
>>> And my main class makes use of these classes:
>>>
>>> public static void main(String[] args) throws Exception {
>>>  DefaultOptionBuilder optionBuilder = new DefaultOptionBuilder();
>>>  
>>> }
>>>
>>> Now when I compile my jar everything is ok however when I try to run my
>>> application I get a ClassNotFound exception. How can I jar up my code
>>> with
>>> the required dependencies and add its classpath?
>>>
>>> Thanks alot.
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: invoking custom tests from another branch

2011-03-03 Thread Thomas Sundberg
Hi!

You could give your activation property a value and use

-DinContainerITest=myValue


  
inContainerITest
myValue
  


/Thomas


On Thu, Mar 3, 2011 at 17:17, Baptiste MATHUS  wrote:

> Hi,
>
> Use -P. Not -D.
>
> Cheers
> Le 2 mars 2011 18:40, "John Lussmyer"  a écrit :
> > I've inherited a huge complex Maven build process that needs some
> updates.
> > One thing we have is some custom test code in one place that is invoked
> via "mvn clean install -DinContainterITest"
> > Now I'd like to invoke that (and several others in other pom's) from a
> pom
> that is in a different branch of the same pom tree.
> >
> > The pom with the test code has:
> >
> > 
> > 
> > inContainerITest
> > 
> > 
> > inContainerITest
> > 
> > 
> > 
> > 
> > 
> > src/test/resources
> > true
> > 
> > 
> > 
> > 
> > maven-surefire-plugin
> > 
> > 
> > surefire-RestTest
> > integration-test
> > 
> > test
> > 
> > 
> > 
> > none
> > 
> > 
> > **/*Test.java
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > I have a dependency on this one in my other pom like this:
> >
> > 
> > 
> > com.xxx..
> > stupidlylongartifactname
> > ${project.version}
> > test
> > 
> > 
> >
> > But I don't know how to set it up so that using the "-DinContainerITest"
> on the pom will actually invoke the tests.
> >
> > Suggestions?
> >
> > This message and the information contained herein is proprietary and
> confidential and subject to the Amdocs policy statement,
> > you may review at http://www.amdocs.com/email_disclaimer.asp
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback


Re: Fitnesse support?

2011-02-20 Thread Thomas Sundberg
Hi!

I have found two different Maven plugions, but none seem to be updated
and supporting the latest Fitnesse release.

The

org.codehaus.mojo
fitnesse-maven-plugin
1.0

depends on

org.fitnesse
fitnesse
20050731

That is a release that is five years old.

I'm looking for a Fitnesse plugin that is maintained and supports a
fairly recent Fitnesse release. If I can't find, I will have to build
something on my own, but I would like to try to find anything updated.

/Thomas


On Sun, Feb 20, 2011 at 18:10, Baptiste MATHUS  wrote:
> Hi,
>
> As running http://www.google.fr/search?q=maven+fitnesse+plugin shows the
> FitNesse Maven Plugin first (http://mojo.codehaus.org/fitnesse-maven-plugin/),
> why didn't you directly try to explain precisely what you're missing in this
> dedicated plugin?
>
> Cheers
>
> 2011/2/20 Thomas Sundberg 
>
>> Hi!
>>
>> Does anybody know of any good Maven plugins that support running
>> Fitnesse acceptance tests? I have done some research and as far as I
>> can see, there doesn't exist any up to date solutions.
>>
>> Any tip is highly appreciated.
>>
>> /Thomas
>>
>> --
>> Thomas Sundberg
>> M. Sc. in Computer Science
>>
>> Mobile: +46 70 767 33 15
>> Blog: http://thomassundberg.wordpress.com/
>> Twitter: @thomassundberg
>>
>> Better software through faster feedback
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>
>
> --
> Baptiste  MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Fitnesse support?

2011-02-20 Thread Thomas Sundberg
Hi!

Does anybody know of any good Maven plugins that support running
Fitnesse acceptance tests? I have done some research and as far as I
can see, there doesn't exist any up to date solutions.

Any tip is highly appreciated.

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: project for libraries

2011-01-10 Thread Thomas Sundberg
On Sun, Jan 9, 2011 at 16:27, Ron Wheeler
 wrote:
> I am not sure what the big difference is but I imagine Intellij must have
> some very good features that makes it worth paying for a product.

Intellij IDEA is available as open source and therefore doesn't cost
you anything.

The major difference is in my opinion that it just works without
hassle. My experience with Eclipse is that it doesn't work as good.
I'm probably biased, I have used Eclipse for a quite short period of
time and Idea close to 10 years now.

/Thomas,
not really interested in starting a flame war... :)

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Referens to parent?

2011-01-07 Thread Thomas Sundberg
Hi!

I'm trying to set up up a multi module project.

My simple approach is this:



4.0.0
se.sigma
aggregation
1.0
pom

foo
bar



./foo:


4.0.0

se.sigma
aggregation
${project.version}

foo
jar



./bar:


4.0.0

se.sigma
aggregation
1.0

bar
jar


Setting up a module like bar works fine. Refering to the parent as I
do i foo fails with the following error:

Non-resolvable parent POM: Failure to find
se.sigma:aggregation:pom:${project.version}

Does anybody have any suggestion on how I can refer to a parent with a
property for the version? The version of the module should be the same
as the version of the parent.

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Automatically integration test an ejb with Maven

2010-12-22 Thread Thomas Sundberg
On Wed, Dec 22, 2010 at 11:05, Anders Hammar  wrote:
> Happy to see that you've found the Cargo plugin! The url zip installation is
> awesome I think. The only thing that would top that would be a GAV zip
> installation, I just need to find some time to get that implemented...

A Maven GAV to specify the container for download would be great.

/Thomas


> Adding to this example, which I find great, I could mention that it is
> possible to add tailor-made configuration files to the container. Here's an
> example of that:
> http://cargo.codehaus.org/Configuration+files+option
>
> /Anders
>
> On Wed, Dec 22, 2010 at 10:34, Thomas Sundberg  wrote:
>
>>
>>
>> On Wed, Dec 22, 2010 at 09:35, Lucas Persson wrote:
>>
>>>  Interesting
>>>
>>> But why do you not use the Cactus maven plugin? With cactus you can
>>> execute the tests in the server.
>>>
>>>
>> Lucas
>>
>> I am not using cactus for a number of reasons
>>
>> * I hadn't heard of Cactus. Browsing http://jakarta.apache.org/cactus/tells 
>> me that it is either a very mature product that doesn't need any more
>> development or a dead product. The last message on the mailing list was from
>> 10 nov and discussing Tomcat 4...
>>
>> * I am not interested in running my unit tests inside the container, I am
>> interested in testing using well known tools like JUnit in the smallest
>> possible context.
>>
>> * I am interested in deploying the same artifact that I might deploy in
>> production and integration test it in a running container that is started
>> automatically
>>
>> * I wanted to show how the Cargo plugin together with the failsafe plugin
>> can be used to do this
>>
>> /Thomas
>>
>>
>>
>>  /Lucas
>>>
>>> On 12/21/2010 11:23 PM, Thomas Sundberg wrote:
>>>
>>> Hi!
>>>
>>> Somebody might have use of a blog post I just 
>>> posted:http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/
>>>
>>> /Thomas
>>>
>>>
>>>
>>> --
>>> [image: Oracle] <http://www.oracle.com>
>>> Lucas Persson | Principal Member of Technical Staff
>>> Phone: +4684773644  | | | Mobile: 
>>> +46730946656
>>> Oracle Communications Platform
>>> ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm
>>>
>>> Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
>>> [image: Green Oracle] <http://www.oracle.com/commitment> Oracle is
>>> committed to developing practices and products that help protect the
>>> environment
>>>
>>
>>
>>
>> --
>> Thomas Sundberg
>> M. Sc. in Computer Science
>>
>> Mobile: +46 70 767 33 15
>> Blog: http://thomassundberg.wordpress.com/
>> Twitter: @thomassundberg
>>
>> Better software through faster feedback
>>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Automatically integration test an ejb with Maven

2010-12-22 Thread Thomas Sundberg
On Wed, Dec 22, 2010 at 09:35, Lucas Persson wrote:

>  Interesting
>
> But why do you not use the Cactus maven plugin? With cactus you can execute
> the tests in the server.
>
>
Lucas

I am not using cactus for a number of reasons

* I hadn't heard of Cactus. Browsing http://jakarta.apache.org/cactus/ tells
me that it is either a very mature product that doesn't need any more
development or a dead product. The last message on the mailing list was from
10 nov and discussing Tomcat 4...

* I am not interested in running my unit tests inside the container, I am
interested in testing using well known tools like JUnit in the smallest
possible context.

* I am interested in deploying the same artifact that I might deploy in
production and integration test it in a running container that is started
automatically

* I wanted to show how the Cargo plugin together with the failsafe plugin
can be used to do this

/Thomas



 /Lucas
>
> On 12/21/2010 11:23 PM, Thomas Sundberg wrote:
>
> Hi!
>
> Somebody might have use of a blog post I just 
> posted:http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/
>
> /Thomas
>
>
>
> --
> [image: Oracle] <http://www.oracle.com>
> Lucas Persson | Principal Member of Technical Staff
> Phone: +4684773644  | | | Mobile: 
> +46730946656
> Oracle Communications Platform
> ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm
>
> Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
> [image: Green Oracle] <http://www.oracle.com/commitment> Oracle is
> committed to developing practices and products that help protect the
> environment
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback


Automatically integration test an ejb with Maven

2010-12-21 Thread Thomas Sundberg
Hi!

Somebody might have use of a blog post I just posted:
http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Multimodule ear project

2010-12-21 Thread Thomas Sundberg
Hi!

Divide your project into four parts. Three jars (ejb, persistance,
wui) and one ear module, have the ear module depend on the other three
modules. And tie the sack together with a parent pom module.

/Thomas

2010/12/21 Pazmiño Mazón, Iván Andrés :
> Hello,
>
> I'm trying to move an existing project to maven2 but having some
> problems. The currently produced project's artifact is an ear and it
> must remain that way. The new project I would like to make it
> modularized in three: one for the ejb, other for persistence and the
> last module for a wui.
>
> The problem is the parent project can't be packaged as an ear, but as a
> pom. Then, how do you setup a multimodule ear project?
>
> I also would like these modules to look like three different projects in
> eclipse IDE, but being one project in the directory structure so it's
> one also when commited to the scm. But this is bonus.
>
> Thanks,
> IP
>
> "Clausula de Confidencialidad: La información contenida en el presente 
> mensaje es confidencial, está dirigida
> exclusivamente a su destinatario y no puede ser vinculante. El Servicio de 
> Rentas Internas no se
> responsabiliza por su uso y deja expresa constancia que en los registros de 
> la Institución consta la
> información originalmente enviada. Este mensaje está protegido por la Ley de 
> Propiedad Intelectual, Ley de
> Comercio Electrónico, Firmas y Mensajes de datos, reglamentos y acuerdos 
> internacionales relacionados. Si
> usted no es el destinatario de este mensaje, recomendamos su eliminación 
> inmediata. La distribución o copia
> del mismo, está prohibida y será sancionada de acuerdo al Código Penal y 
> demás normas aplicables. La
> transmisión de información por correo electrónico, no garantiza que la misma 
> sea segura o esté libre de error,
> por consiguiente, se recomienda su verificación.Toda solicitud de información 
> requerida de manera oficial al
> SRI debe ser ingresada por Secretaría General y dirigida a la máxima 
> autoridad de la Institución, conforme a
> la Ley y demás normas vigentes."
>
> -----
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Re: Failing a build with maven-failsafe-plugin

2010-10-05 Thread Thomas Sundberg
Hi all!

I am indeed missing the verify goal. I added it so my configuration became:


org.apache.maven.plugins
maven-failsafe-plugin
2.6


integration-test

verify



none


**/integration/**






and the result became that Maven is failing the build as well as tearing
down my app server.

My opinion about the docs you point to Anders is that they are not as clear
as they could have been.

Thanks for the pointers!
Thomas


On Tue, Oct 5, 2010 at 13:58, Anders Hammar  wrote:

> I guess you're missing the verify goal:
>
> http://maven.apache.org/plugins/maven-failsafe-plugin/usage.html
>
> /Anders
>
> On Tue, Oct 5, 2010 at 13:46, Thomas Sundberg  wrote:
>
> > Hi!
> >
> > I want to use maven-failsafe-plugin to run some integration tests. I want
> > Maven to run post-integration-test phase to tear down an application
> > server.
> > If any test fails, I want Maven to fail the build so my CI server can
> pick
> > it up and inform the developer who just made a mistake.
> >
> > My failsafe plugin is configured as:
> >
> >   
> >   org.apache.maven.plugins
> >maven-failsafe-plugin
> >   2.6
> >
> >   
> >integration-test
> >   
> >integration-test
> >   
> >
> >   
> >none
> >   
> >
> >   **/integration/**
> >
> >   
> >
> >   
> >
> >
> >
> > This works fine, my app server gets set up and torn down. My integration
> > tests are executed properly. But when I add a JUnit test like this:
> >
> >   @Test
> >   public void failingTest(){
> >fail("Expected to fail");
> >   }
> >
> > Maven doesn't fail the build.
> >
> > I happily reports:
> >
> > 
> >
> > Tests run: 2, Failures: 1, Errors: 0, Skipped: 0
> >
> > 
> >
> > [INFO] BUILD SUCCESS
> > [INFO]
> > 
> > [INFO] Total time: 30.828s
> > [INFO] Finished at: Tue Oct 05 13:08:36 CEST 2010
> > [INFO] Final Memory: 15M/36M
> > [INFO]
> > 
> >
> > Do I need to set any additional property to get the maven-failsafe-plugin
> > to
> > fail the build if a unit test failed?
> > Or am I trying to do something that the failsafe-plugin isn't done for?
> >
> > I'm running Maven 3.0-RC3
> >
> > mvn -version
> > Apache Maven 3.0-RC3 (r1001464; 2010-09-26 18:14:28+0200)
> > Java version: 1.6.0_21
> > Java home: C:\java\jdk1.6.0_21\jre
> > Default locale: sv_SE, platform encoding: Cp1252
> > OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
> >
> > /Thomas
> >
> > --
> > Thomas Sundberg
> > M. Sc. in Computer Science
> >
> > Mobile: +46 70 767 33 15
> > Blog: http://thomassundberg.wordpress.com/
> > Twitter: @thomassundberg
> >
> > Better software through faster feedback
> >
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback


Failing a build with maven-failsafe-plugin

2010-10-05 Thread Thomas Sundberg
Hi!

I want to use maven-failsafe-plugin to run some integration tests. I want
Maven to run post-integration-test phase to tear down an application server.
If any test fails, I want Maven to fail the build so my CI server can pick
it up and inform the developer who just made a mistake.

My failsafe plugin is configured as:

   
   org.apache.maven.plugins
maven-failsafe-plugin
   2.6

   
integration-test
   
integration-test
   

   
none
   

   **/integration/**

   

   



This works fine, my app server gets set up and torn down. My integration
tests are executed properly. But when I add a JUnit test like this:

   @Test
   public void failingTest(){
fail("Expected to fail");
   }

Maven doesn't fail the build.

I happily reports:



Tests run: 2, Failures: 1, Errors: 0, Skipped: 0



[INFO] BUILD SUCCESS
[INFO]

[INFO] Total time: 30.828s
[INFO] Finished at: Tue Oct 05 13:08:36 CEST 2010
[INFO] Final Memory: 15M/36M
[INFO]


Do I need to set any additional property to get the maven-failsafe-plugin to
fail the build if a unit test failed?
Or am I trying to do something that the failsafe-plugin isn't done for?

I'm running Maven 3.0-RC3

mvn -version
Apache Maven 3.0-RC3 (r1001464; 2010-09-26 18:14:28+0200)
Java version: 1.6.0_21
Java home: C:\java\jdk1.6.0_21\jre
Default locale: sv_SE, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback


Re: How to download Javadoc and Sources in local repository for a particular artifact in remote

2010-09-29 Thread Thomas Sundberg
Hi!

If you use IDEA you specify that you want src and docs downloaded. You
can also define it in your pom, I forgot which plugin.

/Thomas

On Wed, Sep 29, 2010 at 19:25, amaresh mourya  wrote:
> Actually I am integrating Maven in IDE.  Is there any maven goal which can
> do this for me..or any API/method where I can specify artifactInfo and get
> it downloaded...
>
> Thanks,
> Amaresh
>
> On Wed, Sep 29, 2010 at 10:36 PM, Wendy Smoak  wrote:
>
>> On Wed, Sep 29, 2010 at 12:21 PM, amaresh mourya
>>  wrote:
>> >  I am given groupId:ArtifatcId:Version of a artifact, how can I download
>> > Javadoc and sources for this artifact.. I do not want to modify my POM to
>> > include plug-in in any phase...Is there any way to direct download.
>>
>> What are you trying to do with them?  Usually your IDE with Maven
>> integration will download those for you.
>>
>> If you just want to download the jars, you can navigate to them with a
>> web browser and download them that way.
>>
>> --
>> Wendy
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Build part of a large project

2010-09-22 Thread Thomas Sundberg
Hi!

We have a Maven project that we want to build parts of using Hudson. Our
setup is similar to this:

A -- B
  +- D
 +- E
  +- F

Where A, B, C, D, E and F are maven modules. A is parent to all modules, D
is parent to E and F.

We are using profiles that are defined from module A and down in order to
minimize configuration.

We have a profile defined in module A with the name Foo. Foo is also defined
in module D and finally in module E with narrower and narrower properties.
This works ok for us.

I have a Hudson CI server with a job defined for each module B, E and F.
Each job listens for changes at the level A.

I would want my Hudson to listen to module F and if a change is found,
checkout from module A and run a Maven build on module F. The reason is that
I need all profile settings, from A and downwards, during the execution of
module F. Each execution takes a couple of minutes and there are many jobs.

I have looked at the configuration options in Hudson and I can't see that
this is possible.

Do you have any suggestions for a solution?

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better Software Through Faster Feedback


Integration tests vs. unit tests

2010-08-27 Thread Thomas Sundberg
Hi!

This has been discussed previously. But I would like to ask the list
again, how do you separate integrations test from unit tests in a
Maven project?

I define unit tests as being tests that will run in memory and not use
any external resources. Anything external is mocked away. Everything
will run in memory and as fast as possible.

I define integration tests as tests that are dependent on other
resources than the source code. This is (at least):
* The file system
* Databases
* Network access

Assume that we are dealing with a multi module build, how would you
organize the modules? Would you consider adding a separate
'integration-test' tree next to main and test?

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

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



Re: Copy target file from another module

2010-07-21 Thread Thomas Sundberg
Hi!

Why not do it the Maven way and create a module with the generated
sources and make the other (2?) modules dependant of it?
This would eliminate the need of a hack that copy files from one
module to another.

/Thomas

On Wed, Jul 21, 2010 at 15:49, Will Hoover  wrote:
> I have a multi-module project where one of the modules needs to copy
> internally generated file(s) that do not come from any maven-aware resources
> from a module to a WAR module for inclusion. The following works, but it
> seems like a hack using  to get to the module where the file(s)
> exist. Is there a better way?
>
>
> WAR module:
>                        
>                                org.apache.maven.plugins
>
> maven-resources-plugin
>                                
>                                        
>                                                validate
>                                                
>
> copy-resources
>                                                
>                                                
>
> ${project.build.directory}/${project.build.finalName} utDirectory>
>                                                        
>                                                                
>
> ${basedir}/../other-module-with-generated-files/target>
>
> false
>                                                                
>                                                        
>                                                
>                                        
>                                
>                        
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

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



Re: JBoss ESB in public Maven repo?

2010-07-08 Thread Thomas Sundberg
Hi!

Thanks a lot Anders!

You put me in the right direction.

The jar I was looking for is available at

https://repository.jboss.org/nexus/content/groups/public-jboss/org/jboss/soa/bpel/dependencies/esb/jbossesb-rosetta/4.8/

/Thomas



On Thu, Jul 8, 2010 at 13:25, Anders Hammar  wrote:
> Thomas,
>
> Check out JBoss new maven 2 repos hosted by Nexus:
> https://repository.jboss.org/nexus/
>
> I did find some jbossesb* artifacts, but if you have a specific class you
> could search for that.
> There are also some blog posts and wiki pages on the net describing JBoss's
> new repos.
>
> /Anders
>
> On Thu, Jul 8, 2010 at 13:18, Thomas Sundberg  wrote:
>
>> Hi!
>>
>> Does anybody know if JBoss ESB 4.x dependencies are available in any
>> public Maven repo?
>>
>> All I have found is a few references from 2008 stating that they are
>> not available when asking Google.
>>
>> Browsing
>>
>> http://repository.jboss.com/maven2
>> http://snapshots.jboss.org/maven2
>>
>> haven't given me anything useful.
>>
>> /Thomas
>>
>> --
>> Thomas Sundberg
>> M. Sc. in Computer Science
>>
>> Mobile: +46 70 767 33 15
>> Blog: http://thomassundberg.wordpress.com/
>>
>> -----
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/

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



JBoss ESB in public Maven repo?

2010-07-08 Thread Thomas Sundberg
Hi!

Does anybody know if JBoss ESB 4.x dependencies are available in any
public Maven repo?

All I have found is a few references from 2008 stating that they are
not available when asking Google.

Browsing

http://repository.jboss.com/maven2
http://snapshots.jboss.org/maven2

haven't given me anything useful.

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/

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



Re: Compare M1 and M2 Artifacts

2010-06-08 Thread Thomas Sundberg
Hi!

I would start by deploying the generated artifacts in a test
environment and run your acceptance tests. If they pass, then all you
need is most likely packaged properly.

If that isn't an option, I would unpack the artifacts and compare them
with Beyond Compare. Beyond Compare can compare not only files but
content in directories.

/Thomas

On Tue, Jun 8, 2010 at 18:14, D D  wrote:
> Hello,
>
>  I'm working on converting M1 to M2. Now I arrived at a point where I need
> to compare artifacts to make sure nothing was missed. JAR/EAR/WAR sizes (MD5
> hashes) can't be compared due to different compiler versions and target
> platforms..
>
> Does anyone have a tool/script that allows on automated artifact comparison
> on the level of files?
>
> Thanks,
> Dave
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/

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



Re: MAVEN DOES NOT WORK PROPERLY IN WINDOWS 7

2010-06-01 Thread Thomas Sundberg
Hi!

This may not be a Maven issue. You have a compilation error in your
TimeTableServiceBeanImpl class. Fix that and you may find that it
works. Perhaps after fixing the rest of your compilation error.

/Thomas

On Tue, Jun 1, 2010 at 15:24, oonwuzu  wrote:
>
> Hi,
> I set up apache-maven-2.2.1 with the settings.xml as shown below. After
> running mvn clean -o on my project, mvn package -o would produce this
> message. I'll be very grateful if I get an answer.The OS i use is windows 7:
>
>
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] No tests to run.
> [INFO] [jar:jar {execution: default-jar}]
> [INFO] Building jar: C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\common\target\college-common-1.0-SNAPSHOT.jar
> [INFO]
> 
> [INFO] Building College Core Business Tier
> [INFO]    task-segment: [package]
> [INFO]
> 
> [INFO] Reloading plugin container for:
> org.apache.maven.plugins:maven-surefire-plugin:2.4.3. The plugin artifact
> has changed.
> [INFO] Reloading plugin container for:
> org.andromda.maven.plugins:andromda-multi-source-plugin:3.3-SNAPSHOT. The
> plugin artifact has changed.
> [INFO] Reloading plugin container for:
> org.andromda.maven.plugins:andromdapp-maven-plugin:3.3-SNAPSHOT. The plugin
> artifact has changed.
> [INFO] Reloading plugin container for:
> org.apache.maven.plugins:maven-surefire-plugin:2.4.3. The plugin artifact
> has changed.
> [INFO] [andromda-multi-source:add-source {execution: default}]
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 103 source files to C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\target\classes
> [INFO]
> 
> [ERROR] BUILD FAILURE
> [INFO]
> 
> [INFO] Compilation failure
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf\college\timetable\service\TimeTableServiceBeanImpl.java:[15,7]
> com.sf.college.timetable.servi
> ce.TimeTableServiceBeanImpl is not abstract and does not override abstract
> method isIdentical(javax.ejb.EJBLocalObject) in javax.ejb.EJBLocalObject
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf\college\timetable\service\TimeTableServiceBeanImpl.java:[74,73]
> cannot find symbol
> symbol  : method loadAll(org.hibernate.Session)
> location: class
> com.sf.college.timetable.entity.dayoftheweek.DayOfTheWeekFactory
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf\college\timetable\service\TimeTableServiceBeanImpl.java:[80,73]
> cannot find symbol
> symbol  : method loadAllInRange(org.hibernate.Session,int,int)
> location: class
> com.sf.college.timetable.entity.dayoftheweek.DayOfTheWeekFactory
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf\college\timetable\service\TimeTableServiceBeanImpl.java:[121,67]
> cannot find symbol
> symbol  : method loadAll(org.hibernate.Session)
> location: class com.sf.college.timetable.entity.timetable.TimeTableFactory
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf\college\timetable\service\TimeTableServiceBeanImpl.java:[127,67]
> cannot find symbol
> symbol  : method loadAllInRange(org.hibernate.Session,int,int)
> location: class com.sf.college.timetable.entity.timetable.TimeTableFactory
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf\college\timetable\service\TimeTableServiceBeanImpl.java:[168,67]
> cannot find symbol
> symbol  : method loadAll(org.hibernate.Session)
> location: class com.sf.college.timetable.entity.timeframe.TimeFrameFactory
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf\college\timetable\service\TimeTableServiceBeanImpl.java:[174,67]
> cannot find symbol
> symbol  : method loadAllInRange(org.hibernate.Session,int,int)
> location: class com.sf.college.timetable.entity.timeframe.TimeFrameFactory
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf\college\hostel\service\HostelServiceBeanImpl.java:[21,7]
> com.sf.college.hostel.service.Hostel
> ServiceBeanImpl is not abstract and does not override abstract method
> isIdentical(javax.ejb.EJBLocalObject) in javax.ejb.EJBLocalObject
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf\college\hostel\service\HostelServiceBeanImpl.java:[100,92]
> cannot find symbol
> symbol  : method loadAll(org.hibernate.Session)
> location: class
> com.sf.college.hostel.entity.accomodationapplication.AccomodationApplicationFactory
>
> C:\DISK
> E\J2EECODES\SOURCE\codes\College\server\core\src\main\java\com\sf

Re: [ANN] Maven Compiler Plugin 2.3 Released

2010-04-23 Thread Thomas Sundberg
Hi!

I just upgraded the project I'm working on and it worked fine.

/Thomas

On Fri, Apr 23, 2010 at 09:54, Milos Kleint  wrote:
> The checksums on central shall be fixed now. My apologies to everyone.
>
> Milos
>
> On Wed, Apr 21, 2010 at 10:22 PM, Brett Porter  wrote:
>
>>
>> On 21/04/2010, at 11:13 PM, John Singleton wrote:
>>
>> > Thanks, Brett.
>> >
>> > FWIW, I also noticed this problem with the 2.2 version of Compiler
>> plugin,
>> > which was released a couple of weeks ago.
>>
>> Yes, they both use the same version of the shared component. It's being
>> taken care of.
>>
>> - Brett
>>
>> --
>> Brett Porter
>> br...@apache.org
>> http://brettporter.wordpress.com/
>>
>>
>>
>>
>>
>> ---------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/

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



Re: Fully automated building from Source Control

2010-04-03 Thread Thomas Sundberg
ce, get a fresh copy from the source control
>> >>>>> (tied to a given tag) and build from scratch.  We don't want anything
>> >>>>> from a developer's working copy involved in any way.
>> >>>>>
>> >>>>> I haven't done this with Maven yet and to be fair, I also hadn't done
>> it
>> >>>>> with the earlier Eclipse-based system in use here but I still want to
>> do
>> >>>>> it.  And yes, I understand that there is a bit of a chicken-egg
>> problem
>> >>>>> here - where is this definition of "everything" to be version
>> controlled
>> >>>>> and how do you avoid nuking that?  So there has to be something of a
>> >>>>> two-tier setup.  I know this and accept it.
>> >>>>>
>> >>>>> I hadn't spent much time looking at the Maven SCM plugin, but now
>> that I
>> >>>>> have, I don't really see what I'm looking for there.  The examples
>> tend
>> >>>>> to be very sparse, and "Maven - The Definitive Guide" doesn't even
>> touch
>> >>>>> the SCM plugin.
>> >>>>>
>> >>>>> Can someone point me at documentation directed toward achieving this
>> >>>>> "holy grail" with Maven?
>> >>>>>
>> >>>>> Thanks.
>> >>>>>
>> >>>>> -
>> >>>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> >>>>> For additional commands, e-mail: users-h...@maven.apache.org
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>
>> >>>> -
>> >>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> >>>> For additional commands, e-mail: users-h...@maven.apache.org
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>
>> >>> -
>> >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> >>> For additional commands, e-mail: users-h...@maven.apache.org
>> >>>
>> >>>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> >> For additional commands, e-mail: users-h...@maven.apache.org
>> >>
>> >>
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/

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



Re: Unable to exclude .class files

2010-03-05 Thread Thomas Sundberg
Hi!

You should perhaps even have three projects. One for the common stuff,
one for the specific jar project that depends on the common stuff and
one for the sar project that also depends on the common stuff.

/Thomas

On Fri, Mar 5, 2010 at 10:35, Anders Hammar  wrote:
> No, you should have two separate projects. That's the Maven way - do
> yourself a favor and don't fight it!
>
> /Anders
>
> On Fri, Mar 5, 2010 at 10:11, WriteJava  wrote:
>
>>
>> Thanks for your reply Anders, yes I am trying to build both jar and sar
>> within same maven project and I've some java classes which i need to add to
>> sar and exclude others and add them to jar. Is this possible?
>>
>> Thanks
>>
>> Anders Hammar wrote:
>> >
>> > The exclude tag is for specifying artifactId:groupId as stated in the
>> > docs.
>> >
>> > I don't understand why you don't want to include the classes? If you have
>> > a
>> > sar project but don't want to include some classes, why do you have them
>> > in
>> > that project? Or could it be that you're trying to do a jar AND a sar in
>> > the
>> > same Maven project?
>> >
>> > /Anders
>> >
>> > On Thu, Mar 4, 2010 at 17:06, WriteJava  wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> I am trying to generate a sar file using 'jboss-packaging-maven-plugin'
>> >> plugin and I can't exclude .class files from my sar. It is including all
>> >> classes to sar. Can you please help? Here is my code snippet:
>> >>
>> >>            
>> >>                org.codehaus.mojo
>> >>                jboss-packaging-maven-plugin
>> >>                2.1.1
>> >>                true
>> >>                
>> >>                        
>> >>                                **/*.class
>> >>                        
>> >>                
>> >>                
>> >>                    
>> >>                        sar123
>> >>                        
>> >>                            sar
>> >>                        
>> >>                        package
>> >>                        
>> >>                            my-service
>> >>
>> >>
>> >>
>> ${basedir}/conf/mysarMETA-INF/jboss-service.xml
>> >>                            false
>> >>                        
>> >>                    
>> >>                
>> >>            
>> >>
>> >> Thanks
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/Unable-to-exclude-.class-files-tp27782829p27782829.html
>> >> Sent from the Maven - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> >> For additional commands, e-mail: users-h...@maven.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Unable-to-exclude-.class-files-tp27782829p27791501.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/

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



Re: XML Files in Maven Jar

2010-02-23 Thread Thomas Sundberg
Hi!

Where are the xml files located in your project?

They will be included automatically if you place them in

src/main/resources

hth
Thomas

On Wed, Feb 24, 2010 at 08:10, vasm  wrote:
>
> Hi All,
> I am new to maven. I have created a new maven project to create a jar file.
> I have a few xml files in classpath as well. When i build the project only
> the  java files (i.e. class files) get included in jar. The xml files are
> excluded. Can anyone please help. How to include these xml files in jar as
> well. Any kind of help is appreciated.
>
> Thanx.
> --
> View this message in context: 
> http://old.nabble.com/XML-Files-in-Maven-Jar-tp27714119p27714119.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/

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



Plugin to start a jar?

2009-12-10 Thread Thomas Sundberg
Hi!

I want to start a jar during the 'pre-integration-test' pretty much as
starting a Tomcat with Cargo or similar. But this is a standalone jar
that contains a server that i want to have available for
integrationstests that I want to run later.

I want the server jar to be shut down in the 'post-integration-test' phase
I could live with it beeing shut down when Maven terminates so the
post-integration-test phase isn't the most important part.

Any tips on plugins I could use?

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Agical AB
Västerlånggatan 79, 2 tr
111 29 Stockholm, SWEDEN

Mobile: +46 70 767 33 15
E-mail: thomas.sundb...@agical.com
Blog: http://thomassundberg.wordpress.com/
http://www.agical.com

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



Re: Organise integration tests in a Maven project

2009-09-23 Thread Thomas Sundberg
On Wed, Sep 23, 2009 at 11:22, Manuel Grau  wrote:
>
> I suggest to you that you use maven-j2ee-archetype. I'm using it and it's
> great. If you need more help, let me know.
>

I asked my friend Google and found an archetype called
'maven-archetype-j2ee-simple'

http://maven.apache.org/plugins/maven-archetype-plugin/examples/j2ee-simple.html

The directory layout could be sufficient, but it doesn't state
anything about integration testing or where it will fit in the module
structure.

So my question remains. How would you suggest that the integration
testing is fitted into the modules?

/Thomas

As a sidenote, I totally agree with the quote from Dijkstra.


>
> 2009/9/23 Thomas Sundberg 
>
> > Hi!
> >
> > I'm about to set up en fresh project using Maven. It will contain a web
> > part
> > that will be a war, it will contain a ear part and it will contain
> > integration tests. How would you suggest organising it?
> >
> > I'm thinking on the lines of:
> >
> > root --
> >      -- ear [Mostly packaging for a application server]
> >
> >      -- war -- src -- main -- java ...
> >                        -- test -- java ... [Unit test, not depending on any
> > external resources]
> >
> >      -- integration-test -- src -- main -- java ... [Probably more or less
> > empty]
> >                                        -- test -- java ... [All integration
> > tests needed, including
> >                                                                Selenium,
> > Database and similar stuff
> >                                                                that will
> > require a deployed and running application]
> >
> > It is likely that I will add more modules as the system expands. Each
> > module
> > will be self dependant regarding the unit testing and the Integration tests
> > will depend on these other modules.
> >
> > Do you have any suggestions that I want to consider with this set-up?
> > There might be more then one practise and probably more then one good
> > practise. There might not exist any best practise so I want to consider
> > more
> > then one set-up before I make up my mind.
> >
> > Best regards
> > Thomas
> >
> > --
> > Thomas Sundberg
> > M. Sc. in Computer Science
> >
> > Agical AB
> > Västerlånggatan 79, 2 tr
> > 111 29 Stockholm, SWEDEN
> >
> > Mobile: +46 70 767 33 15
> > E-mail: thomas.sundb...@agical.com
> > http://www.agical.com
> > Blog: http://thomassundberg.wordpress.com/
> >
>
>
>
> --
> "Computer science is not about computers any more than astronomy is about
> telescopes." E.W. Dijkstra (1930-2002)



--
Thomas Sundberg
M. Sc. in Computer Science

Agical AB
Västerlånggatan 79, 2 tr
111 29 Stockholm, SWEDEN

Mobile: +46 70 767 33 15
E-mail: thomas.sundb...@agical.com
http://www.agical.com
Blog: http://thomassundberg.wordpress.com/

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



Organise integration tests in a Maven project

2009-09-23 Thread Thomas Sundberg
Hi!

I'm about to set up en fresh project using Maven. It will contain a web part
that will be a war, it will contain a ear part and it will contain
integration tests. How would you suggest organising it?

I'm thinking on the lines of:

root --
  -- ear [Mostly packaging for a application server]

  -- war -- src -- main -- java ...
-- test -- java ... [Unit test, not depending on any
external resources]

  -- integration-test -- src -- main -- java ... [Probably more or less
empty]
-- test -- java ... [All integration
tests needed, including
Selenium,
Database and similar stuff
that will
require a deployed and running application]

It is likely that I will add more modules as the system expands. Each module
will be self dependant regarding the unit testing and the Integration tests
will depend on these other modules.

Do you have any suggestions that I want to consider with this set-up?
There might be more then one practise and probably more then one good
practise. There might not exist any best practise so I want to consider more
then one set-up before I make up my mind.

Best regards
Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Agical AB
Västerlånggatan 79, 2 tr
111 29 Stockholm, SWEDEN

Mobile: +46 70 767 33 15
E-mail: thomas.sundb...@agical.com
http://www.agical.com
Blog: http://thomassundberg.wordpress.com/


Re: My application is not getting compiled using Maven

2009-09-23 Thread Thomas Sundberg
Hi!

What happens if you remove the unmappable character?
Have you been able to compile before or is this a new setup?
Can you restart with the simplest Hello World and get that to compile?
What happens if you use Maven 2?

/Thomas

On Wed, Sep 23, 2009 at 08:29, rasahere  wrote:
>
> Hi,
>
> I am using Maven 1.0 and my jdk is 1.5. Now when i am trying to build my
> application jar i am getting some strange errors.
>
>  warning: unmappable character for encoding UTF8
>    [javac] /**
>    [javac]     ^
> this is just a warning but still the build is failed.
> I have added
> maven.compile.source=1.5
> maven.compile.target=1.5
> in my project properties.
>
> Can any one give a solution for this.
>
> Thanks
> Rasa.
>
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/My-application-is-not-getting-compiled-using-Maven-tp25530996p25530996.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Agical AB
Västerlånggatan 79, 2 tr
111 29 Stockholm, SWEDEN

Mobile: +46 70 767 33 15
E-mail: thomas.sundb...@agical.com
http://www.agical.com

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



Re: Automated release process

2009-09-11 Thread Thomas Sundberg
Hi!

It sounds as you need a CI server. It would solve your issue. Take a look at

CruiseControl:
http://cruisecontrol.sourceforge.net/

Hudson:
https://hudson.dev.java.net/

/Thomas

On Thu, Sep 10, 2009 at 13:10, Matt Milliss  wrote:
> I work at a company that has around 10 applications, each application is a
> maven project, each of which may or may not get modified in a given 2 week
> iteration. At the end of every iteration I want an automated process for
> checking which applications have been modified since the last release and
> then release only those applications. Something along the lines of the
> following;
>
> 1. retrieve previous release version from our archiva repo
> 2. in subversion compare that versions tag against trunk to see any
> differences
> 3. if any differences then perform a release of that project
> 4. repeat for each application
>
> I've been trying to find a maven way of doing this but haven't had any luck,
> has anybody done something similar with success.
>
> Cheers
> Matt Milliss
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Agical AB
Västerlånggatan 79, 2 tr
111 29 Stockholm, SWEDEN

Mobile: +46 70 767 33 15
E-mail: thomas.sundb...@agical.com
http://www.agical.com

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



Re: Sun jersey jars

2009-09-03 Thread Thomas Sundberg
Hi!

I added this repository to my pom to be able to use the Jersy stuff:



maven2-repository.dev.java.net
Java.net Repository for Maven
http://download.java.net/maven/2/
default



/Thomas

On Wed, Sep 2, 2009 at 13:04, Bert 1 Waltniel wrote:
> Hi
>
> I got an error compiling my project.
>
> I'm using Sun Jersey.
>
> The error is that maven was unable to download the depending jar's from
> the repository.
>
> I have checked manually the maven repository and all the jar's from Sun
> Jersey are gone.
>
> Does anybody has a solution?
>
> Kind regards
>
> Bert Waltniel
>
> Sensor Solutions
>
> Java Consultant
>
> Email: bert.waltn...@be.ibm.com
> Phone: 0497/850123
>
>
>
> Tenzij hierboven anders aangegeven: / Sauf indication contraire ci-dessus:
> / Unless otherwise stated above:
>
> International Business Machines of Belgium sa / nv
> Siège social / Maatschappelijke zetel: Avenue du Bourget 42 Bourgetlaan,
> B-1130 Bruxelles/Brussel
> N° d'entreprise / Ondernemingsnr: TVA / BTW BE 0405 912 336
> RPM Bruxelles / RPR Brussel



-- 
Thomas Sundberg
M. Sc. in Computer Science

Agical AB
Västerlånggatan 79, 2 tr
111 29 Stockholm, SWEDEN

Mobile: +46 70 767 33 15
E-mail: thomas.sundb...@agical.com
http://www.agical.com

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