[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2775) package-info.java should be optional:"convention over configuration"

E. Jung (JIRA) jira-events at lists.jboss.org
Wed Mar 26 20:45:40 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBSEAM-2775?page=comments#action_12404999 ] 
            
E. Jung commented on JBSEAM-2775:
---------------------------------

I've finished the core algorithm, written and executed units tests for it, and integrated the algorithm into org.jboss.seam.init.Initialization.installComponentsFromXmlElements(). However, I'm having problems with maven (run through ant's build.xml):

[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.maven.plugins:maven-surefire-plugin
Reason: POM 'org.apache.maven.plugins:maven-surefire-plugin' not found in repository: Unable to download the artifact from any repository
  org.apache.maven.plugins:maven-surefire-plugin:pom:2.3
from the specified remote repositories:
  snapshots.jboss.org (http://snapshots.jboss.org/maven2),
  repository.jboss.org (http://repository.jboss.org/maven2),
  central (http://repo1.maven.org/maven2),
  wicketstuff.org (http://wicketstuff.org/maven/repository)
 for project org.apache.maven.plugins:maven-surefire-plugin

None of the other artifacts have problems downloading. My knowledge of maven is quite superficial right now; is there any way to download this artifact manually and stick it somewhere on my local drive for maven to find? Sorry this is off-topic. Alternatively, I can submit the patch as it stands now, but I'd really like to do integration testing before that.

> package-info.java should be optional:"convention over configuration"
> --------------------------------------------------------------------
>
>                 Key: JBSEAM-2775
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2775
>             Project: JBoss Seam
>          Issue Type: Feature Request
>            Reporter: E. Jung
>
> Currently, package-info.java is required when referring to custom Seam components in components.xml. However, to further align Seam with the "convention over configuration" philosophy, this file can be optional by making some assumptions:
> 1. In the absence of package-info.java , the XML namespace in components.xml for custom components has a well-defined mapping to a Java package
> 2. This mapping can be defined as:
>   a. The XML namespace must be parsable by java.net.URL, otherwise automatic mapping is aborted
>   a. Protocol (scheme), the www/ subdomain, port, query parameters, anchors (references), and userInfo are ignored, if present.
>   b. The top-level domain becomes the root Java package
>   c. Subdomains become Java packages under the root package, applied in right-to-left order as specified in the URI.
>   d. The path, as returned by URL.getPath(), is mapped to further Java packages such that each path element becomes another Java package appended in left-to-right order
> Examples:
> http://www.company.com/department/product ==> com.company.department.product
> https://company.com/department/product ==> com.company.department.product
> ftp://www.company.org/department/product ==> org.company.department.product
> abc://company.org/department/product ==> org.company.department.product
> company.net/foo/bar/baz ==> net.company.foo.bar.baz
> JIRA isn't displaying my last example correctly. See http://pastebin.mozilla.org/375878 for the last example.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list