Build problem with Maven

Hi.
I have upgraded from 1.5 APT to the 1.6 method of doing compile time annotations, and I am runing into a problem trying to build a jar containing my annotations processor.
I get the error from maven (mvn package)
[INFO] Compilation failure
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider annotations.processing.processors.CodeAnnotationProcessor not found
I have the following directory structure
src
--main
----java
------annotations
--------processing
----------processors
------------CodeAnnotationProcessor.java
----------annotations
------------CodeAnnotation.java
----resources
------META-INF
--------service
----------javax.annotation.processing.Processor
I build this with the following with maven
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>mygroup</groupId>
    <artifactId>annotations-processor</artifactId>
    <packaging>jar</packaging>
    <version>1.0.0</version>
    <name>annotations-processor</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <version>1.4.2</version>
            <scope>system</scope>
            <systemPath>C:/Java/jdk1.6.0_10/lib/tools.jar</systemPath>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>The javax.annotation.processing.Processor file contains
annotations.processing.processors.CodeAnnotationProcessorAny my
package annotations.processing.processors;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedSourceVersion;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.element.TypeElement;
import javax.lang.model.SourceVersion;
import java.util.Set;
@SupportedAnnotationTypes(
        "annotations.processing.annotations.CodeAnnotation")
@SupportedSourceVersion(SourceVersion.RELEASE_6)
public class CodeAnnotationProcessor extends AbstractProcessor {
    public boolean process(Set<? extends TypeElement> annotations,
                           RoundEnvironment roundEnv) {
        return true;
}And my CodeAnnotation is as follows
package annotations.processing.annotations;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface CodeAnnotation {
}

Milesy wrote:
Hi.
I have upgraded from 1.5 APT to the 1.6 method of doing compile time annotations, and I am runing into a problem trying to build a jar containing my annotations processor.
I get the error from maven (mvn package)
[INFO] Compilation failure
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider annotations.processing.processors.CodeAnnotationProcessor not foundFor me it worked when I used the settings
<plugins>
  <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
        <source>1.6</source>
        <target>1.6</target>
        <fork>true</fork>
        <executable>${java.home}/../bin/javac</executable>
        <compilerArgument>-proc:none</compilerArgument>
      </configuration>
    </plugin>
</plugins>
...Forking the compiler is perhaps not the best option, but its just for the annotation processor.

Similar Messages

  • Export Release Build - Problem with Server Settings

