Hi Arne,
I've never used it, but this plugin sounds like it might be what you want.

http://mojo.codehaus.org/build-helper-maven-plugin/









"Arne Styve" <[EMAIL PROTECTED]> 
20/04/2007 13:12
Please respond to
"Maven Users List" <[email protected]>


To
"'Maven Users List'" <[email protected]>
cc

Subject
RE: Ant generated JAR file to be handeled with Maven...how?






Hi

> >
> > I have a project based on an Ant build.xml file. I want to 
> keep this 
> > build-file, and keep building the project it self using this 
> > build-file and Ant, but to wrap Maven2 around it.
> > I've managed to "call" the ant-build file (build.xml) from 
> my POM, and 
> > it works fine. However, the Ant script produses a JAR not known to 
> > Maven, and Maven ends up creating a JAR on its own, which 
> is empty. I 
> > want to take the JAR file generated by Ant, making Maven 
> aware of it, 
> > and deploy it (from my POM) in our company Maven2 repo using the 
> > groupId-artifactId-version concept. How do I go about to 
> get this to 
> > work ? Any ideas ?
> 
> Maybe this: http://maven.apache.org/ant-tasks.html will help you?
> 
> Regards,
> Tomek

Thanks, but it was not quite what I was looking for, rather the other way
around. I do not want to do anything with my exsisting Ant-file (since 
this
is a project and hence an ant file delvirered by some third party). All 
the
handling of the JAR-file must be performed from within the POM.

I have partly solved it by including 
   <build>
       <plugins>
            :
          <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
 
<classesDirectory>${basedir}/build/classes</classesDirectory>
                </configuration>
 
            </plugin>
       </plugins>
   </build>

Where I tell Maven where to look for the class-files for Maven to build 
the
JAR. The class-files are a result of the Ant-script.
It might happen that this is the preferred way of doing it, since I will 
end
up with a Maven-generated JAR which better matches the Maven2 repo concept
(since the JAR generated from Maven contains both pom.properties and the
pom.xml, which the Ant generated JAR file does not.)...

Any thoughts on this ?

Regards
Arne



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.

Reply via email to