lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Male (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2268) Add test to check maven artifacts and their poms
Date Wed, 22 Sep 2010 13:02:34 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913529#action_12913529
] 

Chris Male commented on LUCENE-2268:
------------------------------------

Much of these are handled by Maven itself:

bq. Poms are valid XML/maven poms

Maven validates the poms itself before it begins the build process.  Poms themselves have
an XSD which you'll usually linked in the XML.  Consequently if the pom is not valid XML (oops!
forgot the </dependency>) then the build will fail.  

bq. Poms include all dependencies with correct versions for their modules

For the Maven build to run successfully it must be able to compile the source.  To do so the
classpath must contain all the necessary dependencies.  Only those dependencies specified
in the poms will be added to the classpath.  Consequently if a dependency is omitted but is
needed, then the build will fail with a compile error.  

I'm unaware of how to verify that the dependencies are the same version as those sitting in
the lib folder, but we should be able to create a maven plugin that does something similar
to that described in LUCENE-2657.  I'd say this test falls in the iterative category.

bq. Poms have correct groupId and artifactId
Artifacts for all modules are created

This can be handled through creating a test maven project which lists all the artifacts as
dependencies with the expected groupId and artifactId.  Running the build for the test project
would then fail if the dependencies don't exist (due to the artifactId or groupIds being incorrect
specified, or because no artifact was made in the first place).

bq. Artifacts match those created through the official ant build

I sort of added this to correlate with Uwe's original request.  Maven will compile and jar
the same source code as ant.  It will run the same tests (although I confess not with the
same parallel magic as you made in ant).  Both maven and ant will use the same compiler. 
Consequently the sources and compiled code included in the artifacts will be the same as produced
by ant.   The only thing I can think of additionally checking here is the checksums match,
but that will become complicated since maven includes its poms in its jars.  Maybe we could
list the contents of the jars and compare? too pedantic maybe?

My point here is I think we can leverage Maven itself a great deal to test that its doing
the right thing, or at least we are telling it to do the right thing.


> Add test to check maven artifacts and their poms
> ------------------------------------------------
>
>                 Key: LUCENE-2268
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2268
>             Project: Lucene - Java
>          Issue Type: Test
>          Components: Build
>    Affects Versions: 2.9.2, 3.0.1
>            Reporter: Uwe Schindler
>
> As release manager it is hard to find out if the maven artifacts work correct. It would
be good to have an ant task that executes maven with a .pom file that requires all contrib/core
artifacts (or one for each contrib) that "downloads" the artifacts from the local dist/maven
folder and builds that test project. This would require maven to execute the build script.
Also it should pass the ${version} ANT property to this pom.xml

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message