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

ASF GitHub Bot commented on JAMES-3395:
---------------------------------------

chibenwa commented on a change in pull request #249:
URL: https://github.com/apache/james-project/pull/249#discussion_r497312386



##########
File path: examples/pom.xml
##########
@@ -20,14 +20,11 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
     <modelVersion>4.0.0</modelVersion>
 
-    <parent>
-        <groupId>org.apache.james</groupId>
-        <artifactId>james-project</artifactId>
-        <version>3.6.0-SNAPSHOT</version>
-    </parent>
+    <groupId>org.apache.examples.james</groupId>

Review comment:
       I'm unsure that the James project is allowed to publish JARs to maven 
central  with a `org.apache.examples.` prefix. 
   
   Can you check the Apache foundation policies regarding this?

##########
File path: examples/pom.xml
##########
@@ -36,4 +33,14 @@
         <module>custom-mailets</module>
     </modules>
 
-</project>
\ No newline at end of file
+    <properties>
+        <james.groupId>org.apache.james</james.groupId>
+        <james.baseVersion>3.6.0-SNAPSHOT</james.baseVersion>

Review comment:
       I understand the concerns however it likely makes the release process 
hard.
   
   How do we ensure the version use by the example matches the released 
version? How does it integrate with the maven-release plugin?
   
   I I was to tag a 3.6.0 tomorrow, I would likely forget that. Even if I don't 
forget, how do I ensure the released exemple JAR matches the 3.6.0 version? 
Would I have to do a pre-release commit switching it to the not yet released 
3.6.0 - in which case the whole process might fail at publishing snapshots?
   
   Maybe a wiser value here would be :
   
   ```
   <james.baseVersion>${project.version}</james.baseVersion>
   ```
   
   That way as the version of the example and James are implicitly aliagned, 
the maven-release prompt will enable me to do the switch painlessly...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> examples should not extend from james-project
> ---------------------------------------------
>
>                 Key: JAMES-3395
>                 URL: https://issues.apache.org/jira/browse/JAMES-3395
>             Project: James Server
>          Issue Type: Bug
>            Reporter: Juhan Aasaru
>            Priority: Major
>
> Currently examples define james-project as its parent:
> [https://github.com/apache/james-project/blob/master/examples/pom.xml#L23]
> This is why some of the dependencies currently get loaded from the parent. 
> For example custom-mailets require dependency apache-mailet-api which is not 
> explicitly defined in its pom but resolved from the parent.
> I suggest removing reference to parent from pom.xml of examples and adding 
> the required dependencies directly to individual example pom-s.
> Example scenario: someone wants create its own custom mailets then this 
> person can take custom-mailets as the foundation without the need to depend 
> on whole james-server. 
>  
> Secondly - examples should not be under the package "org.apache.james". This 
> can introduce errors where example code uses something from James that has 
> package level access. I propose moving examples to 
> "org.apache.examples.james" package
>  
> I would like to work on this.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to