New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hedefalk opened this Issue Nov 8, 2011 · 6 comments

Comments

Projects
None yet
2 participants
@hedefalk

hedefalk commented Nov 8, 2011

Discussed here: https://groups.google.com/forum/#!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:

http://stackoverflow.com/questions/8045598/escape-strings-in-maven-map

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?

Thanks,
Viktor

@ghost ghost assigned martiell Nov 8, 2011

@martiell

This comment has been minimized.

Show comment
Hide comment
@martiell

martiell Nov 8, 2011

Collaborator

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

<myProperties>
  <property>
    <name>propertyName1</name>
    <value>propertyValue1</value>
  <property>
</myProperties>

http://maven.apache.org/guides/plugin/guide-java-plugin-development.html

Collaborator

martiell commented Nov 8, 2011

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

<myProperties>
  <property>
    <name>propertyName1</name>
    <value>propertyValue1</value>
  <property>
</myProperties>

http://maven.apache.org/guides/plugin/guide-java-plugin-development.html

@hedefalk

This comment has been minimized.

Show comment
Hide comment
@hedefalk

hedefalk Nov 8, 2011

Excellent, that sounds right :)

hedefalk commented Nov 8, 2011

Excellent, that sounds right :)

@hedefalk

This comment has been minimized.

Show comment
Hide comment
@hedefalk

hedefalk Nov 8, 2011

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

http://stackoverflow.com/questions/8045598/escape-strings-in-maven-map/8049921#8049921

hedefalk commented Nov 8, 2011

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

http://stackoverflow.com/questions/8045598/escape-strings-in-maven-map/8049921#8049921

@martiell

This comment has been minimized.

Show comment
Hide comment
@martiell

martiell Nov 8, 2011

Collaborator

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.

Collaborator

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 added a commit to martiell/scalaxb that referenced this issue Nov 10, 2011

mvn-scalaxb: Change packageNames parameter from a map to object array. (
#111)

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.
@martiell

This comment has been minimized.

Show comment
Hide comment
@martiell

martiell Nov 10, 2011

Collaborator

Fixed in snapshot 0.6.6-20111110.214735-4.

Collaborator

martiell commented Nov 10, 2011

Fixed in snapshot 0.6.6-20111110.214735-4.

@martiell martiell closed this Nov 10, 2011

@hedefalk

This comment has been minimized.

Show comment
Hide comment
@hedefalk

hedefalk Nov 11, 2011

Thanks a lot! Will try it out!

hedefalk commented Nov 11, 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