    Hello, i have a big problem and i searched the whole day yesterday but didnt found an answer...
    I started a Flex Mobile and PHP Project. The Project has a Data/Services included wich loads some customer from a database (sql)... for the first a
    used Zend and try it local (http://localhost and used the htdocs Folder of Zend)... EVERYTHING WORKS PRETTY FINE... so NOW my problem
    I wanted to export this project to a release build for my android phone... so the first warning of Flash Builder ist that the project ist currently configured to access data services from a local url. Before exporting the application, you may need to deploy your services to a remote server, then change the server root URL for your project. Click here to change server settings.
    When i click the button i get the server setting.
    Web root: C:\Program Files (x86)\Zend\Apache2\htdocs
    Root URL: http://localhost
    whe i change it now i get an eror:"The selected web root folder does not exist (i attached i screenshot of it).
    i entered de domain of my server (i also tried the ip) at Root URL. And i think there ist a problem with the Web root...? i get scary

    i know WHY Flashbuilder tells me that i have to change the setting when i deploy on the device
    my problem ist that i got this error...
    and the domain wich i have in the screenshot should only explain how i tried it...
    i entered my server url (the real domain) and i entered the folder "app" wich i have created via ftp on my server...
    BUT i also get this error (lik in the screenshot)
    i think at ROOT URL i cant make lot mistakes .... http://myserver.de or the ip
    but i think maybe my web root ist incorrect? i entered here the folder wich is directliy on my server...?
    i dont know exactly but i got an error like in the screen

  • LabVIEW 8.5.1 Build Problem With LV2010 Installed

    I am experiencing a problem when building an application installer using LabVIEW 8.5.1. I have built this application many time before but since installing LabVIEW 2010 I can no longer build the installer.
    I have tried to buiuld the application on a Windows 7 PC and a Windows XP machine. My minimum requirment in my build options was Windows 2000, I changed that to XP but it made no difference.
    I get the following error message:
    CDK_Build_Invoke.vi.ProxyCaller >> CDK_Build_Invoke.vi >> CDK_Engine_Main.vi >> CDK_Engine_Build.vi >> NI_MDF.lvlib:MDFDistCopyList_GetCount.vi
    Loading product deployment information
    Adding files to installer
    *** WARNING ***
    Cannot enforce the requested minimum operating system restriction because the deployment engine only supports Windows XP or later. Resetting minimum restriction to Windows XP or later.
    Done adding files
    Preparing to build deployment
    Copying products from distributions
    *** Error: Fatal runtime error. (Error code -10)
    *** Error Details:
    Error in MDF API function: _MDFDistCopyList_GetCount
    Access violation! Structured exception code 3221225477
    *** End Error Report
    Done building deployment
    Has anyone else come across this?
    Thanks in advance.

    Thanks Andrew.
    It didn't help.  After three days of trying, I did get one system to build without error. I'm currently trying to get another system to build.
    It looks like the Access violation is caused by the deployment utility not asking to change to DVD 3 for CVI after the product caches has been cleared (To fix the error code -40 problem).  Restoring the CVI runtime (NI LabWindows_CVI 2009 Service Pack 1 Run-Time Engine [9.1.1450]) to the Product Cache seems to fix the problem.
    The status log doesn't show enough information to figure out the problems.  Looking at the end of the Detailed_Installer.log is pretty much manditory.
    My recomendation is to build first with "Install TestStand Engine" and the various "Driver and Components..." turned off and then slowly enable the ones wanted. 
    Also, it saves a lot of pain and suffering to do at least one deployment with "Copy Installers to Product Cache by Default" turned on before doing an upgrade so you don't have to go search for old DVD's.
    After a lot of trial and error, I believe these are the steps I went through to finally get it to work:
    1. Close TestStand, LabView, and Deployment Utility
    2. Delete all in C:\Program Files\National Instruments\Shared\ProductCache, except the CVI Runtime
    3. Delete all in  C:\Documents and Settings\All Users\Application Data\National Instruments\MDF\ProductCache, except runtime 7.1.1
    There seems to be something wrong with the .NET language pack installation.  It always seems to generate errors.
    3. Run DotNet20x86langpack.msi  on the Device Driver DVD at Products\DotNet20langpack_x86_Installer\ and uninstall.
    4. Run DotNet20x86langpack.msi  and install.
    5. Put DVD 1 back in.
    Got an error with the .Net installer so. . .
    6. Uninstall at D:\Distributions\LV\Products\DotNet20_x86_Installer\DotNet20x86
    7. Install at D:\Distributions\LV_SE\Products\DotNet20_x86_Installer\DotNet20x86
    8. Again Install  at D:\Distributions\LV\Products\DotNet20_x86_Installer\DotNet20x86
    9. Run TestStand, LabView (if using VI's), and the Deployment Utility.  
    Runtime 8.5.1 should install automatically and ask to reboot the system.  Go ahead reboot and run Teststand, etc. again.
    10. In global settings, 'clear prompt before'. . . , and select 'copy installers to product cache by default'
    11. On Installer Options tab, clear "Install TestStand Engine".
    12. Build - ALWAYS 'remove all files from this folder before building'
    It "should" build.  If not, fix any errors.
    12. Select Install TestStand Engine.
    13. Select Engine Options... and clear all check boxes (except runtime 7.1.1)
    14. Build again (make sure DVD 1 is in)
    15. Install other Engine Options, Drivers and Components.
    16. Build again (make sure DVD 1 is in)

  • Build problem with Hello1 example.

    Hi,
    I have installed j2ee1.4 and trying to run the j2eetutorial1.4
    I am facing a problem in building the hello1 example.
    1) When I build the hello1 example, the build fails with the following error message
    C:\java-works\j2eetutorial14\examples\web\hello1>asant build
    Buildfile: build.xml
    init:
    prepare:
    copy:
    build:
    [javac] Compiling 2 source files to
    C:\java-works\j2eetutorial14\examples\we
    b\hello1\build
    BUILD FAILED
    file:C:/java-works/j2eetutorial14/examples/web/hello1/build.xml:52:
    C:\java-work
    s\j2eetutorial14\examples\web\hello1\${j2ee.home}\lib not found.
    Total time: 1 second
    2)) Editing the build.proerties file to include the j2ee.home property.When I save the file it gets a .txt extension.Could this cause a problem , while I try to build the examples? if so How can I avoid this?
    Could anyone please help me in this?
    Thanks,
    Ann

    To save the file without .txt extension
    just enclose the file with double quotes
    "build.properties" in the File save dialog box

  • Build problem with FlexBuilder 3 Plugin

    Hi,
    I am using the FlexBuilder 3 plugin with Eclipe Europa. I created a Flex project with J2EE backend and WTP support, so that I have both the Flex stuff and the J2EE stuff within the same project. I imported some mxml, as, and java files I had, and I was able to build and run my app using the default Eclipse build/deploy process. Everything worked except the BlazeDS (messagebroker servlet) part, so I decided to delete the Tomcat server (the Eclipse proxy of it), and start again with a new server config.
    This somehow totally broke the build process. Some of the new config used port 8080 instead of 8400. And the only part of my app that was correctly deployed was the java files in the src folder. Properties files were not deployed, jar files were not deployed, even web.xml was not deployed.
    After copying files manually into the Eclipse Tomcat proxy, everything worked fine, including object remoting and HTTPService invocation.
    Can anyone share their experience with the FlexBuilder plugin for java webapps? What is the correct way to set it all up?
    Thanks,
    Miguel

    Milesy wrote:
    Hi.
    I have upgraded from 1.5 APT to the 1.6 method of doing compile time annotations, and I am runing into a problem trying to build a jar containing my annotations processor.
    I get the error from maven (mvn package)
    [INFO] Compilation failure
    error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider annotations.processing.processors.CodeAnnotationProcessor not foundFor me it worked when I used the settings
    <plugins>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
            <fork>true</fork>
            <executable>${java.home}/../bin/javac</executable>
            <compilerArgument>-proc:none</compilerArgument>
          </configuration>
        </plugin>
    </plugins>
    ...Forking the compiler is perhaps not the best option, but its just for the annotation processor.

  • XML Form Builder-Problem with the save button

    Hi All,
    I created a project in XML Form Builder.
    I included a button "Save" in my project.
    All is working fine when i preview my project in XML Form Builder.
    The problem is when i run my project with iview.
    I suppose the form to save my input and then to be closed but
    unfortunately it did not.
    I don't know where the problem is as in the XML Form Builder everything seems ok.
    Thank you for your help!
    Regards,
    Ari

    Hi Carsten,
    Thank you for your help.
    There is no javascript error in the form.
    In the status bar when i have my mouse over the button i can see "javaxcript:HrefSubmit('save',"");"
    And when push the button "Transering Data..."
    I created the form in the Xml Form Builder and in preview there the project works.
    What do you mean "Did you access your Form using the KM Admin Explorer via a comman?"
    How can i have acess there?
    I appreciate you help!
    Regards,
    Ari

  • Interface Builder: Problems with selecting items?

    Hello, does someone else have experience with IB selection problems?
    I did the following:
    -Created a textured window
    -Dragged a toolbar into it
    -Dragged a NSScrollView into the textured window
    -Gave the NSScrollView a white background
    -Scaled the NSScrollView so that it extended to the edges of the window
    -Dragged 4xCheckboxes into the NSScrollView
    After this I had major problems in selecting any of the Checkboxes. It seemed like if I moved the mouse around a bit and kept clicking, then in some point I was able to get the checkbox selected. However this happened only after 5-30 clicks. Also the scaling controls of the checkboxes were almost impossible to find and to use.
    Is there a button or a checkbox in the IB configuration, or a keyboard key or something in the IB that would make selecting things a bit easier. Or am I just doing something wrong?

    Interface Builder is pretty buggy to begin with, so that is always going to be a hassle. You normally have to double-click inside scroll views to get to the actual contained items. Also, you can drill down through the scroll view in the object window in tree view and select the checkbox itself.

  • Build problem with inputDevices.llb

    I have a main vi that dynamically launches another vi. The dynamically launched vi contains keyboard related functions that are found in the c:\Program Files\National Instruments\LabVIEW 2010\vi.lib\Utility\inputDevices.llb. Executing within the LabVIEW 2010 environment presents no problems. However, when I build the main vi to an exe and run it, the dynamically launched vi is broken. When I click the broken arrow it pops up a message saying:
    Missing subvi Initialize Keyboard.vi
    Missing subvi Keyboard Acquire.vi
    Missing subvi Close Keyboard.vi
    I have not been able to figure this one. I'm guessing I'm missing some obvious reason for it
    Jim Haas

    Can you validate that the Input VIs are listed under the dependencies section of you LabVIEW Project? I would have expected that they would be included with the Run-Time Engine. But if not, and if they aren't listed under dependencies, you can find and add them to the Project manually, and specify that they are Always Included within your build specification.
    If that's not the case, let me know and I'll try to reproduce it as well.
    Fred V -- Product Support Engineer -- LabVIEW R&D -- National Instruments

  • Build problem with MacOSX10.6.8 (HelloWorld.aip)

    Hello,
    First, I work on Mac OSX 10.6.8, with SDK CS4 for Illustrator on XCode 3.2.6.
    This configuration is compatible to develop with this SDK CS4?
    Other question, more important because it is my problem.
    I followed the gettingStarted.pdf in order to create the HelloWorld.aip on Macintosh, when I try to build, I can see "Succeeded" at the bottom right on the window of Xcode. But just next, they are an orange icon.
    When I click on this icon, I have this message :
    "Composite SDKs are not supported by XCode 2.4.
    The current format is not compatible with build setting ADDITIONAL_SDKS of build configuration "Debug" of project "HelloWorld"".
    In order to solve this project format confilcts, I edit the project setting and in project format of Xcode I set "XCode 3.2-compatible".
    After that, the orange icon disappearing, and like before, when I build the project, I have "Suceeded".
    But in the ouput file I have nothing. No HelloWorld.ai !
    Someone could help me please ?
    Thx in advance.
    Regards

    first idea of all: isn't there a netbeans support forum/mailing list/plugin page ?
    regards
    sebastien

  • Build problem with external JAR

    Hello,
    I am developing a custom web dynpro component. I need to use some of the JARs delivered by SAP such as com.sap.security.api (can be found in \SAP\IDE\IDE70\eclipse\plugins). I have included the JAR files to my project in Properties->Java Build path->Libraries). Everything is working fine: I can build/deploy the application and it is running fine in the application server.
    Anyhow, the problem comes when I try to activate my activity in the development configuration perspective.
    In the build log I can see for example the following:
    [javac] ERROR: /usr/sap/VDD/JC10/j2ee/cluster/server0/temp/CBS/3/.B/4789/t/067D33924E6154CA5284F16652954F88/gen_wdp/packages/com/mydevelopment/mystuff/MyComponent.java:29: package com.sap.security.api does not exist
         [javac] ERROR: import com.sap.security.api.IUser;
    I have been reading several threads about similar issues, but I am not quite satisfied with the answers. There seems to be several opinions about how to solve this.
    Now the questions are:
    - How can I get rid of this error?
    - What is the best practice in overall to use the SAP delivered JARs in custom web dynpro component/project.
    Edited by: Pa Pa on Nov 21, 2009 2:07 PM

    Hi Pa,
    To use any jar in your DC  on NWDI track, you need to follow the following steps:
    1. Go to Your project>Used DCs and try to add a new one by locating the DC among those which are already present on the track.
    2. If you are not able to locate any DC with the required jars then,
    a. Create an external library DC where you need to add all the jars in the library folder of the project using an activity.
    b. Create public parts for compile time and run time for this dc.
    c. Deploy the DC.
    d. Goto src folder of your dc and say Add files to DTR (your jars would be on the track)
    e. Deploy the external library DC so that the Jars are deployed on the portal server.
    f. Add the public parts of this External Library DC under used DCs of your development component.
    g. Add this external library under library references of your project.
    h. Build and deploy.
    i.  Now try activating your activity.
    Use the following link to know how to execute these steps.
    [Add and Use Jars through used DCs|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm]
    [Screen Shots|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID1078501850DB00490474849923920126End?blog=/pub/wlg/9517]
    Please let me know, if you ahave any doubt.
    Regards,
    Tushar Sinha

  • Build problem with Berkeley DB on Windows / MingW

    I'm building 4.5.20 on MingW on Windows XP. I was getting an undefined symbol error when trying to build. There is a reference in os_errno.c to WSAGetLastError, and that symbol was showing up as undefined. The symbol is found in ws2_32.dll (the Winsock2 library). My fix is to change LIBCSO_LIBS from empty to -lws2_32 in the Makefile, which resolved my problem.
    I couldn't figure out how to change this so that configure will pick this up properly (since I'm not familiar with using configure), so I can rerun configure without losing this fix. Also, I don't know if that's where you would recommend changing this.
    Any suggestions?
    Thanks,
    Eric

    Hi Eric,
    This issue was discussed before, here:
    Re: BerkeleyDB and MinGW... is there a way?
    Re: Build Berkeley-db on MinGW error
    Please let me know if it helped.
    Regards,
    Bogdan Coman

  • New Build, problems with H61M-P32/W8

    I am putting together a small micro atx build consisting of the following.
    MSI H61M-P32 motherboard
    Intel G2030 3 ghz cpu
    2 gb of DDR3 ram
    EVGA GTX 650
    80 gb hard drve
    lg cd/dvd drive
    PCI-E to usb 2.0 card
    Here is my issues, when i hook up just the mobo with the video card the computer will turn on and run fine till its gets to the point where it doesnt detect a hdd and cant move forward. However when i plug power into anything else (hdd, cd drive, pci-e card) the computer wont turn on or boot, the fans just spin for a sec then stop. I know its not a sata problem as it does this with or without sata cables attached to the drives. Its simply when i apply power to the drives it does this.
    I ruled out it being a  power supply issue as i tried 3 different power supplies, a 385 watt, a 430 watt, and finally an 850 watt.
    Any ideas before i call msi to RMA the board?
    Im banging my head against a wall trying to figure this out.

    Did you try clear CMOS and boot with only one RAM stick?
    Do you have other HDD to try?
    Quote
    I know its not a sata problem as it does this with or without sata cables attached to the drives. Its simply when i apply power to the drives it does this.
    If you didn't attach the power cable to the sata HDD, it won't have function even you connect the sata cable.

  • XML Forms Builder - problem with checkbox

    Hi,
    I have created many checkboxes in XML Forms Builder and if I want to create a new document based on this "Form" I have still checked one of checkboxes. I would like to have all empty  checkboxes becasue user should check the appropriate checkboxes.
    Do you know how to resolve this problem?
    Thaks for help!
    Regards,
    Andrzej Tabara

    Hi,
    is it always the same checkbox that is already filled in? Is this ckeckbox based on a metadata-definition?
    If yes: You could maybe have a look at the metadata-definition. Is there maybe a default-value defined?
    Kind reagrds
    Karin

  • App builder problem with Fuzzy Toolkit

    Hi,
    today I wanted to build an app (using LV2009) with some functions from "PID and Fuzzy Control Toolkit".
    Now the app builder is searching for a type definition in vi.lib (as shown in the pic), but it doesn't find the CTL file - but the path used for searching is correct! Then I do the search manually, point to the requested CTL in the correct place (and with correct name of course), and the build will succeed.
    What's up here?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Solved!
    Go to Solution.
    Attachments:
    check.png ‏18 KB

    Hi,
    thanks for your thoughts!
    Answers:
    - I use WinXP SP3, German settings
    - I use LV2009SP1 for that project, toolkits are installed with that version (other LabVIEW versions are installed too, from LV8.5.1 to LV2010SP1)
    - LabVIEW is installed in the "standard" path on drive C: (as can be seen on the attached pic of message #1)
    - the app builder is unable to find the ctl file (the standard search dialog pops up), but the file is located on exactly the path used for searching (as can be seen on the picture)
    - all I have to do (but this really annoys me) is to point LabVIEW to an item in a place it already knows...
    - the type definition is part of the toolkit, it's installed/located in the standard folder of that toolkit, and I never changed/touched any path or file name
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Query Builder problem with saving to SQL text file

    When developing an SQL statement in Query Builder and saving it for later use, one has the option of saving in .SQL file extension. However, this file can not be used by the data wizard of Oracle*Reports because it contains non-ascii text. It appears that the Query Builder saves commands as binary tokens rather than in ascii text.
    This makes it impossible to use Query Builder in place of Oracle*Report's data wizard's query builder with which to build and save SQL statements.

    as i posted earlier .. queryBuilder as a stand alone product is neither supported nor available anymore. it is only available as part of the report data wizard.
    thanks,
    ph.

Maybe you are looking for