Issue with GroupID containing an underscore

View: New views
4 Messages — Rating Filter:   Alert me  

Issue with GroupID containing an underscore

by Jan Ancajas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Encountered an issue using "Add Maven Artifact" with groupId having an
underscore character.  The characters after that and the underscore
itself are truncated when added as dependency in the pom.xml (e.g.
groupId="my_company" is truncated to "my" ). I haven't seen an
artifact with an "_" character in the groupId, is this supported in
maven by default? If yes,  any idea if we should support this ?


Thanks.

Re: Issue with GroupID containing an underscore

by brettporter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maven is not very picky about group IDs, though it should be more than  
it is.

I think it is reasonable not to support it, as long as it is handled  
as a proper error, but by the same token if it worked it need not  
necessarily be excluded. Either way, the current behaviour needs to  
change :)

- Brett

On 15/10/2008, at 11:05 PM, Jan Stevens Ancajas wrote:

> Hi,
>
> Encountered an issue using "Add Maven Artifact" with groupId having an
> underscore character.  The characters after that and the underscore
> itself are truncated when added as dependency in the pom.xml (e.g.
> groupId="my_company" is truncated to "my" ). I haven't seen an
> artifact with an "_" character in the groupId, is this supported in
> maven by default? If yes,  any idea if we should support this ?
>
>
> Thanks.

--
Brett Porter
brett@...
http://blogs.exist.com/bporter/


Re: Issue with GroupID containing an underscore

by Wendy Smoak-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 15, 2008 at 5:05 AM, Jan Stevens Ancajas
<jansquared@...> wrote:
> Encountered an issue using "Add Maven Artifact" with groupId having an
> underscore character.  The characters after that and the underscore
> itself are truncated when added as dependency in the pom.xml (e.g.
> groupId="my_company" is truncated to "my" ). I haven't seen an
> artifact with an "_" character in the groupId, is this supported in
> maven by default? If yes,  any idea if we should support this ?

I don't think Maven itself cares about underscores, so initially this
just sounds like a bug.  However, I do see underscores used in
filenames in the the nmaven local repo, so perhaps it is a special
character for nmaven?

If there is some technical reason nmaven can't have underscores in the
groupId, we need to document it, and make sure things like the project
import feature don't suggest or generate poms with underscores in the
groupId.

--
Wendy

Re: Issue with GroupID containing an underscore

by Jan Ancajas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 16, 2008 at 6:57 AM, Wendy Smoak <wsmoak@...> wrote:

> On Wed, Oct 15, 2008 at 5:05 AM, Jan Stevens Ancajas
> <jansquared@...> wrote:
>> Encountered an issue using "Add Maven Artifact" with groupId having an
>> underscore character.  The characters after that and the underscore
>> itself are truncated when added as dependency in the pom.xml (e.g.
>> groupId="my_company" is truncated to "my" ). I haven't seen an
>> artifact with an "_" character in the groupId, is this supported in
>> maven by default? If yes,  any idea if we should support this ?
>
> I don't think Maven itself cares about underscores, so initially this
> just sounds like a bug.  However, I do see underscores used in
> filenames in the the nmaven local repo, so perhaps it is a special
> character for nmaven?
>
two succeeding underscores are used as separator  between version and
groupId. I'll check if this is the cause of the issue.

> If there is some technical reason nmaven can't have underscores in the
> groupId, we need to document it, and make sure things like the project
> import feature don't suggest or generate poms with underscores in the
> groupId.
>
> --
> Wendy
>