List Info

Thread: Wrong pom.xml




Wrong pom.xml
user name
2006-03-20 00:11:51
On 3/19/06, Oleg Kalnichevski <olegkapache.org> wrote:
> Bindul Bhowmik wrote:
> > On 3/19/06, Oleg Kalnichevski <olegkapache.org> wrote:
> >
> >> On Sat, 2006-03-18 at 19:52 -0700, Bindul
Bhowmik wrote:
> >>
> >>> Hello,
> >>>
> >>> I checked out the http-core component to
my workspace, and XML
> >>> validation tool tells me that the pom.xml
does not validate against
> >>> the maven POM schema.
> >>> (schemaLocation="http://maven.apache
.org/POM/4.0.0
> >>> http://maven
.apache.org/maven-v4_0_0.xsd").
> >>>
> >>> I have corrected the pom.xml and am
attaching the diff. If it is all
> >>> right, someone with commit access might
want to commit it to the
> >>> repository.
> >>>
> >>>
> >> Hi Bindul
> >>
> >> For some reason Maven2 stopped working for me
after applying the patch.
> >>
> >> olegdld810:~/src/apache.org/jakarta/httpcomponents/http-c
ore$ mvn clean
> >> [INFO] Scanning for projects...
> >> [INFO]
> >>
------------------------------------------------------------
----------------
> >> [ERROR] FATAL ERROR
> >> [INFO]
> >>
------------------------------------------------------------
----------------
> >> [INFO] Error building POM (may not be this
project's POM).
> >>
> >>
> >> Project ID:
org.apache.jakarta.httpcomponents:http-core
> >> POM
> >> Location:
/home/oleg/src/apache.org/jakarta/httpcomponents/http-core/p
om.xml
> >> Validation Messages:
> >>
> >>     [0] 
'build.testResources.testResource.directory' is missing.
> >>
> >>
> >> Reason: Failed to validate POM
> >>
> >>
> >> [INFO]
> >>
------------------------------------------------------------
----------------
> >> [INFO] Trace
> >>
org.apache.maven.reactor.MavenExecutionException: Failed to
validate POM
> >>         at
> >>
org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:
365)
> >>         at
> >>
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:27
8)
> >>         at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> >>         at
org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> >>         at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>         at
> >>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
ssorImpl.java:39)
> >>         at
> >>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
thodAccessorImpl.java:25)
> >>         at
java.lang.reflect.Method.invoke(Method.java:585)
> >>         at
> >>
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.ja
va:315)
> >>         at
org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >>         at
> >>
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.
java:430)
> >>         at
org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >> Caused by:
org.apache.maven.project.InvalidProjectModelException:
Failed
> >> to validate POM
> >>         at
> >>
org.apache.maven.project.DefaultMavenProjectBuilder.processP
rojectLogic(DefaultMavenProjectBuilder.java:781)
> >>         at
> >>
org.apache.maven.project.DefaultMavenProjectBuilder.build(De
faultMavenProjectBuilder.java:631)
> >>         at
> >>
org.apache.maven.project.DefaultMavenProjectBuilder.buildFro
mSourceFile(DefaultMavenProjectBuilder.java:303)
> >>         at
> >>
org.apache.maven.project.DefaultMavenProjectBuilder.build(De
faultMavenProjectBuilder.java:274)
> >>         at
> >>
org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:5
15)
> >>         at
> >>
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.j
ava:447)
> >>         at
> >>
org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:
351)
> >>         ... 11 more
> >> [INFO]
> >>
------------------------------------------------------------
----------------
> >> [INFO] Total time: < 1 second
> >> [INFO] Finished at: Sun Mar 19 13:03:12 CET
2006
> >> [INFO] Final Memory: 1M/2M
> >>
> >> The http-core pom.xml is indeed invalid
according to the schema but
> >> Maven 2.0.2 does not seem to mind
> >>
> >
> > Probably need to open an issue with Maven?
> >
> >
>
> Can you reproduce the problem? As far as I can tell
this does seem to be
> a bug in Maven.

I could reproduce it. But then resolved the problem. The
test resource
element requires the directory
(/project/build/testResources/testResource/directory)
element.
Strange, the XSD does not mandate this element, but the code
fails to
validate this.

I have created another patch with this fix. It succeeds to
compile and
run all the tests on my machine.

BTW, are both 'testSourceDirectory' and 'testResources'
required? The
same number of tests run on my machine with
'testSourceDirectory'
commented.

>
> >>> The pom.xml for the httpcomponents also
did not validate. The patch
> >>> for that is also attached to this email.
> >>>
> >>>
> >> Patch applied
> >>
> >
> > Thanks. But, did not see a commit.
> >
> >
>
> Are you subscribed to httpclient-commitsjakarta.apache.org?

No, I am not. But did not see the change coming into my
workspace (on
SVN update) for quite some time.

I apologize if I am taking up too much of your time.
Beginners hiccups I guess.

Thanks Oleg.

Bindul
>
> Oleg
>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: httpclient-dev-unsubscribejakarta.apache.org
> For additional commands, e-mail:
httpclient-dev-helpjakarta.apache.org
>
>
Index:
E:/apache/httpcomponents/maven-workspace/httpcomponents/http
-core/pom.xml
============================================================
=======
---
E:/apache/httpcomponents/maven-workspace/httpcomponents/http
-core/pom.xml	(revision 387022)
+++
E:/apache/httpcomponents/maven-workspace/httpcomponents/http
-core/pom.xml	(working copy)
 -77,7
