Package org.dom4j

Examples of org.dom4j.Element.addComment()


        Document document = DocumentHelper.createDocument();
        Element root = document.addElement("jboss-deployment-plan");

        root.addElement("deployment-name").addText(deploymentName);

        root.addComment("Note, deployment-entry elements are not used by the DeploymentManager");
        root.addComment("The DeploymentManager relies on the the entry naming convention");

        Iterator it = entryList.iterator();
        while (it.hasNext()) {
            Entry entry = (Entry) it.next();
View Full Code Here


        Element root = document.addElement("jboss-deployment-plan");

        root.addElement("deployment-name").addText(deploymentName);

        root.addComment("Note, deployment-entry elements are not used by the DeploymentManager");
        root.addComment("The DeploymentManager relies on the the entry naming convention");

        Iterator it = entryList.iterator();
        while (it.hasNext()) {
            Entry entry = (Entry) it.next();
            Element element = root.addElement("deployment-entry");
View Full Code Here

  private Element createDocumentSkeleton(Document doc) {
    Element project = doc.addElement("project");
    project.addAttribute("name", "junit4-maven-synthetic");
    project.addAttribute("default", DEFAULT_TARGET);

    project.addComment("Define JUnit4 task and data types.");
    Element taskdef = project.addElement("taskdef");
    taskdef.addAttribute("resource", JUnit4.ANTLIB_RESOURCE_NAME);
    addArtifactClassPath(
        taskdef.addElement("classpath"),
        pluginArtifactMap.get("com.carrotsearch.randomizedtesting:junit4-ant"));
View Full Code Here

  private void setupTestClasspath(Element junit4) {
    junit4.addComment("Runtime classpath.");
    Element cp = junit4.addElement("classpath");

    // Test classes.
    cp.addComment("Test classes directory.");
    cp.addElement("pathelement").addAttribute("location", testClassesDirectory.getAbsolutePath());

    // Classes directory.
    cp.addComment("Test classes directory.");
    cp.addElement("pathelement").addAttribute("location", classesDirectory.getAbsolutePath());
View Full Code Here

    // Test classes.
    cp.addComment("Test classes directory.");
    cp.addElement("pathelement").addAttribute("location", testClassesDirectory.getAbsolutePath());

    // Classes directory.
    cp.addComment("Test classes directory.");
    cp.addElement("pathelement").addAttribute("location", classesDirectory.getAbsolutePath());

    // Project dependencies.
    cp.addComment("Project dependencies.");
View Full Code Here

    // Classes directory.
    cp.addComment("Test classes directory.");
    cp.addElement("pathelement").addAttribute("location", classesDirectory.getAbsolutePath());

    // Project dependencies.
    cp.addComment("Project dependencies.");

    Set<Artifact> classpathArtifacts = (Set<Artifact>) project.getArtifacts();

    if (!Strings.isNullOrEmpty(classpathDependencyScopeExclude)) {
      classpathArtifacts = filterArtifacts(cp, classpathArtifacts,
View Full Code Here

   
    for (Artifact artifact : classpathArtifacts) {
      if (artifact.getArtifactHandler().isAddedToClasspath()) {
        File file = artifact.getFile();
        if (file != null) {
          cp.addComment("Dependency artifact: " + artifact.getId());
          cp.addElement("pathelement").addAttribute("location",
              file.getAbsolutePath());
        }
      }
    }
View Full Code Here

        }
      }
    }
   
    // Additional dependencies.
    cp.addComment("Additional classpath elements.");
    if (additionalClasspathElements != null && !additionalClasspathElements.isEmpty()) {
      for (String classpathElement : additionalClasspathElements) {
        if (Strings.isNullOrEmpty(classpathElement)) {
          cp.addElement("pathelement").addAttribute("location",
              classpathElement);
View Full Code Here

       /** ����document���� */
        Document document = DocumentHelper.createDocument();
       /** ����XML�ĵ��ĸ�books */
        Element booksElement = document.addElement("books");
       /** ����һ��ע�� */
        booksElement.addComment("This is a test for dom4j, holen, 2004.9.11");
       /** �����һ��book�ڵ� */
        Element bookElement = booksElement.addElement("book");
       /** ����show�������� */
        bookElement.addAttribute("show","yes");
       /** ����title�ڵ� */
 
View Full Code Here

  private Element createDocumentSkeleton(Document doc) {
    Element project = doc.addElement("project");
    project.addAttribute("name", "junit4-maven-synthetic");
    project.addAttribute("default", DEFAULT_TARGET);

    project.addComment("Define JUnit4 task and data types.");
    Element taskdef = project.addElement("taskdef");
    taskdef.addAttribute("resource", JUnit4.ANTLIB_RESOURCE_NAME);
    addArtifactClassPath(
        taskdef.addElement("classpath"),
        pluginArtifactMap.get("com.carrotsearch.randomizedtesting:junit4-ant"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.