Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8946685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:34:48+00:00 2026-06-15T12:34:48+00:00

Browsing the maven-plugin source code (for example ‘clean-plugin’ ), I came across verify.bsh file,

  • 0

Browsing the maven-plugin source code (for example ‘clean-plugin’), I came across verify.bsh file, which has contents as

import java.io.*;
import java.util.*;
import java.util.jar.*;
import java.util.regex.*;

try
{
    File targetDir = new File( basedir, "target" );
    System.out.println( "Checking for absence of " + targetDir );
    if ( targetDir.exists() )
    {
        System.out.println( "FAILURE!" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

I would like to know, what is this exactly? This seems to be Java code, but I don’t see any class or method or a main here. Please help me understand this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:34:49+00:00Added an answer on June 15, 2026 at 12:34 pm

    As mentioned in the first answer this is beanshell code which is used to run an integration test via maven-invoker-plugin. The problem with BeanShell is that it seemed to be the case there is no more active development anymore (svn repository not accessible etc.). I prefer Groovy for writing integration tests in relationship with integration tests.

    The calling of the code done by setting up an maven environment via the maven-invoker-plugin which executes a complete maven call and afterwards you can check the contents of the target folder or may be contents of the build.log (mvn output during running) if it contains the expected things or not.

    Within a plugin you usually have the following structure:

    ./
    +- pom.xml
    +- src/
       +- it/
          +- settings.xml
          +- first-it/
          |  +- pom.xml
          |  +- src/
          +- second-it/
             +- pom.xml
             +- invoker.properties
             +- test.properties
             +- verify.bsh
             +- src/
    

    src/it contains the integration tests for the plugin. For example second-it contains a separate maven project with a pom.xml file etc. which will be run through maven during the integration tests. The verify.bsh will be called after the Maven call has ended to check if everything is as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Browsing through the source of a spring framework project i came across a method
Browsing the ruleby source code, I noticed that they were calling Container(:and) , which
Browsing the code sample from C# 4.0 in a nutshell I came across some
While browsing some code, I came across this line: if False: #shedskin I understand
While browsing I came across this blog post about using the Wikipedia API from
As I'm browsing through a Rails source code, it contains the line: @@autoloads =
Browsing through the source code of Microsoft's sample StockTrader application, I found this snippet
Was browsing the jQuery source code when I met this line: jQuery(this)[ state ?
When browsing folders using a Windows 8 metro application (for example attaching a file
When browsing ASP.NET MVC source code in codeplex , I found it is common

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.