[jira] [Comment Edited] (BEAM-1840) shaded classes are not getting into the proper package

2017-03-31 Thread Aviem Zur (JIRA)

[ 
https://issues.apache.org/jira/browse/BEAM-1840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15951050#comment-15951050
 ] 

Aviem Zur edited comment on BEAM-1840 at 3/31/17 2:52 PM:
--

The relocation rules are based on the artifact ids, and not the package names.
{code:xml}

  org.apache.${renderedArtifactId}.repackaged...

{code}
The way we calculate {{renderedArtifactId}} is replacing non-alphanumeric 
characters in the artifact id with {{.}}
{code:xml}

  org.codehaus.mojo
  build-helper-maven-plugin
  3.0.0
  

  render-artifact-id
  
regex-properties
  
  prepare-package
  

  
renderedArtifactId
[^A-Za-z0-9]
.
${project.artifactId}
false
  

  

  

{code}
If we want the relocated classes to be in the {{sdk}} package instead of 
{{sdks}} package what needs to be done is add another replacement on 
{{renderedArtifactId}} which will replace {{sdks}} with {{sdk}}.


was (Author: aviemzur):
The relocation rules are based on the artifact ids, and not the package names.
{code:xml}

  org.apache.${renderedArtifactId}.repackaged.com.google.common

{code}
The way we calculate {{renderedArtifactId}} is replacing non-alphanumeric 
characters in the artifact id with {{.}}
{code:xml}

  org.codehaus.mojo
  build-helper-maven-plugin
  3.0.0
  

  render-artifact-id
  
regex-properties
  
  prepare-package
  

  
renderedArtifactId
[^A-Za-z0-9]
.
${project.artifactId}
false
  

  

  

{code}
If we want the relocated classes to be in the {{sdk}} package instead of 
{{sdks}} package what needs to be done is add another replacement on 
{{renderedArtifactId}} which will replace {{sdks}} with {{sdk}}.

> shaded classes are not getting into the proper package
> --
>
> Key: BEAM-1840
> URL: https://issues.apache.org/jira/browse/BEAM-1840
> Project: Beam
>  Issue Type: Improvement
>  Components: build-system
>Reporter: Ismaël Mejía
>Assignee: Ismaël Mejía
>Priority: Trivial
>
> The current shade configuration relocates classes into packages based in the 
> artifact name, however this is inconsistent with the package nams because the 
> beam artifact ids follow the directory structure beam-sdks-java-io-* but the 
> package structure is beam/sdk/java/io so there is an extra 's' that creates a 
> different package.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (BEAM-1840) shaded classes are not getting into the proper package

2017-03-31 Thread Aviem Zur (JIRA)

[ 
https://issues.apache.org/jira/browse/BEAM-1840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15951050#comment-15951050
 ] 

Aviem Zur edited comment on BEAM-1840 at 3/31/17 2:51 PM:
--

The relocation rules are based on the artifact ids, and not the package names.
{code:xml}

  org.apache.${renderedArtifactId}.repackaged.com.google.common

{code}
The way we calculate {{renderedArtifactId}} is replacing non-alphanumeric 
characters in the artifact id with {{.}}
{code:xml}

  org.codehaus.mojo
  build-helper-maven-plugin
  3.0.0
  

  render-artifact-id
  
regex-properties
  
  prepare-package
  

  
renderedArtifactId
[^A-Za-z0-9]
.
${project.artifactId}
false
  

  

  

{code}
If we want the relocated classes to be in the {{sdk}} package instead of 
{{sdks}} package what needs to be done is add another replacement on 
{{renderedArtifactId}} which will replace {{sdks}} with {{sdk}}.


was (Author: aviemzur):
The relocation rules are based on the artifact ids, and not the package names.
{{code}}

  org.apache.${renderedArtifactId}.repackaged.com.google.common

{{code}}
The way we calculate {{renderedArtifactId}} is replacing non-alphanumeric 
characters in the artifact id with {{.}}
{{code}}

  org.codehaus.mojo
  build-helper-maven-plugin
  3.0.0
  

  render-artifact-id
  
regex-properties
  
  prepare-package
  

  
renderedArtifactId
[^A-Za-z0-9]
.
${project.artifactId}
false
  

  

  

{{code}}
If we want the relocated classes to be in the {{sdk}} package instead of 
{{sdks}} package what needs to be done is add another replacement on 
{{renderedArtifactId}} which will replace {{sdks}} with {{sdk}}.

> shaded classes are not getting into the proper package
> --
>
> Key: BEAM-1840
> URL: https://issues.apache.org/jira/browse/BEAM-1840
> Project: Beam
>  Issue Type: Improvement
>  Components: build-system
>Reporter: Ismaël Mejía
>Assignee: Ismaël Mejía
>Priority: Trivial
>
> The current shade configuration relocates classes into packages based in the 
> artifact name, however this is inconsistent with the package nams because the 
> beam artifact ids follow the directory structure beam-sdks-java-io-* but the 
> package structure is beam/sdk/java/io so there is an extra 's' that creates a 
> different package.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)