mvn plugin doesn't seem to handle namespace -> package mappings #111

hedefalk opened this Issue Nov 8, 2011 · 6 comments


None yet

2 participants

hedefalk commented Nov 8, 2011

Discussed here:!topic/scalaxb/IDLuLFIwftc

I think we need something else than a Map[String, String] for the mappings, like a separate property class maybe? But I may be wrong since I'm no mvn guru ;) I posted a question here:

Maybe some wisdom will come out of it.

Also, the cli call of these parameters seems broken:

Error: Unknown argument '-pActivitiesCreatedOrUpdated=dfk.ka.generated.crm.activities'
Error: Unknown argument '-pApplitacionsCreatedOrUpdated=dfk.ka.generated.crm.activities'

Here I just tried "ActivitiesCreatedOrUpdated" as targetNamespace, but there should be a colon there, right?


@martiell martiell was assigned Nov 8, 2011
martiell commented Nov 8, 2011

I think it could use java.util.Properties instead of Map, which'd be specified as:


hedefalk commented Nov 8, 2011

Excellent, that sounds right :)

hedefalk commented Nov 8, 2011

Or maybe the version suggested here is more maven standard to make the semantics mor obvious?

martiell commented Nov 8, 2011

Yeah, that would work. I can't remember whether the key/value element names are mandated when using properties, or whether it's just the structure that counts.

If using Properties does require the elements to be 'name' and 'value' I'll use an object instead.

@martiell martiell added a commit to martiell/scalaxb that referenced this issue Nov 10, 2011
@martiell martiell mvn-scalaxb: Change packageNames parameter from a map to object array. (

The packageNames parameter was a Map<String, String>. This commit adds
a PackageName class, and changes the parameter to type PackageName[].
This is necessary because the URIs that need to be mapped are not
valid XML element names, and hence could not be specified as keys
when the parameter was a map.

This also adds maven-plugin-testing-harness, to allow unit tests to be
written for the mojo, in addition to the existing integration tests.

Fixed in snapshot 0.6.6-20111110.214735-4.

@martiell martiell closed this Nov 10, 2011

Thanks a lot! Will try it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment