I'm not sure if I'm off in left field by asking this. I am porting an ant
build to a maven build. I have a test that I run using a main() call. It is
not possible to place it within the confinements of a junit test. So, it
does not get executed as a unit test. However, it is still a unit test that
I must run. Is it possible to run a main class during a build for testing
purposes? How do you execute a java class? Do I have to create a goal in my
maven.xml that uses the ant java tag?

Brandon Goodin
  
 

-----Original Message-----
From: Ashley Williams [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 19, 2005 10:59 AM
To: Maven Users List
Subject: [m2] java plugin

Is there currently a java plugin for running regular main() apps?  
I've just checked the repository and I couldn't find one. Currently I  
define the following plugin in my pom:

       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
         <configuration>
           <archive>
             <manifest>
               <mainClass>Server</mainClass>
             </manifest>
           </archive>
         </configuration>
       </plugin>
     </plugins>

and would like to do something like this to run the app:
m2 java:java

but at the moment I have to do this:
java -jar file://<myrepository>/<myartifact>/myapp.jar

In fact I'd ideally like to run the app immediately after the install:
m2 install java:java

Thanks
AW

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

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

Reply via email to