+77,12 
     <sourceDirectory>src/java</sourceDirectory>
    
<testSourceDirectory>src/test</testSourceDirectory&
gt;
     <testResources>
-      <includes>**/TestAll.java</includes>
+        <testResource>
+            <directory>src/test</directory>
+            <includes>
+               
<include>**/TestAll.java</include>
+            </includes>
+        </testResource>
     </testResources>
     <plugins>
         <plugin>


------------------------------------------------------------
---------
To unsubscribe, e-mail: httpclient-dev-unsubscribejakarta.apache.org
For additional commands, e-mail: httpclient-dev-helpjakarta.apache.org
Wrong pom.xml
user name
2006-03-21 11:13:41
On Sun, 2006-03-19 at 17:11 -0700, Bindul Bhowmik wrote:
> On 3/19/06, Oleg Kalnichevski <olegkapache.org> wrote:
> > Bindul Bhowmik wrote:
> > > On 3/19/06, Oleg Kalnichevski <olegkapache.org> wrote:

...

> > Can you reproduce the problem? As far as I can
tell this does seem to be
> > a bug in Maven.
> 
> I could reproduce it. But then resolved the problem.
The test resource
> element requires the directory
> (/project/build/testResources/testResource/directory)
element.
> Strange, the XSD does not mandate this element, but the
code fails to
> validate this.
> 
> I have created another patch with this fix. It succeeds
to compile and
> run all the tests on my machine.
> 

Patch checked in. Many thanks, Bindul

> BTW, are both 'testSourceDirectory' and
'testResources' required? The
> same number of tests run on my machine with
'testSourceDirectory'
> commented.
> 

No idea. However, with 'testSourceDirectory' removed maven
seems no
longer able to find unit tests


> No, I am not. But did not see the change coming into my
workspace (on
> SVN update) for quite some time.
> 
> I apologize if I am taking up too much of your time.
Beginners hiccups I guess.
> 

No worries at all. I really appreciate your taking interest
in
HttpComponents.

Cheers,

Oleg


> Thanks Oleg.
> 
> Bindul
> >
> > Oleg
> >
> >
> >
------------------------------------------------------------
---------
> > To unsubscribe, e-mail:
httpclient-dev-unsubscribejakarta.apache.org
> > For additional commands, e-mail:
httpclient-dev-helpjakarta.apache.org
> >
> >
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: httpclient-dev-unsubscribejakarta.apache.org
> For additional commands, e-mail:
httpclient-dev-helpjakarta.apache.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: httpclient-dev-unsubscribejakarta.apache.org
For additional commands, e-mail: httpclient-dev-helpjakarta.apache.org

Wrong pom.xml
user name
2006-03-21 16:10:53
On 3/21/06, Oleg Kalnichevski <olegkapache.org> wrote:
> On Sun, 2006-03-19 at 17:11 -0700, Bindul Bhowmik
wrote:
> > On 3/19/06, Oleg Kalnichevski <olegkapache.org> wrote:
> > > Bindul Bhowmik wrote:
> > > > On 3/19/06, Oleg Kalnichevski
<olegkapache.org> wrote:
>
> ...
>
> > > Can you reproduce the problem? As far as I
can tell this does seem to be
> > > a bug in Maven.
> >
> > I could reproduce it. But then resolved the
problem. The test resource
> > element requires the directory
> >
(/project/build/testResources/testResource/directory)
element.
> > Strange, the XSD does not mandate this element,
but the code fails to
> > validate this.
> >
> > I have created another patch with this fix. It
succeeds to compile and
> > run all the tests on my machine.
> >
>
> Patch checked in. Many thanks, Bindul
>
> > BTW, are both 'testSourceDirectory' and
'testResources' required? The
> > same number of tests run on my machine with
'testSourceDirectory'
> > commented.
> >
>
> No idea. However, with 'testSourceDirectory' removed
maven seems no
> longer able to find unit tests
>
>
> > No, I am not. But did not see the change coming
into my workspace (on
> > SVN update) for quite some time.
> >
> > I apologize if I am taking up too much of your
time. Beginners hiccups I guess.
> >
>
> No worries at all. I really appreciate your taking
interest in
> HttpComponents.

Thank you. I am using http-client for a couple of years now,
and am
lurking on the list for over a year now. I had some spare
time, and
something I could contribute... just pitched in. 

>
> Cheers,
>
> Oleg
>
>
> > Thanks Oleg.
> >
> > Bindul
> > >
> > > Oleg
> > >
> > >
> > >
------------------------------------------------------------
---------
> > > To unsubscribe, e-mail:
httpclient-dev-unsubscribejakarta.apache.org
> > > For additional commands, e-mail:
httpclient-dev-helpjakarta.apache.org
> > >
> > >
> >
------------------------------------------------------------
---------
> > To unsubscribe, e-mail:
httpclient-dev-unsubscribejakarta.apache.org
> > For additional commands, e-mail:
httpclient-dev-helpjakarta.apache.org
>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: httpclient-dev-unsubscribejakarta.apache.org
> For additional commands, e-mail:
httpclient-dev-helpjakarta.apache.org
>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: httpclient-dev-unsubscribejakarta.apache.org
For additional commands, e-mail: httpclient-dev-helpjakarta.apache.org

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )